SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to iterate over reads in file with HTSeq? thh32 Bioinformatics 2 06-07-2014 04:29 AM
Is this a valid GFF3 file for HTSeq? bernardo_bello RNA Sequencing 1 10-18-2013 01:46 AM
HTseq:Adding GTF annotation to SAM alignment mbobro2 RNA Sequencing 40 12-11-2012 11:43 AM

Reply
 
Thread Tools
Old 05-18-2016, 02:12 AM   #1
heso
Member
 
Location: Sweden

Join Date: May 2014
Posts: 19
Default 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
heso is offline   Reply With Quote
Old 05-18-2016, 03:41 AM   #2
Michael.Ante
Senior Member
 
Location: Vienna

Join Date: Oct 2011
Posts: 120
Default

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 at 03:42 AM. Reason: Typo
Michael.Ante is offline   Reply With Quote
Old 05-18-2016, 06:38 AM   #3
heso
Member
 
Location: Sweden

Join Date: May 2014
Posts: 19
Default

Quote:
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
heso is offline   Reply With Quote
Reply

Tags
htseq-count

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 12:01 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO