I am trying to update an old RNA-seq to a newer genome version for Solanum lycopersicum (tomato). They are not paired ends, they are single-end sequencing (54bp) performed on 18 samples, however there were 36 fastq files on NCBI archives. I merged the matching files and generated 18 new fastq files. I then used STAR to align them to the new reference genome, then I used ITAG4 gff model to map annotations. I got 95% unique reads, with only 413 splice sites of low confidence. However when I use these files in DeSeq2 to generate TPMs, most genes shows 14 splice sites. These seem like an alignment artifact. How can I do a sanity check, or how do I troubleshoot where in the process it went wrong.
1 answer
Hi bm.nina ,
OK first things first. For DESeq2, you want properly summarized gene-level counts, not TPMs. If using featureCounts, a safer approach is to convert the ITAG4 GFF3 to a clean GTF, confirm that exon rows contain gene_id, and then count exons grouped by gene_id. For example, after conversion: if your real goal is TPMs rather than differential expression, bypass DESeq2 and use Salmon, kallisto, or another transcript-quantification workflow. Salmon outputs TPM, effective length, and estimated read counts; kallisto also estimates transcript abundance. If the final goal is differential expression from Salmon/kallisto output, import estimated counts with tximport and then run DESeq2; do not give TPMs to DESeq2 as counts.
Beyond that there are a couple issues, I think. I would separate three steps here: STAR alignment, feature counting, and DESeq2. DESeq2 is neither a splice-site discovery tool nor a TPM-generation tool: it expects a feature-by-sample matrix of un-normalized or estimated counts for differential expression. If you are seeing “14 splice sites” per gene in something you are passing to DESeq2, that structure probably came from the annotation/counting/import step, not from DESeq2 itself. STAR’s splice-junction output and gene-count output are different things. SJ.out.tab reports splice junctions, while ReadsPerGene.out.tab from --quantMode GeneCounts reports gene-level counts with columns for unstranded and stranded interpretations. So I would debug the “413 splice sites” and the “14 splice sites per gene” issues separately.
Also,
featureCounts -t exon -g gene_id -s 0 -a ITAG4.0_gene_models.gtf -o counts.txt *.bam
Set -s according to strandedness: 0 unstranded, 1 stranded, 2 reverse-stranded. Since these are single-end reads, do not use paired-end options.
GTF files usually carry gene_id and transcript_id attributes on exon rows. GFF3 uses a hierarchy with ID and Parent, and in many GFF3 files the Parent of an exon is a transcript, not the gene. Therefore, a counting tool can easily produce transcript- or exon-level rows if the grouping attribute is wrong.³ STAR can use GFF3 for splice-junction annotation during genome generation, for example with:
--sjdbGTFfile annotation.gff3 \
--sjdbGTFfeatureExon exon \
--sjdbGTFtagExonParentTranscript Parent \
--sjdbOverhang 53
For 54 bp reads, --sjdbOverhang 53 follows STAR’s read-length-minus-one recommendation. This helps STAR interpret exon-to-transcript relationships, but it does not guarantee that downstream featureCounts grouping is gene-level.
Log in to answer this question.
where does the 'there were 36 files on NCBI" comes from? are you sure they were not paired-end?
(you can doublecheck on ENA perhaps?)
I appreciate the double check, I was also surprised. Pretty sure its single, here is an except from the method section of the paper:
"Two biological replicates were sequenced and analyzed for each of the nine tissue–treatment combinations. Single-end sequencing was performed on the 18 samples by the Illumina GAIIX platform, generating 165,894,496 1×54bp reads, totaling 8.99 Gbp. Raw sequence data is available for download at NCBI Sequence Read Archive under the number SRA058709."
ENA does say the library layout is single
excellent, that's sorted out then :)
Can you comment on the above statement? I don't get the link between Deseq2/TPMs and splice sites
I am not super familiar with STAR or its processes, so once I finished the alignment the only way I could figure out how to view gene expression was plugging the files into DESeq2 to spit out an excel I could work with.
Something probably went wrong before DESeq2, I just couldn’t see it until I got to that point.
I’ve done some digging and I realized I forgot to convert the gff file to a gtf file, so I am currently making a new index to see if that helps. I will update on whether that fixes it or not.
Any thoughts or suggestions are still welcome!
SRA058709 looks like a really old dataset (from 2015). It is also an odd 54 bp single end data.
Is there a specific reason you are using this particular dataset? You may be better served by using a newer dataset that would likely have much better quality data.
What is your overall goal? Do you want to get differential transcript usage, then use LauferVA's approach. If you want to analyse differential exon usage, you can use the DEXSeq pipeline.
The difference between the STAR-based splice detection and the TPM-counts in DESeq2, is that STAR looks for the junction-spanning reads which might only be 413 in this case. For gene/transcript counting the reads per exon are counted and summarised on the requested level without the information which exon-exon-junction is supported by reads. As transcripts of the same gene share a couple of exons, all these transcripts are somwhat represented in the final output.