text: user926: Could some one please help me with understanding how to generate the ribosomal interval list that is required to when using picard metrics this step
  java -jar picard.jar CollectRnaSeqMetrics \
        I=input.bam \
        O=output.RNA_Metrics \
        REF_FLAT=ref_flat.txt \
        STRAND=SECOND_READ_TRANSCRIPTION_STRAND \
        RIBOSOMAL_INTERVALS=ribosomal.interval_list
  
  I have a couple of bam files that were aligned using mm9 ensembl gtf as annotation, i did a lot of search and found this link Ribosomal Intervals For Collectrnaseqmetrics but this link or any other source does not explain how to produce or find ribo interval list from ensembl annotation
  
  user77: At least with Ensembl annotations, you can grep rRNA foo.gtf > rRNA.gtf to get the annotated rRNAs. Note however, that the 45S cassette isn't in the mouse reference genome, so you'll never have alignments to 18S, 5.8S, or 28S rRNA. I always get the feeling that the Collect*Metrics programs are made with human sequences in mind, since the cassette is included in the human reference genome.
  Anyway, while you can use the annotation and reference sequence to make picard happy, make sure to append the Rn45S sequence to your genome if you want to actually measure rRNA levels. In my experience this is only useful for rRNA-depleted samples, since the rates can vary wildly there.
  Edit: To make a file compatible with picard's "interval list", one can do the following with the GTF file:
  grep rRNA foo.gtf | awk 'BEGIN{OFS="\t"}{print $1, $4-1, $5}' > foo.bed
  
  According to the picard documentation a BED file can be used as input and the above awk code extracts the appropriate columns and switches to 0-based coordinates used in the BED format.
  
original_text: 926: <p>Could some one please help me with understanding how to generate the ribosomal interval list that is required to when using picard metrics this step</p>
  
  <pre><code>java -jar picard.jar CollectRnaSeqMetrics \
        I=input.bam \
        O=output.RNA_Metrics \
        REF_FLAT=ref_flat.txt \
        STRAND=SECOND_READ_TRANSCRIPTION_STRAND \
        RIBOSOMAL_INTERVALS=ribosomal.interval_list
  </code></pre>
  
  <p>I have a couple of bam files that were aligned using mm9 ensembl gtf as annotation, i did a lot of search and found this link Ribosomal Intervals For Collectrnaseqmetrics but this link or any other source does not explain how to produce or find ribo interval list from ensembl annotation</p>
   77: <p>At least with Ensembl annotations, you can <code>grep rRNA foo.gtf &gt; rRNA.gtf</code> to get the annotated rRNAs. Note however, that the <a href="https://www.ncbi.nlm.nih.gov/gene/100861531" rel="nofollow noreferrer">45S cassette</a> isn't in the mouse reference genome, so you'll never have alignments to 18S, 5.8S, or 28S rRNA. I always get the feeling that the Collect*Metrics programs are made with human sequences in mind, since the cassette is included in the human reference genome.</p>
  
  <p>Anyway, while you can use the annotation and reference sequence to make picard happy, make sure to append the Rn45S sequence to your genome if you want to actually measure rRNA levels. In my experience this is only useful for rRNA-depleted samples, since the rates can vary wildly there.</p>
  
  <p><strong>Edit</strong>: To make a file compatible with picard's "interval list", one can do the following with the GTF file:</p>
  
  <pre><code>grep rRNA foo.gtf | awk 'BEGIN{OFS="\t"}{print $1, $4-1, $5}' &gt; foo.bed
  </code></pre>
  
  <p>According to the <a href="https://gatkforums.broadinstitute.org/gatk/discussion/1319/collected-faqs-about-interval-lists" rel="nofollow noreferrer">picard documentation</a> a BED file can be used as input and the above <code>awk</code> code extracts the appropriate columns and switches to 0-based coordinates used in the BED format.</p>
  