etal / cnvkit

Copy number variant detection from targeted DNA sequencing
http://cnvkit.readthedocs.org
Other
545 stars 165 forks source link

We could not set the gender of the sample correctly in reference.py #843

Closed ccoo22 closed 10 months ago

ccoo22 commented 1 year ago

when we use parameter -x in reference.py,you declare variables sexes by "sexes = collections.defaultdict(lambda: female_samples)"。but when you use sexes info,you get it by “is_xx = sexes.get(cnarr.sample_id)”。This will return "None" always。

https://github.com/etal/cnvkit/blame/3749aae729dc9533971ea494e358cca66d11d5d4/cnvlib/reference.py#L410C6-L410C6

28rietd commented 1 year ago

We noticed the same! It is a bug in the code and quite problematic for sex chromosome CNV calling since in the function shift_sex_chroms it is then assumed that the reference is a male sample.

etal commented 10 months ago

Thanks for the fix, @28rietd . I've merged your PR #851 .