Are you sure you provided a BAM file with alignments? It's complaining because the first alignment in the BAM file you provided has fewer than 10 columns (there should always be at least 11). What's the output of samtools view alignments.bam | head -n 1 (n.b., replace alignments.bam with the file you're using as input)?
I have tried it before, doesnt work. But now a new error arises. Index exception error.
2016-08-15 16:40:44,543 rMATS version: 3.2.4
2016-08-15 16:40:44,543 Start the program with [RNASeq-MATS.py -s1 /mnt/d/sratoolkit.2.7.0-win64/Output_sra/SRR1035213.$
2016-08-15 16:40:44,738 ################### folder names and associated input files #############
2016-08-15 16:40:44,738 SAMPLE_1\REP_1 /mnt/d/sratoolkit.2.7.0-win64/Output_sra/SRR1035213.fastq
2016-08-15 16:40:44,740 SAMPLE_2\REP_1 /mnt/d/sratoolkit.2.7.0-win64/Output_sra/SRR1035214.fastq
2016-08-15 16:40:44,740 #########################################################################
2016-08-15 16:40:44,740 start mapping..
2016-08-15 16:40:44,740 mapping the first sample
2016-08-15 16:40:44,740 There is an exception in mapping
2016-08-15 16:40:44,740 Exception: <type 'exceptions.IndexError'>
2016-08-15 16:40:44,740 Detail: list index out of range
Please use ADD COMMENT/ ADD REPLY to answer to earlier posts in the thread, to keep everything logically structured and easy to follow. In addition, it would be nice if you would approve (up-vote) answers here to show they helped you.
It might be old, but decided to leave a comment for whoever else might encounter it.
Had the same problem, so ran into this dicussion, but managed to solve, it seems. Looked into the code of RNASeq-MATS.py, and observed that the error is connected with rMATS trying to cmd a "samtools" command, so checked out and it appeared, simple as it is, that samtools was not loaded as a module ($module load samtools). After loading it, the command performed and completed.
If you want people to help you you'll really need to get in the habit of providing enough details to do so. In this case, you forgot to post the entire command you used.
Are you sure you provided a BAM file with alignments? It's complaining because the first alignment in the BAM file you provided has fewer than 10 columns (there should always be at least 11). What's the output of
samtools view alignments.bam | head -n 1
(n.b., replacealignments.bam
with the file you're using as input)?this is the output :
Odd. Maybe modify the source code to add a
print(output.strip().split('\t'))
, just to see what it's getting.I have tried it before, doesnt work. But now a new error arises. Index exception error.
Can you post the full command? This would make the most sense if you specified having paired-end data when you don't.
sry for the late reply, here is the command
python RNASeq-MATS.py -s1 /mnt/d/sratoolkit.2.7.0-win64/Output_sra/SRR1035213.fastq -s2 /mnt/d/sratoolkit.2.7.0-win64/Output_sra/SRR1035214.fastq -gtf /mnt/d/STARindex/hg19-GTF -bi /mnt/d/STARindex/hg19 -o ~/test_run -t paired -len 50 -a 8 -c 0.0001
You don't have paired-end data, don't use
-t paired
.my bad, i am new to bioinfo. this is my first sem at school. sry fr this..
python RNASeq-MATS.py -s1 testData/231ESRP.25K.rep-1.R1.fastq:testData/231ESRP.25K.rep-1.R2.fastq,testData/231ESRP.25K.rep-2.R1.fastq:testData/231ESRP.25K.rep-2.R2.fastq -s2 testData/231EV.25K.rep-1.R1.fastq:testData/231EV.25K.rep-1.R2.fastq,testData/231EV.25K.rep-2.R1.fastq:testData/231EV.25K.rep-2.R2.fastq -gtf ~/tools/hg19-GTF -bi ~/tools/STARindex/hg19 -o out_test -t paired -len 50 -a 8 -c 0.0001 -analysis P
Please use
ADD COMMENT/ ADD REPLY
to answer to earlier posts in the thread, to keep everything logically structured and easy to follow. In addition, it would be nice if you would approve (up-vote) answers here to show they helped you.What version of STAR do you have installed? This appears to be a bug in whatever version of it you have.
I am using STARv3. samtoolsv1.2 rMATSv3.2.4
STARv3 doesn't exist, the most recent version is 2.5.2a.
Edit: The option that's causing an error was introduced in version 2.3.1v, so if you're using anything older then you need to upgrade.
It might be old, but decided to leave a comment for whoever else might encounter it.
Had the same problem, so ran into this dicussion, but managed to solve, it seems. Looked into the code of RNASeq-MATS.py, and observed that the error is connected with rMATS trying to cmd a "samtools" command, so checked out and it appeared, simple as it is, that samtools was not loaded as a module ($module load samtools). After loading it, the command performed and completed.
Hope it helps at least someone.