Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Can I use htseq --samout file for subsequent annotation?

    Hi,
    So briefly what I'm doing is that:
    -->I'm annotating my smallRNA sequencing data using htseq-count.
    -->I'm using original.sam to annotate miRNAs and using -o to get the out.sam
    -->From that out.sam I can grep out the 'no_feature' reads/rows.

    The question:
    Maybe a stupid idea but is there any way I could use this out_no_feature.sam file for another round of htseq annotationagainst e.g. rRNA.gtf?

    As the out_no_feature.sam does not have a header, is there any way to reheader it or use the header from the original.sam file? Also, I guess I need to remove the last column "XF:Z:__no_feature" from the out_no_feature.sam

    Thanks ahead for comments and help

  • #2
    Hi Heso,

    You can use RSeQC's bam2fq.py to make a fastq file out of your "out_no_feature.sam".
    In order to get the header into your files, use:
    Code:
    samtools view -SH original.sam > header.txt
    Then use something like:
    Code:
    cat header.txt out_no_feature.sam | samtools view -bSh - > out_no_feature.bam
    . In case it was not sorted according to the position, you may need to include a samtools sort into the pipe.
    The "XF:Z"-field does not influence the downstream analysis. But since you have only alignments with this field will not give you any further information.

    Cheers,
    Michael
    Last edited by Michael.Ante; 05-18-2016, 03:42 AM. Reason: Typo

    Comment


    • #3
      Originally posted by Michael.Ante View Post
      Hi Heso,

      You can use RSeQC's bam2fq.py to make a fastq file out of your "out_no_feature.sam".
      In order to get the header into your files, use:
      Code:
      samtools view -SH original.sam > header.txt
      Then use something like:
      Code:
      cat header.txt out_no_feature.sam | samtools view -bSh - > out_no_feature.bam
      . In case it was not sorted according to the position, you may need to include a samtools sort into the pipe.
      The "XF:Z"-field does not influence the downstream analysis. But since you have only alignments with this field will not give you any further information.

      Cheers,
      Michael

      Thanks Michael, it worked perfectly!!

      /Helena

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Best Practices for Single-Cell Sequencing Analysis
        by seqadmin



        While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
        Yesterday, 07:15 AM
      • seqadmin
        Latest Developments in Precision Medicine
        by seqadmin



        Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

        Somatic Genomics
        “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
        05-24-2024, 01:16 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Today, 06:58 AM
      0 responses
      10 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 08:18 AM
      0 responses
      15 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 08:04 AM
      0 responses
      15 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 06-03-2024, 06:55 AM
      0 responses
      13 views
      0 likes
      Last Post seqadmin  
      Working...
      X