This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract Raw Counts From Sam File

Hi, All

I was performing a de novo assembly of RNA seq data. I aligned my reads to the assembly for each of my samples and generated sam file for each, my question is how am i to extract the raw reads from the sam files? I know couple of tools such as htseq can extract reads with the reference genome, but how about the tools without any reference genome to perform the task of extracting raw reads?

Thanks a lot for any suggestions.

Best,

sam rnaseq counts

2 answers

Sam or bam ?

Do you just want to see your reads + quality ?

If sam, just use

cut -f 10,11 file.sam

if bam

samtools view file.bam | cut -f 10,11

Now if you want your data fasta or fastq, use this hacked version of samtools which produces fastq/a : https://github.com/udo-stenzel/samtools-patched

Thank you so much! Sorry, i could have stated it more clearly. I meant to ask how many raw reads aligned to each of my assembled contigs, so that i can compare the gene expression differences later. the 10, 11 are respective sequence and quality score right?

use eXpress pipeline

awesome, really appreciate it!

Log in to answer this question.