You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First a bit of context:
I do want to modify TEtools to be able to use pysam so it can accept bam.
issue:
But my version returns less read than the TE tools version.
Can someone explain to me why my code returns fewer reads? From my understanding, they are equivalent, except for the use of pysam. Note my version returns the exact number of mapped reads (samtools flagstat), TEtools returns more. (does pysam filter secondary per default?)
TEtools version:
with open(self.sam_file) as sam_file_handle:
for line in sam_file_handle:
if line[0] != '@':
line = line.split()
if len(line) > 4 and line[2][0] != '*' and int(line[4]) <= self.max_mapq:
self.rosette.count(str(line[2]), 1)
My version:
with ps.AlignmentFile(self.sam_file, open_mode) as sam_file_handle:
for aln in sam_file_handle.fetch(until_eof=True):
if aln.is_mapped and aln.mapping_quality <= self.max_mapq:
self.rosette.count(aln.reference_name, 1)
Any help warmly appreciated.
Romain,
The text was updated successfully, but these errors were encountered:
Hi,
First a bit of context:
I do want to modify TEtools to be able to use pysam so it can accept bam.
issue:
But my version returns less read than the TE tools version.
Can someone explain to me why my code returns fewer reads? From my understanding, they are equivalent, except for the use of pysam. Note my version returns the exact number of mapped reads (samtools flagstat), TEtools returns more. (does pysam filter secondary per default?)
TEtools version:
My version:
Any help warmly appreciated.
Romain,
The text was updated successfully, but these errors were encountered: