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

Potential issue for frameshift tagging in File.IO.FileReader.read_vcf #223

Open
MartinPersida opened this issue Dec 11, 2018 · 3 comments
Open
Assignees

Comments

@MartinPersida
Copy link

MartinPersida commented Dec 11, 2018

By screening though the code of the read_vcf() function of Fred2.IO.FIleReader I noticed the following:

l194: v_list = record.ALT with record an item of vl being a Record object from pyvcf package
This, if I am not mistaken, will return a list of alternate allele of pyvcf specific type (in my case vcf.model._Substitution).

l218 elif record.is_indel:
l219 if len(v_list)%3 == 0:

In the previous condition, determining if the variant will lead to a frameshift, the modulo is done on the list and not on the allele itself, so it will always return 1 if there is only one variant identified at the given loci and not the actual length of the allele itself isn't it?

@mwalzer
Copy link

mwalzer commented Dec 12, 2018

👍 seems you're right, the tests also do not cover multi-allele records.

@mwalzer mwalzer self-assigned this Dec 12, 2018
@b-schubert
Copy link
Contributor

@mwalzer Mathias, are you actively working on this issue?

@mwalzer
Copy link

mwalzer commented May 9, 2019

@b-schubert Haven't had much time dedicated to it. There is a sloppy fix which is ignoring all but the first ALT,

v_list = next(iter(record.ALT or []), None)

Probab. fine for many cases, but if there are multiple ALT of different len., this should produce independent variant objects.
Haven't had time to integrate a test. I can add a collaborative branch on https://github.com/FRED-2/Fred2/ directly, so we can work together if you'd like or you take over.

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

No branches or pull requests

3 participants