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!


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

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`.


  [1]: http://deweylab.biostat.wisc.edu/rsem/rsem-prepare-reference.html
  [2]: https://github.com/bli25broad/RSEM_tutorial