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

vcf_gff.py change #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 2 additions & 24 deletions vcf_gff.py
Expand Up @@ -75,31 +75,9 @@ def get_gen(formatcols, ref):
reads = sample_dict.get("DP")
else:
reads = "NA"
if sample_dict.has_key("NF"):
if sample_dict.has_key("GT"):
"""
polysnp tool output
"""
freq = sample_dict.get("NF")
variants = freq.split("|")
if int(variants[0]) >= 1:
var += "A"
if int(variants[1]) >= 1:
var += "C"
if int(variants[2]) >= 1:
var += "G"
if int(variants[3]) >= 1:
var += "T"
if var == "":
gen = "NA"
elif var == ref:
gen = "HOM_ref"
elif len(var) >= 2:
gen = "HET"
else:
gen = "HOM_mut"
elif sample_dict.has_key("GT"):
"""
mpileup output, recommend ALWAYS have GT, note this only good scoring for diploids too!
mpileup output, recommend ALWAYS have GT, note this only good for scoring diploids too!
"""
genotypes = sample_dict.get("GT")
if genotypes == "1/1":
Expand Down