This is a test version of Biostars. For the public version, visit https://www.biostars.org.
rsem calculate expression using STAR. Reference genome format?

I am using rsem to calculate expression levels in a dataset of paired end reads. I want to use STAR as the aligner. I have written the command like this:

rsem-calculate-expression --star -p 16 --paired-end DT_01_R1.fastq DT_01_R2.fastq /path/to/reference/genome/ rsem_output/DT_01

I'm pretty sure this will work, What I don't know is this: do I need to generate an annotated reference genome for STAR before running this? I'm using the zebrafish genome, and I have downloaded both the .fasta file and the .gtf file from Ensembl. What do I need to do with these before I run the aligning and expression calculation I've written above? Or do I just point it to the directory containing the .fasta and .gtf files? Thanks very much!

rsem star

Ok great thanks! I thought that was the case, but the manual didn't make it clear to me.

1 answer

You have to prepare the transcriptome reference first, see rsem-prepare-reference. See a tutorial here.

Alternatively, you can map with STAR to the genome (you will have to prepare the index yourself), using STAR --quantMode transcriptomeSAM, and then use STAR's Aligned.toTranscriptome.out.bam output as input to rsem-calculate-expression.

Hi h.mon How we can do quantification with RSEM by using STAR aligned .bam(aligned sepeartely by using STAR) file. Can i get the code?

What is the command you use to align with STAR?

STAR --genomeDir /home/STAR/Indexed_Reference/ --runThreadN 16 \
    --sjdbGTFfile /home/ensemble_GRCh38.77/Homo_sapiens.GRCh38.77.gtf \
    --readFilesIn /home/_1.fastq  /home/2.fastq --sjdbOverhang 101 \
    --outSAMtype BAM SortedByCoordinate \
    --outFileNamePrefix /home/STAR_Output/Mapping/output

Should I mention --quantMode also?

Yes, you should have used --quantMode TranscriptomeSAM --quantTranscriptomeBam IndelSoftclipSingleend.

However, RSEM is finicky with the annotation, I would suggest you follow its tutorial because you may end up with lots of bam files that won't work with RSEM, unless the annotation strictly follows what RSEM expects.

Log in to answer this question.