The symmetry you're observing between the forward (FW) and reverse (RV) strands in your RNA-seq BAM file is unusual because, in typical RNA-seq data, the strands should not be perfectly symmetrical. There are several potential reasons for this issue, and I'll guide you through some troubleshooting steps to identify and resolve the problem.
Potential Causes and Solutions
-
Strandedness Information:
- Cause: The BAM file might not contain strand information, or the strand information might be incorrect.
- Solution: Check the BAM file's header for strandedness information. You can use
samtools view -H your_file.bam to view the header. Look for @PG tags that might indicate whether the data is stranded and the type of strandedness (forward, reverse, or unstranded).
- Unstranded: If the library is unstranded, reads will map to both strands, leading to symmetry.
- Stranded: For stranded libraries, reads should predominantly map to one strand depending on the protocol (e.g., dUTP or dvUP).
-
Incorrect Strand Assignment:
- Cause: During alignment or preprocessing, strands may have been incorrectly assigned.
- Solution: Recheck the alignment parameters and ensure that the aligner (e.g., STAR, HISAT2) was run with the correct
--stranded option. For example, with STAR you should use --twopassMode Basic --outSAMstrandField intronMotif for stranded libraries.
-
Visualisation Issues:
-
Cause: The tool or script used to plot the strands might have a bug or might not be handling strand information correctly.
-
Solution: Verify your plotting script. Ensure it correctly differentiates between the FW and RV strands. You can use established tools like Integrative Genomics Viewer (IGV) or DeepTools plotCoverage to visualise strand-specific coverage.
-
Here is an example using DeepTools:
# Generate a bigWig file for the forward strand
samtools view -F 16 your_file.bam | bamCoverage -b - -o fw.bigWig --skipNAs --extendReads
# Generate a bigWig file for the reverse strand
samtools view -f 16 your_file.bam | bamCoverage -b - -o rv.bigWig --skipNAs --extendReads
# Plot the coverage
plotProfile -b fw.bigWig,rv.bigWig -o strand_coverage.png --labels "FW" "RV"
-
Data Quality:
- Cause: The RNA-seq data itself may have an issue, such as degradation or contamination, leading to artificial symmetry.
- Solution: Assess the quality of your RNA-seq data using tools like
FastQC on the fastq files before alignment. Also check the alignment rates and distribution using MultiQC after alignment.
-
Genome Annotation:
- Cause: If you are plotting per-gene coverage, incorrect or incomplete genome annotation might cause apparent symmetry.
- Solution: Ensure you are using the correct and up-to-date genome annotation. Double-check gene models to ensure they are correctly oriented.
Diagnostic Steps
-
Check Strand Information:
samtools view -H your_file.bam | grep "^@PG"
-
Count Reads per Strand:
# Count forward strand reads
samtools view your_file.bam | awk '($2 & 16) == 0 {print}' | wc -l
# Count reverse strand reads
samtools view your_file.bam | awk '($2 & 16) != 0 {print}' | wc -l
-
Visualise with IGV:
- Load your BAM file into IGV.
- Check the strand-specific read distribution on a few genes known to be expressed. IGV will show reads on the correct strand and help you verify if the symmetry is an artefact of visualisation.
-
Re-align (if necessary):
If you find that the strand information is incorrect, you may need to re-align your reads with the correct strandedness parameters.
Example of Correct Stranded Alignment with STAR
If you need to re-align your reads, here is an example command for STAR with strandedness:
STAR --genomeDir /path/to/genomeDir \
--readFilesIn read1.fastq read2.fastq \
--readFilesCommand zcat \
--outSAMstrandField intronMotif \
--twopassMode Basic \
--outFileNamePrefix aligned/ \
--outSAMtype BAM SortedByCoordinate
--outSAMstrandField intronMotif: This option ensures that strand information is correctly recorded in the BAM file.
By following these steps, you should be able to diagnose why your FW and RV strands appear symmetrical and take appropriate actions to correct the issue.