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

getPL Returning Incorrect Values #1097

Closed
hakanEdico opened this issue Mar 7, 2018 · 5 comments · Fixed by #1098
Closed

getPL Returning Incorrect Values #1097

hakanEdico opened this issue Mar 7, 2018 · 5 comments · Fixed by #1098

Comments

@hakanEdico
Copy link

hakanEdico commented Mar 7, 2018

When using the getPL() function from genotype.java, I am getting incorrect values returned.
For example in this VCF line:

GL000206.1 6870 . C T 11.04 . AC=1;AF=0.500;AN=2;DP=16;FS=6.990;MQ=39.29;MQRankSum=-1.036;QD=0.69;ReadPosRankSum=-2.383;SOR=3.258;FractionInformativeReads=0.625;R2_5P_bias=31.099 GT:AD:AF:DP:GQ:PL:GL:GP:PRI:SB:MB 0/1:6,4:0.400:10:45:45,0,50:-4.55,0.00,-5.00:7.864e-02,9.214e-01,4.618e-06:0.00,34.77,37.77:3,3,0,4:4,2,1,3

Where the PL is "45,0,50"
The getPL() function returns [0, 46, 50]

Its always the second highest value incremented by one... very weird.

I am running on centos6/7
Version 2.0.1

EDIT: GL,GP,PRI were added recently, when they are removed this problem does not occur.

@yfarjoun
Copy link
Contributor

yfarjoun commented Mar 7, 2018 via email

@yfarjoun
Copy link
Contributor

yfarjoun commented Mar 7, 2018

I submitted a PR #1098 that fixes this issue and I used the VariantContext that you supplied. please let me know if that it not OK.

@hakanEdico
Copy link
Author

hakanEdico commented Mar 7, 2018

I have downloaded/compiled your branch and the issue is still present for me.

EDIT: Might've compiled the wrong branch! Let me retry.

@hakanEdico
Copy link
Author

hakanEdico commented Mar 7, 2018

The fix works, thanks a lot!

One unrelated question, in the past our project has used
LineReaderUtil.fromBufferedStream(vcfIstream) where vcfIstream is a FileInputStream object.

Looks like that is deprecated now, is it safe to use
AsciiLineReader.from(vcfIstream) instead?

EDIT: Getting this warning:
AsciiLineReader Creating an indexable source for an AsciiFeatureCodec using a stream that is neither a PositionalBufferedStream nor a BlockCompressedInputStream

What should I be using instead? BufferedLineReader?

Problem is the next line is
LineIteratorImpl iterator = new LineIteratorImpl(reader)
And BufferedLineReader cannot be converted to LineReader

EDIT2:

SynchronousLineReader reader = new SynchronousLineReader(vcfIstream);
LineIteratorImpl iterator = new LineIteratorImpl(reader);

Seems to work

@yfarjoun
Copy link
Contributor

yfarjoun commented Mar 8, 2018

Please open a new issue for unrelated issues.

lbergelson pushed a commit that referenced this issue Jun 6, 2018
* fixed bug where GL field overrides PL field. When GL and PL are inconsistent, and GL is "after" PL, the resulting genotype has the wrong PL value.
* fixes #1097 
* updated testng 6.9.9 -> 6.13.1
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.

2 participants