molgenis / CoNVaDING

Copy Number Variation Detection In Next-generation sequencing Gene panels was designed for small (single-exon) copy number variation (CNV) detection in high coverage next-generation sequencing (NGS) data
GNU Lesser General Public License v3.0
20 stars 22 forks source link

Better handling of sex chromossomes #17

Open duartemolha opened 8 years ago

duartemolha commented 8 years ago

Hi ... Thank your for your software... I have been testing it and got some nice calls on one of my panels... however... I have a panel that only has targets on a sex chromossome and nothing on the autosomal chromossomes...

In several places your script is not set up to deal with this situation as it expects targets on non-sex chromossomes.

Also, a CNV happening on a portion of chrX on a male sample can an often results in no reads on the target exon for that sample... your script fails as is tries to get average read counts on the countFromBam sub for example.

Also

in the sub calcCovAutoSex, the variable $covchrautolength in this case is 0 and the

    $covchrautoval = (($covchrautosum)/$covchrautolength);

therefore fails with an elligal division by 0

the same on the sub writeCountFile

      $normAuto = (($coverageh->{ $key })/$covchrautoval);

Thiswould fail in this example since there is no coverage of autosommal chrs.

Many thanks

freerkvandijk commented 8 years ago

Thanks for reporting this issue. We are currently working on a list of bug fixes and will add this one to the list.

duartemolha commented 7 years ago

I see that some improvements have been done on this. But the mirror image of this issue also needs addressing

Say your targeted panel is only on the sex chromosomes. In this case line 2384 fails because the covchralllength is 0

$covchrall = ($covchrallsum/$covchralllength);