output all reads in sam file

Issue #59 resolved
fmughal2 created an issue

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)

  1. ptlcc

    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

  2. brbloemen

    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:

    1. A small, “ground truth” database constructed from the mock community reference sequences

      samtools view -c BBl_pure_GMSspikeI_CB_RAD_GMSspikeIdb.bam

      1. this returns 700804 alignments
    2. A large database

      samtools view -c BBl_pure_GMSspikeI_CB_RAD_DTUdb.bam

      1. this returns only 625070 alignments

    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

  3. ptlcc

    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

  4. Log in to comment