Xinglab / rmats2sashimiplot

GNU General Public License v2.0
132 stars 54 forks source link

error? IndexError: index 90838 is out of bounds for axis 0 with size 90771 #134

Open divinehui opened 1 week ago

divinehui commented 1 week ago

Ι run python /rmats-turbo/rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py --b1 SRR14821218.align.sort.bam --b2 SRR14821219.align.sort.bam -c 7:-:140719327:140924928:./Homo_sapiens.GRCh38.110.gtf --l1 SampleOne --l2 SampleTwo --exon_s 1 --intron_s 5 -o /home/bam/tmp some error output, please help me to solve it. thanks

File "/rmats-turbo/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/sashimi_plot.py", line 155, in plot_event plot_density_from_file(settings_filename, pickle_filename, event_name, File "/rmats-turbo/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/plot_utils/plot_gene.py", line 845, in plot_density_from_file plot_density(sashimi_obj, pickle_filename, event, group_info=group_info, File "/rmats-turbo/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/plot_utils/plot_gene.py", line 503, in plot_density plot_mRNAs(tx_start, mRNAs, strand, graphcoords, reverse_minus) File "/rmats-turbo/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/plot_utils/plot_gene.py", line 651, in plot_mRNAs x = [graphcoords[s], graphcoords[e], graphcoords[e], graphcoords[s]] IndexError: index 90838 is out of bounds for axis 0 with size 90771

EricKutschera commented 1 week ago

That error could happen when using a .gtf (Homo_sapiens.GRCh38.110.gtf) instead of a .gff3. If you convert to a .gff3 and use a new -o output directory then I think that will resolve the error. See this post: https://github.com/Xinglab/rmats2sashimiplot/issues/78#issuecomment-1150358336

divinehui commented 1 week ago

image

divinehui commented 1 week ago

image

divinehui commented 1 week ago

image

divinehui commented 1 week ago

Dear Eric, when I run command "python /rmats-turbo/rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py —-b1 SRR14821218.align.sort.bam --b2 SRR14821219.align.sort.bam -c 16:-:9000:25001:./Homo_sapiens.GRCh38.110.gtf3 --event-type A3SS -e /home/bam/output/fromGTF.SE.txt --l1 Normal_8505C --l2 Resistant_8505C --exon_s 1 --intron_s 5 -o /home/bam/tmp2", some error occured like that " Traceback (most recent call last): File "/rmats-turbo/rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 953, in main() File "/rmats-turbo/rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 949, in main plot_with_eventsfile(options) File "/rmats-turbo/rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 626, in plot_with_eventsfile coor = EventCoor(options.event_type, items) File "/rmats-turbo/rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 502, in init self.inc_level1 = items[20] # IncLevel1"

How to solve this problem, thanks for your kindly reply

EricKutschera commented 1 week ago

The list index out of range error would happen when using a fromGTF file as the -e argument instead of a MATS file like SE.MATS.JC.txt. Also your command is mixing A3SS and SE (--event-type A3SS, -e /home/bam/output/fromGTF.SE.txt). See this post: https://github.com/Xinglab/rmats2sashimiplot/issues/86#issuecomment-1287341058

divinehui commented 1 week ago

dear Eric , I checked the SE.MATS.JC.txt, this txt file has no data except header, the command used rmats like this "python /home/program/rmats-turbo/rmats.py —-b1 c1.txt --b2 c2.txt --gtf Homo_sapiens.GRCh38.110.gtf -t single --od output --nthread 6 --readLength 150 --tmp out --nthread 6 --novelSS"

image
EricKutschera commented 1 week ago

If your rmats output files are empty it could be due to most of the reads being filtered out. See this post: https://github.com/Xinglab/rmats-turbo/issues/89

divinehui commented 1 week ago

I followed the instruction and add --variable-read-length --statoff, the command is "python /home/program/rmats-turbo/rmats.py --b1 c1.txt --b2 c2.txt --gtf Homo_sapiens.GRCh38.110.gtf -t single --od output --nthread 26 --readLength 51 --variable-read-length --statoff --tmp out --novelSS". the SE.MATS.JC.txt output blow, but "PValue FDR IncLevel1 IncLevel2 IncLevelDifference" value are NAN, please help me to solve it! thanks a lot

image
EricKutschera commented 1 week ago

If you run with --statoff it will output all events even if there are no supporting reads in your data. You could run without --statoff to let the filter limit the output to events with supporting reads in both groups. If there are no output events then the read outcomes may show reads being filtered for something other than read length