Commit d0cbe4a4 authored by Christophe Klopp's avatar Christophe Klopp
Browse files

turned all deletion longer than 9 bases in introns and filtered bam with -q 2

parent 0f83d035
......@@ -48,7 +48,7 @@ class Miniannotator:
minimap = [self.conf["minimap2"], "-ax", "splice", "-t", str(self.conf["threads"]), self.reference,
self.assembly]
samtools_sort = [self.conf["samtools"], "sort"]
samtools_bam = [self.conf["samtools"], "view", "-b", "-o", map_file]
samtools_bam = [self.conf["samtools"], "view", "-b", "-q", "2", "-o", map_file]
p1 = subprocess.Popen(minimap, stdout=subprocess.PIPE)
p2 = subprocess.Popen(samtools_sort, stdin=p1.stdout, stdout=subprocess.PIPE)
p1.stdout.close()
......@@ -128,8 +128,15 @@ class Miniannotator:
"exon": exon_nb})
qstart += length
elif operation == 2: # DELETION
indels.append({"type": "del", "start": exon_end + 1, "end": exon_end + length, "exon": exon_nb}) # 1-based coords
exon_end += length
if length < 10
indels.append({"type": "del", "start": exon_end + 1, "end": exon_end + length, "exon": exon_nb}) # 1-based coords
exon_end += length
else
exons.append({"start": exon_start + 1, "end": exon_end, "nb": exon_nb}) # 1-based coords
complete = True
exon_nb += 1
exon_start = exon_end + length
exon_end = exon_start
elif operation == 3: # SPLIT
exons.append({"start": exon_start + 1, "end": exon_end, "nb": exon_nb}) # 1-based coords
complete = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment