rMATS: Do p-value and FDR take into account within-group variance when calculating p-values and FDR?

152 views
Skip to first unread message

X L

unread,
Sep 27, 2024, 11:02:14 AM9/27/24
to rMATS User Group

Hi, rMATS developers and users,

I am using rMATS to perform alternative splicing analysis on my RNA-seq data from two groups (control vs knockout) with three samples in each group. I have observed that many significant AS events were detected in regions with low coverage, and these regions also exhibit high within-group variance.

I would like to know if rMATS takes into account within-group variance when calculating p-values and FDR to help filter out false positives, especially in regions with low coverage.

Best regards,
Xiao

kutsc...@gmail.com

unread,
Oct 1, 2024, 1:12:42 PM10/1/24
to rMATS User Group
Yes, rMATS takes into account within-group variance when calculating the p-values: http://dx.doi.org/10.1073/pnas.1419161111
> In rMATS, we use a hierarchical framework to simultaneously account for estimation uncertainty in individual replicates and variability among replicates.

You can check how changes in counts affect the p-values by running the statistical model (rMATSexe) on example count files:
./rMATS_C/rMATSexe -i JC.raw.input.SE.txt -t 1 -o rMATS_result_P-V.txt -c 0.0001

The model is checking for a difference in PSI value between the two groups. In this example the lengths are IncFormLen=150, SkipFormLen=100. The PSI value is (inc_count/IncFormLen) / ((inc_count/IncFormLen) + (skip_count/SkipFormLen)). The four different PSI values in this example are:
(0/150) / ((0/150) + (2/100)) = 0
(1/150) / ((1/150) + (2/100)) = 0.25
(2/150) / ((2/150) + (2/100)) = 0.4
(3/150) / ((3/150) + (2/100)) = 0.5

Here are the results:
ID IJC_SAMPLE_1 SJC_SAMPLE_1 IJC_SAMPLE_2 SJC_SAMPLE_2 IncFormLen SkipFormLen PValue
0 1,1,1,1 2,2,2,2 2,2,2,2 2,2,2,2 150 100 0.0838223165326
1 0,0,3,3 2,2,2,2 2,2,2,2 2,2,2,2 150 100 0.247459011058
2 0,0,2,2 2,2,2,2 2,2,2,2 2,2,2,2 150 100 0.0238250458091

The group 2 PSI value is always 0.4. For ID=0 the group 1 PSI value is 0.25 and the p-value is almost significant at 0.08. For ID=1 the group 1 average PSI is still 0.25 ((0+0+0.5+0.5)/4), but because of the within group variation the p-value is only 0.24. For ID=2 the group 1 average PSI is now 0.2 and despite the within group variation the p-value is significant due to the difference in group PSI values

As shown in the examples, even though rMATS accounts for within group variance there can be cases where the coverage is low and a couple reads can change the p-value a lot. You may want to filter out events with low coverage: https://github.com/Xinglab/rmats-turbo/issues/183#issuecomment-1054318031

Eric

X L

unread,
Oct 1, 2024, 3:56:24 PM10/1/24
to kutsc...@gmail.com, rMATS User Group

Hi Eric,

Thank you very much for the explanation. I have another question: is the FDR value related to the P-value in the MATS output? It appears to me that a smaller FDR value is also associated with a smaller P-value.

Best,
Xiao


--
You received this message because you are subscribed to a topic in the Google Groups "rMATS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rmats-user-group/2PJ6DWFu1m8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rmats-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rmats-user-group/98d17e80-776b-4fda-9be6-539723c4ebf3n%40googlegroups.com.

kutsc...@gmail.com

unread,
Oct 2, 2024, 9:31:57 AM10/2/24
to rMATS User Group
The FDR is calculated from the P-values. Small FDR values should also have a small P-value. Here's the code: https://github.com/Xinglab/rmats-turbo/blob/v4.3.0/rMATS_P/FDR.py
See also: https://en.wikipedia.org/wiki/False_discovery_rate#Benjamini%E2%80%93Hochberg_procedure

Eric

X L

unread,
Oct 2, 2024, 11:07:56 AM10/2/24
to kutsc...@gmail.com, rMATS User Group
Hi, Eric,

I see. Thank you very much for your explanation!

Regards,

Xiao

Reply all
Reply to author
Forward
0 new messages