Run rmats 1-vs-all-others patients' bam

15 views
Skip to first unread message

M K

unread,
Sep 29, 2025, 6:22:47 AMSep 29
to rMATS User Group
Hello, 
I would like your suggestion on how I could test the rmats-turbo with a set of data, comprising 20 patients with unknown splicing variant (a different one per patient), without control samples to compare to. 
Do you find pertinent to run it as 1-vs-all  with --task "both" ? I know that the FDR will not be significant, but I 'll have to use other sources and hints to find out the variant on the rmats results( e.g high dPSI). What would you suggest in this case of data to explore ? 

I would appreciate any suggestion, 
Thanks in advance for your understanding,
Best 
Maria

kutsc...@gmail.com

unread,
Sep 29, 2025, 3:18:22 PMSep 29
to rMATS User Group
With those 20 samples you can run them all in the same group --b1 with --statoff and --task both to have rmats identify splicing events, count reads, and calculate PSI values (IncLevel)

With that output you could then run the statistical test for each 1-vs-all comparison following: https://github.com/Xinglab/rmats-turbo/tree/v4.3.0?tab=readme-ov-file#running-the-statistical-model-separately
That will calculate a dPSI (IncLevelDifference). It will also calculate PValue and FDR, but maybe the rmats statistical test isn't ideal for this dataset

Without running the rmats statistical test you could still look for interesting events based on the read counts and PSI values. This post recommends filtering for events with average read count at least 10: https://github.com/Xinglab/rmats-turbo/issues/183#issuecomment-1054318031 . For the events that have enough read counts in all or most of the samples you could maybe do some check on the PSI value distribution

Eric

M K

unread,
Oct 1, 2025, 7:29:22 AMOct 1
to rMATS User Group
Hello again, 
Thanks a lot for your insight ! 
I have a new question on your answer : 
1. I m confused with the parameters : Why use "--task=both" when "--statoff" ? Isn't "both" including a stat.analysis ? 
What is the difference with a "--task prep" with --statoff ?

2. I ran this first part with all the samples together as --b1, and --statoff, --task=both, so I obtained "IJC" ,"SJC" and Inclusion levels for all samples. 
But, now for the stat.analysis should I run the "prepare_stat_inputs.py"  & the "---task stat" for all combinations of 1-vs-all ? 
I understand it as doing something like the following  (for 20 samples A,B..etc), interchanging the group-indices in each combination :
```
#1/
python ../rMATS/rMATS_P/prepare_stat_inputs.py \
--new-output-dir ${outDir}/Stats_out/A_vs_all \
        --old-output-dir ${outDir} \ # with the --statoff results
        --group-1-indices 0 --group-2-indices 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
          
#2/ 
python rmats.py --od  ${outDir}/Stats_out/A_vs_all \
                --tmp  Stats_out/tmp_A_vs_all  --task stat

```

...which will give me the "[event].JCEC| JC.txt" for each comparison, with the FDR and dPSI filled-in.
Is this right ?  


Thanks again,
any correction or validation, is greatly appreciated. 

Best, 
Maria

kutsc...@gmail.com

unread,
Oct 1, 2025, 12:14:31 PMOct 1
to rMATS User Group
--task both runs prep and post. Usually post includes stat, but --statoff causes the post step to skip the stat part. The prep step never runs the stat step so --statoff doesn't apply to prep

https://github.com/Xinglab/rmats-turbo/tree/v4.3.0?tab=readme-ov-file#running-prep-and-post-separately
> rMATS analysis has two steps, prep and post. In the prep step, the input files are processed and a summary is saved to .rmats files in the --tmp directory. The .rmats files track info from each BAM separately according to the full path of the BAM specified in the input .txt file. In the post step, .rmats files are read and the final output files are created.

https://github.com/Xinglab/rmats-turbo/tree/v4.3.0?tab=readme-ov-file#running-the-statistical-model-separately
> Usually those files are created by the post step which also runs the statistical model to create the final output file

Yes, you can run prepare_stat_inputs.py and ---task stat for the 20 different samples. The example from https://github.com/Xinglab/rmats-turbo/tree/v4.3.0?tab=readme-ov-file#running-the-statistical-model-separately has 3 different groupings to run, but you have 20. Yes, each run will output the files with FDR and dPSI

Eric
Reply all
Reply to author
Forward
0 new messages