stop printing the debug info -- hurr

Also it turns out that sometimes there can be a call with zero total non-I/non-D bases -- so add one to numerator and denominator to prevent divide by zero error



git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2262 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
chartl 2009-12-04 16:17:38 +00:00
parent 0c2d6d7e41
commit c1263e841c
1 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import math
dbsnp = "." # can be global. Let something else annotate dbsnp info
filter = "0" # don't declare any filtering in the VCF file
print(sys.argv)
#print(sys.argv)
raw_calls_file = open(sys.argv[1])
output_vcf_file = open(sys.argv[2],'w')
@ -28,7 +28,7 @@ header = raw_calls_file.readline().strip()
fields = header.split()
print(fields)
#print(fields)
# parse it for important offsets
@ -76,7 +76,7 @@ def getProportionNonref(list):
else:
ref_bases = int(list[for_t_index].split(":")[1]) + int(list[rev_t_index].split(":")[1])
return 1.0 - ( float(ref_bases) / float(total_bases) )
return 1.0 - ( float(ref_bases+1) / float(total_bases+1) )
def generateVCFLine(chrom, pos, db, ref, alt, filt, qual, INFO):
# make the info into a single string