rsem-parse-alignments failed due to bowtie-produced partial alignments
1
0
Entering edit mode
3.1 years ago
Angel ▴ 10

Hi guys,

I'm getting a weird error running rsem-calculate-expression, I hope you can point me in the right direction.

RSEM version: 1.3.0 Bowtie version: 1.2.0

RSEM indexes (for bowtie and bowtie2) were generated as follows:

rsem-prepare-reference --gtf /home/aalvarez/scratch/Genomes/Homo_sapiens/GRCh38.95/Homo_sapiens.GRCh38.95.gtf --bowtie --bowtie-path /software/UHTS/Aligner/bowtie/1.2.0/bin --bowtie2 --bowtie2-path /software/UHTS/Aligner/bowtie2/2.3.4.1/bin /home/aalvarez/scratch/Genomes/Homo_sapiens/GRCh38.95/Homo_sapiens.GRCh38.dna_sm.primary_assembly.fa GRCh38.95;


RSEM calculate expression:

for sample in 60 67 69 73 75 79;
do echo "RSEM-mapping sample Glioma-Tumor-$sample"; rsem-calculate-expression -p 32 --time --output-genome-bam --sampling-for-bam --bowtie-e 60 --bowtie-m 30 --bowtie-chunkmbs 2048 --estimate-rspd --calc-ci --ci-memory 32768 --fragment-length-mean 100 --fragment-length-sd 50 --paired-end <(zcat Glioma-Tumor-$sample-CD45N_R1.cutadapt.fastq.gz) <(zcat Glioma-Tumor-$sample-CD45N_R2.cutadapt.fastq.gz) /home/aalvarez/scratch/Genomes/Homo_sapiens/GRCh38.95/indexes/RSEM/GRCh38.95 /home/aalvarez/scratch/Results/RSEM_output/GBM-$sample;
done;


I'm getting this STDOUT:

RSEM-mapping sample Glioma-Tumor-60

bowtie -q --phred33-quals -n 2 -e 60 -l 25 -I 1 -X 1000 --chunkmbs 2048 -p 32 -a -m 30 -S /home/aalvarez/scratch/Genomes/Homo_sapiens/GRCh38.95/indexes/RSEM/GRCh38.95 -1 /dev/fd/63 -2 /dev/fd/62 | samtools view -S -b -o /home/aalvarez/scratch/Results/RSEM_output/GBM-60.temp/GBM-60.bam -

rsem-parse-alignments /home/aalvarez/scratch/Genomes/Homo_sapiens/GRCh38.95/indexes/RSEM/GRCh38.95 /home/aalvarez/scratch/Results/RSEM_output/GBM-60.temp/GBM-60 /home/aalvarez/scratch/Results/RSEM_output/GBM-60.stat/GBM-60 /home/aalvarez/scratch/Results/RSEM_output/GBM-60.temp/GBM-60.bam 3 -tag XM

"rsem-parse-alignments /home/aalvarez/scratch/Genomes/Homo_sapiens/GRCh38.95/indexes/RSEM/GRCh38.95 /home/aalvarez/scratch/Results/RSEM_output/GBM-60.temp/GBM-60 /home/aalvarez/scratch/Results/RSEM_output/GBM-60.stat/GBM-60 /home/aalvarez/scratch/Results/RSEM_output/GBM-60.temp/GBM-60.bam 3 -tag XM" failed! Plase check if you provide correct parameters/options for the pipeline!

And this STDERR:

# reads processed: 34229472

# reads with at least one reported alignment: 11693941 (34.16%)

# reads that failed to align: 22534237 (65.83%)

# reads with alignments suppressed due to -m: 1294 (0.00%) Reported 42908411 paired-end alignments to 1 output stream(s)

Read GWNJ-0901:335:GW1811101598:1:1101:15351:1889: RSEM currently does not support partial alignments!

Index generation worked fine and the bamfile is properly generated as well. However, RSEM crashes presumably due to the above-mentioned error. So I guess the question is how can I prevent bowtie from generating partial alignments?

Thank you!

rsem bowtie • 2.0k views
1
Entering edit mode
3.1 years ago

I think the trick would be to filter the output you have to remove problematic reads.

I'm more familiar with using STAR as input to RSEM, but STAR specifically makes its transcriptome alignment friendly for RSEM by removing reads which align with soft-clipping, so this might be what's tripping you up here. I bet if you dig into how RSEM calls bowtie when it does the alignment for you, you'll see some step where soft clipping is disallowed or filtered away. You might try removing reads with "S" in the CIGAR string. Or try using STAR, whose output was specifically designed to be RSEM-friendly.

0
Entering edit mode

Thank you for your answer. I was very surprised that bowtie, the default aligner used by RSEM, produced an "incompatible" alignment; indeed this is the first time I encounter this kind of error. It seemed more plausible that the error came from the parameters I passed to bowtie, so I re-ran the analysis using defaults, but I got the same error. I'm gonna try with bowtie2 and STAR; I'll post here the outcomes.

0
Entering edit mode

Bowtie2 analysis worked.