Mercurial > repos > jjohnson > defuse
comparison defuse_results_to_vcf.py @ 28:f51a95bdc38e
Add breakpoints.bam output derived from breakpoints.genome.psl
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Tue, 03 Sep 2013 06:41:19 -0500 |
parents | d57fcac025e2 |
children | 8027fc53f3f9 |
comparison
equal
deleted
inserted
replaced
27:d57fcac025e2 | 28:f51a95bdc38e |
---|---|
256 if inversion: | 256 if inversion: |
257 info.append('INVERSION') | 257 info.append('INVERSION') |
258 info1 = [svtype,'MATEID=%s' % mate_id2] + info | 258 info1 = [svtype,'MATEID=%s' % mate_id2] + info |
259 info2 = [svtype,'MATEID=%s' % mate_id1] + info | 259 info2 = [svtype,'MATEID=%s' % mate_id1] + info |
260 qual = int(float(fields[columns.index('probability')]) * 255) if columns.index('probability') else '.' | 260 qual = int(float(fields[columns.index('probability')]) * 255) if columns.index('probability') else '.' |
261 vcf1 = '%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s'% (gene_chromosome1,genomic_break_pos1, mate_id1, ref1, alt1, qual, filt, ';'.join(info1) ) | 261 vcf1 = '%s\t%d\t%s\t%s\t%s\t%s\t%d\t%s'% (gene_chromosome1,genomic_break_pos1, mate_id1, ref1, alt1, qual, filt, ';'.join(info1) ) |
262 vcf2 = '%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s'% (gene_chromosome2,genomic_break_pos2, mate_id2, ref2, alt2, qual, filt, ';'.join(info2) ) | 262 vcf2 = '%s\t%d\t%s\t%s\t%s\t%s\t%d\t%s'% (gene_chromosome2,genomic_break_pos2, mate_id2, ref2, alt2, qual, filt, ';'.join(info2) ) |
263 add_vcf_line(gene_chromosome1,genomic_break_pos1,mate_id1,vcf1) | 263 add_vcf_line(gene_chromosome1,genomic_break_pos1,mate_id1,vcf1) |
264 add_vcf_line(gene_chromosome2,genomic_break_pos2,mate_id2,vcf2) | 264 add_vcf_line(gene_chromosome2,genomic_break_pos2,mate_id2,vcf2) |
265 write_vcf() | 265 write_vcf() |
266 except Exception, e: | 266 except Exception, e: |
267 print >> sys.stderr, "failed: %s" % e | 267 print >> sys.stderr, "failed: %s" % e |