comparison mut2sscs.py @ 7:ded0dc6a20d3 draft

planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
author mheinzl
date Mon, 25 Jan 2021 13:21:55 +0000
parents 11a2a34f8a2b
children ced1a529e7cd
comparison
equal deleted inserted replaced
6:11a2a34f8a2b 7:ded0dc6a20d3
64 ref_pos_dict = {} 64 ref_pos_dict = {}
65 65
66 for variant in VCF(file1): 66 for variant in VCF(file1):
67 chrom = variant.CHROM 67 chrom = variant.CHROM
68 stop_pos = variant.start 68 stop_pos = variant.start
69 chrom_stop_pos = str(chrom) + "#" + str(stop_pos) 69 #chrom_stop_pos = str(chrom) + "#" + str(stop_pos)
70 ref = variant.REF 70 ref = variant.REF
71 alt = variant.ALT[0] 71 alt = variant.ALT[0]
72 # nc = variant.format('NC') 72 chrom_stop_pos = str(chrom) + "#" + str(stop_pos) + "#" + ref + "#" + alt
73 ad = variant.format('AD')
74 73
75 if len(ref) == len(alt): 74 if len(ref) == len(alt):
76 75
77 for pileupcolumn in bam.pileup(chrom, stop_pos - 1, stop_pos + 1, max_depth=1000000000): 76 for pileupcolumn in bam.pileup(chrom, stop_pos - 1, stop_pos + 1, max_depth=1000000000):
78 if pileupcolumn.reference_pos == stop_pos: 77 if pileupcolumn.reference_pos == stop_pos: