Body: <p>I would like to compare gene level counts (FPKM) from StringTie output. I understand FPKM is outdated but my PI prefers to use it as a reference/guide in conjunction with the normalised counts from DESeq2.</p>
  <p>I processed my samples by first running StringTie on my aligned read files (*.bam) with reference to the ensemble GTF:</p>
  <pre><code>stringtie sample$_{i}.sorted.bam -p 12 -G reference.gtf --rf -o $OUT_DIR/sample_${i}/sample_${i}.gtf -v -B
  </code></pre>
  <p>I left out the <code>-e</code> flag in order for novel transcripts to be assembled.</p>
  <p>I then merged the individual GTFs using:</p>
  <pre><code>stringtie --merge -G referece.gtf -o merged.gtf -p 12 -i assembly_GTF_list.txt
  </code></pre>
  <p>Finally I re-run StringTie using the <code>merged.gtf</code> as reference to obtain expression values:</p>
  <pre><code>stringtie sample_${i}.sorted.bam -p 12 -G merged.gtf --rf -o sample_{i}.gtf -v -e -B -A sample_{i}.gene_abund.tab
  </code></pre>
  <p>However, in the <code>gene_abund.tab</code> of one sample, I find that the same Gene ID is quantified twice (albeit with different coordinates):</p>
  <pre><code>Gene ID Gene Name       Reference       Strand  Start   End     Coverage        FPKM    TPM
  ENSG00000225657 LINC01716       20      +       56577563        56596126        0.000000        0.000000        0.000000
  ENSG00000225657 LINC01716       20      +       56596310        56598621        0.0     0.0     0.0
  </code></pre>
  <p>These are the transcripts corresponding to 'ENSG00000225657' in the reference gtf I used:</p>
  <pre><code>20      havana  transcript      56577563        56596126        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000434176&quot;; gene_name &quot;LINC01716&quot;; ref_gene_id &quot;ENSG00000225657&quot;;
  20      havana  exon    56577563        56577612        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000434176&quot;; exon_number &quot;1&quot;; gene_name &quot;LINC01716&quot;;
  20      havana  exon    56577742        56577950        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000434176&quot;; exon_number &quot;2&quot;; gene_name &quot;LINC01716&quot;;
  20      havana  exon    56579391        56579553        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000434176&quot;; exon_number &quot;3&quot;; gene_name &quot;LINC01716&quot;;
  20      havana  exon    56580201        56580335        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000434176&quot;; exon_number &quot;4&quot;; gene_name &quot;LINC01716&quot;;
  20      havana  exon    56595063        56595130        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000434176&quot;; exon_number &quot;5&quot;; gene_name &quot;LINC01716&quot;;
  20      havana  exon    56596054        56596126        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000434176&quot;; exon_number &quot;6&quot;; gene_name &quot;LINC01716&quot;;
  20      havana  transcript      56596310        56598621        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000437350&quot;; gene_name &quot;LINC01716&quot;; ref_gene_id &quot;ENSG00000225657&quot;;
  20      havana  exon    56596310        56596488        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000437350&quot;; exon_number &quot;1&quot;; gene_name &quot;LINC01716&quot;;
  20      havana  exon    56598503        56598621        .       +       .       gene_id &quot;ENSG00000225657&quot;; transcript_id &quot;ENST00000437350&quot;; exon_number &quot;2&quot;; gene_name &quot;LINC01716&quot;;
  </code></pre>
  <p>I assumed that gene level counts would be the aggregation of all transcript level counts. However, it looks like StringTie is reporting the transcript level counts instead. Have I missed out a step here? Or is the <code>gene_abund.tab</code> not meant to contain gene-level counts?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-11-01T09:19:09.757Z
