Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cascoamarillo
    Senior Member
    • Oct 2010
    • 164

    #1

    Get antisense mapped reads

    Hi,

    I'm looking for some workflow to obtain the reads which are mapped to the antisense features (gff) of a reference.
    I started using HTseq_count (which is a great tool), that takes my sam and gff files, and with the obtion -s no/yes I do obtain (no stranded minus stranded) the the number of antisense reads; but I need the reads themselves (sam or fasta). So, is there a way from a sam file (output from HTseq - no stranded reads) to take off a subset of reads (stranded sam output) and get the final sam file with the antisense pool? Maybe there are better ways to do this.

    Thanks
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Have you tried just swapping the strands in the GFF file and then running htseq-count on it (with "-s yes"). If you need the actual reads then just use the "-o" option (possibly followed by grepping the output).

    Comment

    • cascoamarillo
      Senior Member
      • Oct 2010
      • 164

      #3
      Unfortunately, when I try this (get sam-output with option "-s yes" using two strand-swapped GFF files) the sam outputs are completely the same (but the output counts are different, so the GFF files are perfectly swapped). The sam file records all the input sam reads (sense and antisense) that are located within the GFF features. Any more ideas?
      Thanks

      Comment

      • cascoamarillo
        Senior Member
        • Oct 2010
        • 164

        #4
        In other words; is there a way to generate a fasta file from a sam/bam aligment considering if a read overlaps with a GFF feature. I mean, the output sam from HTSeq looks like this:

        Code:
        EAS1745:7:1:13167:1095/1	0	scaffold_665	35984	255	28M	*	0	0	NNNNNNNNNNNNNNNNN	IIIIIIIIIIIIIIIIIIIIIIIIIIII	XA:i:0	MD:Z:28	NM:i:0	XF:Z:no_feature
        EAS1745:7:1:9468:1170/1	0	scaffold_313	108426	255	27M	*	0	0	NNNNNNNNNNNNNNNNNN	IIIIIIIIIIIIIIIIIIIIIIIIIII	XA:i:0	MD:Z:27	NM:i:0	XF:Z:Feature#69
        So I'm only interested in taking the reads with a feature flag (and rule out the no_feature/not_aligned reads). thanks

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          You can filter for "Feature" over "no_feature" and "not_aligned" with a simple grep. For generating a fasta file, I suppose that depends on if you want each entry in the multifasta file to be a read or a covered region. If you want an entry per read, you could probably just pipe the output of your grep command to awk or sed (or perl or something else if you prefer). Otherwise, you'd need to do a pileup and process that (it's likely someone has already written a script to do that if you do a bit of searching). You could also N-mask non-covered regions in a similar manner, if that's useful for you.

          Comment

          • cascoamarillo
            Senior Member
            • Oct 2010
            • 164

            #6
            Thanks for the advise.
            I'm fine with the reads in a fasta file. Though I'm not an expert in this thing, this seems to work:
            | awk '{OFS="\t"; if($15 != "XF:Z:no_feature") print ">"$1"\n"$10}' - > file.fasta

            Comment

            Latest Articles

            Collapse

            • kinpict.com
              Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by kinpict.com
              The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
              Today, 06:37 PM
            • SEQadmin2
              16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by SEQadmin2





              NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
              10-30-2026, 06:46 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 11-12-2026, 07:59 AM
            0 responses
            27 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-05-2026, 09:25 AM
            0 responses
            35 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-03-2026, 11:54 AM
            2 responses
            56 views
            0 reactions
            Last Post kinpict.com  
            Started by SEQadmin2, 10-28-2026, 09:57 AM
            0 responses
            175 views
            0 reactions
            Last Post SEQadmin2  
            Working...