Skip to content

Commit

Permalink
update SNV mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
farhangkl committed Mar 25, 2024
1 parent c056175 commit 6d18675
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/Tyke/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def vcf_number_variants(input_vcf_file, input_bam_file, refs, outfile):
for read in bamfile.fetch(chromosome, start_position, end_position):
if read.query_sequence is not None and read.flag == 0 and read.query_name not in processed_read_ids:
variant_reads.append(read)
no_reads = max(1, math.ceil(len(variant_reads) * float(v.info.get('AF'))))
print(v.info.get('AF'))
no_reads = max(1, math.ceil(len(variant_reads) * float(v.info.get('AF')[0])))
if no_reads > len(variant_reads):
#print(f"Coverage {len(variant_reads)} is below required minimum reads for variant {chromosome}:{start_position} AF {obj.AF}")
continue
Expand Down

0 comments on commit 6d18675

Please sign in to comment.