Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • aarvey
    started a topic Bowtie XA, X0, X1 tags in SAM output

    Bowtie XA, X0, X1 tags in SAM output

    Hi Everyone,

    Background: I've been using bowtie and samtools for a couple years. In the past 6 months have I converted to outputing SAM directly from bowtie (using -S) instead of piping it through bowtie2sam.pl. I just realized recently that bowtie doesn't output number of possible mappings (e.g. using tag X0 or X1) in the output.

    Goal: I would like bowtie's ouput to SAM option -S to have the total number of loci to which a read can map. Specifically, tags X0 and/or X1 would be nice to see.

    Question: Is the below proposal a reasonable path to accomplishing the goal? Is there some reason that Bowtie didn't do this by default? Is h.oms appropriate?

    Proposed Fix: When I examined bowtie 0.12.8 source code, I found that an object of class Hit (variable is typically named 'h') has a field 'oms' that is used to track the number of mappable loci. In the bowtie output, there is output of h.oms, but not in SAM output.


    Bowtie's default output in hit.cpp:
    Code:
                    if(!suppress.test(field++)) {
                            if(firstfield) firstfield = false;
                            else ss << '\t';
                            ss << h.oms;
                    }

    Bowtie's -S SAM output in sam.cpp:
    Code:
            // SEQ
            ss << '\t' << h.patSeq;
            // QUAL
            ss << '\t' << h.quals;
            //
            // Optional fields
            //
            // Always output stratum
            ss << "\tXA:i:" << (int)h.stratum;
            // Output MD field
            size_t len = length(h.patSeq);
            int nm = 0;
            int run = 0;
            ss << "\tMD:Z:";

    The modified bowtie -S SAM output in sam.cpp to output the X0 tag for total number of loci that read can map to:
    Code:
            // Always output stratum
            ss << "\tXA:i:" << (int)h.stratum;
            ss << "\tX0:i:" << (int)h.oms;

    Thank you very much for any suggestions or comments you may have on this fix/hack.

    Best, Aaron

Latest Articles

Collapse

  • seqadmin
    Non-Coding RNA Research and Technologies
    by seqadmin




    Non-coding RNAs (ncRNAs) do not code for proteins but play important roles in numerous cellular processes including gene silencing, developmental pathways, and more. There are numerous types including microRNA (miRNA), long ncRNA (lncRNA), circular RNA (circRNA), and more. In this article, we discuss innovative ncRNA research and explore recent technological advancements that improve the study of ncRNAs.

    Nobel Prize for MicroRNA Discovery
    This week,...
    10-07-2024, 08:07 AM
  • seqadmin
    Recent Developments in Metagenomics
    by seqadmin





    Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
    09-23-2024, 06:35 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, 10-02-2024, 04:51 AM
0 responses
101 views
0 likes
Last Post seqadmin  
Started by seqadmin, 10-01-2024, 07:10 AM
0 responses
110 views
0 likes
Last Post seqadmin  
Started by seqadmin, 09-30-2024, 08:33 AM
1 response
114 views
0 likes
Last Post EmiTom
by EmiTom
 
Started by seqadmin, 09-26-2024, 12:57 PM
0 responses
20 views
0 likes
Last Post seqadmin  
Working...
X