output all reads in sam file
Hello,
Is there a way to output all reads to the sam file, mapped or unmapped? Currently I only see either unmapped reads or reverse strand mapped reads in the sam?
Thank you,
-Fizza
Comments (4)
-
-
Hi Philip,
I encountered a similar issue.
My original fastq file has 701579 (nanopore) reads, and I mapped it to two databases, using a KMA command of the following structure:
kma -i file.fastq.gz -o output_filename -t_db database -tmp /home/brbloemen/workdir \ -mem_mode -bc 0.7 -bcNano -ID 0.0 -ef -proxi 0.9 -na -nc -1t1 -ca -verbose 2 -t 45 \ -sam > output_filename.sam
The sample was a defined mock community, and the reads were mapped against two databases. Using samtools view -c to count the alignments:
-
A small, “ground truth” database constructed from the mock community reference sequences
samtools view -c BBl_pure_GMSspikeI_CB_RAD_GMSspikeIdb.bam
- this returns
700804
alignments
- this returns
-
A large database
samtools view -c BBl_pure_GMSspikeI_CB_RAD_DTUdb.bam
- this returns only
625070
alignments
- this returns only
Interestingly, both resulting samfiles do contain unmapped reads. (each about 1.5% unmapped reads).
I’m curious as to where this loss of reads could happen.
Thank you,
Bram
-
-
Hi Bram
It should be fixed in the latest version (1.4.2). The issue only affected unmapped reads, where some where missed.
Best,
Philip -
- changed status to resolved
- Log in to comment
Hi Fizza
If you use the “-sam” option without an argument it should give both mapped and unmapped.
Which additional arguments did you use.
Best,
Philip