Comments.Text: You have two transcripts for that gene, so presumably the output is one line per transcript, right? If you really want to treat them as one things, can't you just sum up the values?
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-11-01T11:18:35.877Z
Comments.Text: @terdon yes, I guess I could sum them. However, I was expecting these to be gene level counts so I'm not sure if I've messed up something in the workflow.
Comments.UserDisplayName: nattzy
Tags: <stringtie>
Title: Why does gene abundance table from StringTie output the same gene ID twice?
ThreadText: # Why does gene abundance table from StringTie output the same gene ID twice?
  
  (Asked by: username_0 on 2022-11-01)
  
  I would like to compare gene level counts (FPKM) from StringTie output. I understand FPKM is outdated but my PI prefers to use it as a reference/guide in conjunction with the normalised counts from DESeq2.
  
  I processed my samples by first running StringTie on my aligned read files (\*.bam) with reference to the ensemble GTF:
  
  ```
  stringtie sample$_{i}.sorted.bam -p 12 -G reference.gtf --rf -o $OUT_DIR/sample_${i}/sample_${i}.gtf -v -B
  
  ```
  
  I left out the `-e` flag in order for novel transcripts to be assembled.
  
  I then merged the individual GTFs using:
  
  ```
  stringtie --merge -G referece.gtf -o merged.gtf -p 12 -i assembly_GTF_list.txt
  
  ```
  
  Finally I re-run StringTie using the `merged.gtf` as reference to obtain expression values:
  
  ```
  stringtie sample_${i}.sorted.bam -p 12 -G merged.gtf --rf -o sample_{i}.gtf -v -e -B -A sample_{i}.gene_abund.tab
  
  ```
  
  However, in the `gene_abund.tab` of one sample, I find that the same Gene ID is quantified twice (albeit with different coordinates):
  
  ```
  Gene ID Gene Name       Reference       Strand  Start   End     Coverage        FPKM    TPM
  ENSG00000225657 LINC01716       20      +       56577563        56596126        0.000000        0.000000        0.000000
  ENSG00000225657 LINC01716       20      +       56596310        56598621        0.0     0.0     0.0
  
  ```
  
  These are the transcripts corresponding to 'ENSG00000225657' in the reference gtf I used:
  
  ```
  20      havana  transcript      56577563        56596126        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000434176"; gene_name "LINC01716"; ref_gene_id "ENSG00000225657";
  20      havana  exon    56577563        56577612        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000434176"; exon_number "1"; gene_name "LINC01716";
  20      havana  exon    56577742        56577950        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000434176"; exon_number "2"; gene_name "LINC01716";
  20      havana  exon    56579391        56579553        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000434176"; exon_number "3"; gene_name "LINC01716";
  20      havana  exon    56580201        56580335        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000434176"; exon_number "4"; gene_name "LINC01716";
  20      havana  exon    56595063        56595130        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000434176"; exon_number "5"; gene_name "LINC01716";
  20      havana  exon    56596054        56596126        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000434176"; exon_number "6"; gene_name "LINC01716";
  20      havana  transcript      56596310        56598621        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000437350"; gene_name "LINC01716"; ref_gene_id "ENSG00000225657";
  20      havana  exon    56596310        56596488        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000437350"; exon_number "1"; gene_name "LINC01716";
  20      havana  exon    56598503        56598621        .       +       .       gene_id "ENSG00000225657"; transcript_id "ENST00000437350"; exon_number "2"; gene_name "LINC01716";
  
  ```
  
  I assumed that gene level counts would be the aggregation of all transcript level counts. However, it looks like StringTie is reporting the transcript level counts instead. Have I missed out a step here? Or is the `gene_abund.tab` not meant to contain gene-level counts?
  
  **Tags:** stringtie
  
  > **Comments:**
  > **username_1**: You have two transcripts for that gene, so presumably the output is one line per transcript, right? If you really want to treat them as one things, can't you just sum up the values?  
  > **username_0**: @username_1 yes, I guess I could sum them. However, I was expecting these to be gene level counts so I'm not sure if I've messed up something in the workflow.  
  
  ---
  
  ## 0 answers
  
  