SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   Can I use htseq --samout file for subsequent annotation? (http://seqanswers.com/forums/showthread.php?t=69205)

heso 05-18-2016 02:12 AM

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 :)

Michael.Ante 05-18-2016 03:41 AM

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

heso 05-18-2016 06:38 AM

Quote:

Originally Posted by Michael.Ante (Post 194758)
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


All times are GMT -8. The time now is 03:28 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.