Skip to content

Commit

Permalink
Fix chrX exclusion for inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasguignard authored Nov 27, 2023
1 parent d96faeb commit 3ff7295
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions wwwachab.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2220,21 +2220,19 @@
#Penalize (or do next) if index case is 0/0 or parents are 1/1 and not affected. We should treat further all affected genotypes like this (!= 0/0)
if (defined $trio){

# exclude chromosome X variants due to mother/son unbalance
if (defined $skipCaseWT && $finalSortData[$dicoColumnNbr{"Genotype-".$case}] eq "0/0"){
# exclude chromosome X variants due to mother/son unbalance
if ($line[0]!~/X/){
switch ($familyGenotype){
#Check if case/dad and case/mum inheritance are consistent
case /^_0\/0_0\/1_0\/0_/ {$dadVariant ++ ;}
case /^_0\/0_0\/0_0\/1_/ {$mumVariant ++ ;}
}
}
next;
}
# exclude chromosome X variants due to mother/son unbalance
if ($line[0]!~/X/){

if (defined $skipCaseWT && $finalSortData[$dicoColumnNbr{"Genotype-".$case}] eq "0/0"){
# exclude chromosome X variants due to mother/son unbalance
if ($line[0]!~/X/){
switch ($familyGenotype){
#Check if case/dad and case/mum inheritance are consistent
case /^_0\/0_0\/1_0\/0_/ {$dadVariant ++ ;}
case /^_0\/0_0\/0_0\/1_/ {$mumVariant ++ ;}
}
}
next;
}

switch ($familyGenotype){
#Check if case/dad and case/mum inheritance are consistent
case /^_0\/0_0\/1_0\/0_/ {$dadVariant ++ ;}
Expand All @@ -2243,7 +2241,8 @@
case /^_0\/1_0\/0_0\/1_/ {$caseMumVariant ++;}

}

}

if ($finalSortData[$dicoColumnNbr{"Genotype-".$case}] eq "0/0" or (! defined $hashAffected{$dad} and $finalSortData[$dicoColumnNbr{"Genotype-".$dad}] eq "1/1") or (! defined $hashAffected{$mum} and $finalSortData[$dicoColumnNbr{"Genotype-".$mum}] eq "1/1") ){
$finalSortData[$dicoColumnNbr{'MPA_ranking'}] += 100;
}
Expand Down

0 comments on commit 3ff7295

Please sign in to comment.