Skip to content

Commit

Permalink
modify edlib realignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ken0-1n committed Mar 18, 2021
1 parent 392120d commit 88dd0ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions genomon_mutation_filter/realignment_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def math_log_fisher_pvalue(self,fisher_pvalue):


############################################################
def extractRead(self, bamfile, chr,start,end, output):
def extractRead(self, bamfile, chr,start,end, output, flag_blat):

with open(output, 'w') as hOUT:
for read in bamfile.fetch(chr,start,end):
Expand All @@ -63,7 +63,7 @@ def extractRead(self, bamfile, chr,start,end, output):
flags = format(read_flag, "#014b")[:1:-1]

tempSeq = ""
if flags[4] == "1":
if flags[4] == "1" and flag_blat:
tempSeq = "".join(self.complement.get(base) for base in reversed(str(read.seq)))
else:
tempSeq = read.seq
Expand Down Expand Up @@ -235,7 +235,7 @@ def edlib_read_count(self, samfile, chr, start, end, output):
############################################################
def count_reads(self, samfile, chr, start, end, output, thread_idx):
# extract short reads from tumor sequence data around the candidate
self.extractRead(samfile,chr,start,end,output + ".tmp.fa")
self.extractRead(samfile,chr,start,end,output + ".tmp.fa", self.uses_blat)

if self.uses_blat:
return self.blat_read_count(samfile, chr, start, end, output, thread_idx)
Expand Down
2 changes: 1 addition & 1 deletion genomon_mutation_filter/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /usr/bin/env python

__version__ = '0.3.0'
__version__ = '0.3.1'

0 comments on commit 88dd0ee

Please sign in to comment.