New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map2cov parses more reads than expected by samtools flagstat #46
Comments
Hi Filip, The command that is being run in the background in order to actually extract the reads is:
where the issue concerning your data is the Bamfilter was meant for paired-end reads since SE reads can easily be grep'ed (which is also faster):
Normally this warning is not a problem, but in your case it is misleading since you have SE reads... will add a check for this. Hope that helps. Cheers, dom |
Thanks, Dominik. I see, I'm too used to work with PE reads that I did not realize the flag will be wrong for the PacBio SE reads. I don't really need to filter the bamfile, I was just checking the bamfilter functionality (unfortunately with a wrong file). Does it mean that read_cov and base_cov values in the .cov file generated by map2cov are correct for a bam file with SE reads and I should just ignore the warning with similar bam files such as from PEARed/FLASHed PE reads? Cheers, |
No worries. Yes,
Remember, that the message is just a "warning" which means that counts are different than expected, based on flagstats. But it is not an "error". The only reason cheers, dom |
Awesome, thanks. Filip |
Hi Dominik,
My issue is similar to #39 where blobtools also reports 'more' reads than expected by flagstat. My bam file with corrected PacBio fasta reads mapped to the reference genome by bwa mem raises a warning with map2cov. It does not seem that the differences in numbers represent multimappings somehow missed by samflags used by map2cov.
samtools view -f 1 -F 1024 -F 256 -F 2048
according to #40I have quite a lot of supplementary reads. Is there maybe a problem in the way how BtIO.py gets the numbers of mapping and total reads? The warning says
Based on samtools flagstat: expected 5031818 reads, 5529014 reads were parsed
but when I run flagstat separately it correctly prints5529014 + 0 mapped (99.71% : N/A)
Thanks!
Filip
My blobtools version is blobtools v0.9.19.
I have only samtools 1.3.1 (+htslib 1.3.1) in my $PATH and this is its flagstat output:
This is the map2cov warning:
The text was updated successfully, but these errors were encountered: