Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DP should be None if no call is made #280

Open
Redmar-van-den-Berg opened this issue Jul 17, 2017 · 0 comments · May be fixed by #297
Open

DP should be None if no call is made #280

Redmar-van-den-Berg opened this issue Jul 17, 2017 · 0 comments · May be fixed by #297

Comments

@Redmar-van-den-Berg
Copy link

I ran into the following problem using the latest pyvcf from pip. I should note that this is for the following haploid record.

#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	sample1	sample2
gi|194447306|ref|NC_011083.1|	299078	.	T	A	178.77	.	AC=1;AF=1.0;AN=1;DP=8;FS=0.0;MLEAC=1;MLEAF=1.0;MQ=28.13;QD=28.35;SOR=3.611	GT:AD:DP:GQ:PL:FT	1:0,5:5:99:207,0:G_dp10	.:0,0:.:.:.:.

When no call is made, I expected the DP to be set to None, so that I could do if call.data.GT: do somthing. However, this doesn't work, because the call.data.GT gets set to . instead of None. Is this the expected behaviour? As you can see from the print output, the other fields that have . in the vcf file are converted to None.

    # No call made
    if call.data.GT == '.':
        print(call.data)

CallData(GT=., AD=[0, 0], DP=None, GQ=None, PL=None, FT=None)

@Marcormio Marcormio linked a pull request Jul 25, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant