41
Mamba
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/13 3:36

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
After trying around with the different versions of the module I could get the inbreeding calculation to work.

Without knowing what have you changed, it's hard to come up with any recommendation for you

Quote:
There's an error somewhere in coi.php line 269...

Did you turn on the debugger in Admin? What errors are you getting?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

42
kamue74
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/15 6:59

  • kamue74

  • Just popping in

  • Posts: 10

  • Since: 2014/9/5 1


Parse error: syntax error, unexpected 'else' (T_ELSE) in /homepages/0/d543342701/htdocs/dbase/modules/pedigree/coi.php on line 269

This is what I get with the original coi.php file


} else { { if (! $marked[$m] && $chrono[$m] < $paternal_rank) mater_side ($p, $fathers[$m], $a, $ndist+1) ;
mater_side ($p, $mothers[$m], $a, $ndist+1) ; } }

I took out the bracket at the beginning and the result was I could see the inbreeding calculation but not the names of father and mother and it shows up two male parents.

Resized Image

43
kamue74
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/15 8:54

  • kamue74

  • Just popping in

  • Posts: 10

  • Since: 2014/9/5 1


the calculating doesn't work either :( show 0% always

44
kamue74
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/15 11:06

  • kamue74

  • Just popping in

  • Posts: 10

  • Since: 2014/9/5 1


I just tried a new installation of version 1.3.1 but the same error

Parse error: syntax error, unexpected 'else' (T_ELSE) in /homepages/0/d543342701/htdocs/dbase/modules/pedigree/coi.php on line 269

I give up for now :(

45
Mamba
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/15 18:52

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Try to replace the function code with this one and let me know if it works for you:
function mater_side($p$m$a$ndist)
{
    global 
$fathers$mothers$marked$COIs$deltaf$ICknown$verbose$nl$chrono$paternal_rank$max_dist;
    if (!
$m or $ndist $max_dist) {
        return 
0;
    }
    if (
$p == $m) {
    
/* IMPLEX FOUND (node of consanguinity) { for Anim #A */
        
$already_known $ICknown[$p];
    }
    if (!
$already_known) {
        
CONSANG($p);
    } 
// MAIN RECURSION:
    
$ICp $COIs[$p]; // we need to know the IC of Parent for Wright's formula
    
if ($verbose && !$already_known && $ICp 0.001 $verbose) {
        echo 
"IC of Animal $p is $ICp$nl";
    }
    
$incr 1.0 / (<< $ndist) * (1. $ICp); // ******** applying WRIGHT's formula ********
    // [Note:  1 << $ndist is equal to 2 power $ndist]
    
$COIs[$a] += $incr// incrementing the IC of AnimC
    
if ($a == 0) {
        
$deltaf[$p] += $incr;
    }
    
/* contribution of Anim #P to IC of Anim #0 */
    // if ($verbose && $a == 0 && $incr > 0.0001*$verbose)
    //    echo "Animal $p is contributing for " . substr ($deltaf[$p], 0, 10) . " to the IC of Animal $a$nl" ;}
    
else 
    {
        if (!
$marked[$m] && $chrono[$m] < $paternal_rank) {
            
mater_side($p$fathers[$m], $a$ndist 1);
        }
        
mater_side($p$mothers[$m], $a$ndist 1);
    }
    return 
0;
}
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

46
kamue74
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/15 19:33

  • kamue74

  • Just popping in

  • Posts: 10

  • Since: 2014/9/5 1


thanks for the code but still the same problem as before... no father and mother is shown and the calculating counts 0%... :(

47
Mamba
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/15 21:13

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Email me your DB tables content, so I can test it here locally.

Check your PM ....
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

48
Mamba
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/16 2:24

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I've uploaded your data, and it seems like it's working OK here, at least for the "German Dreams Fandango":

/modules/pedigree/mpedigree.php?pedid=12

Resized Image


What XOOPS and PHP versions do you have? What browser do you use?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

49
kamue74
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/16 20:00

  • kamue74

  • Just popping in

  • Posts: 10

  • Since: 2014/9/5 1


Thanks for your help... the pedigree shows up correct on my installation but I have the problem with the inbreeding calculation (picture 1+2)

I have installed XOOPS 2.5.6 and PHP 5.5

Resized Image


Resized Image

50
Mamba
Re: Animal/Pedigree Module 1.31 Alpha 1
  • 2014/9/17 0:52

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


It seems like there is an issue with the data that I've got from you.

For example, on your chart Einstein-Tyson vom Sutumer Grund has parents "Flash Yucon" and "Aliena", but after importing your data, I don't have any of them, so I cannot compare my installation to your Website

Please email me your full data, so I can test and try to replicate issues that you might have, otherwise it's not possible

Normally it should work, as it does on this Website, so once I have your full data, I can test it and see if there are any differences in the code, and what is the problem.


Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

286 user(s) are online (178 user(s) are browsing Support Forums)


Members: 0


Guests: 286


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits