Skip to content

Commit

Permalink
Convert to int to avoid indel float problem
Browse files Browse the repository at this point in the history
  • Loading branch information
ctokheim committed May 21, 2017
1 parent b91f955 commit 8358ccc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions prob2020/python/indel.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,16 @@ def counts2maf(num_indels, myindel_lens, myindel_types, gene_bed, seed=None):
var_class = 'Frame_Shift_Ins' if is_frame_shift[i] else 'In_Frame_Ins'
dna_change = 'c.{0}_{1}ins'.format(pos[i], pos[i])
prot_change = 'p.?'
print(i)
print(myindel_lens)
tmp = [gene_bed.gene_name, gene_bed.strand, gene_bed.chrom,
gpos, gpos, '-', 'N'*myindel_lens[i], '-', dna_change,
gpos, gpos, '-', 'N'*int(myindel_lens[i]), '-', dna_change,
prot_change, var_class]
maf_list.append(tmp)
else:
var_class = 'Frame_Shift_Del' if is_frame_shift[i] else 'In_Frame_Del'
dna_change = 'c.{0}_{1}del'.format(pos[i], pos[i]+myindel_lens[i])
prot_change = 'p.?'
tmp = [gene_bed.gene_name, gene_bed.strand, gene_bed.chrom,
gpos+1, gpos+myindel_lens[i], 'N'*myindel_lens[i], '-', '-', dna_change,
gpos+1, gpos+myindel_lens[i], 'N'*int(myindel_lens[i]), '-', '-', dna_change,
prot_change, var_class]
maf_list.append(tmp)

Expand Down

0 comments on commit 8358ccc

Please sign in to comment.