Error in paired model for JCEC

157 views
Skip to first unread message

Jack Riley

unread,
Nov 25, 2021, 11:36:02 AM11/25/21
to rMATS User Group
Hello,

I have been trying to use the paired model for 15 pairs of samples (30 .bam file inputs, single-end reads). The post task seems to take a couple of days to run on our cluster, although I understand this is normal from reading some other posts in the forum.

Upon completion of the run, there are 0 TotalEventsJCEC for SE,A5SS,A3SS and RI (MXE works fine), and I get the following errors for each of these:

/etc/bashrc: line 12: PS1: unbound variable
error in paired model
WARNING: ignoring environment value of R_HOME
Loading required package: nloptr
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
Loading data...
A total of 120605 exons will be tested.
Preparing 4 clusters for parallel processing....
Starting analysis.
Error in { : task 43635 failed - "missing value where TRUE/FALSE needed"
Calls: <Anonymous> -> %dopar% -> <Anonymous>
Execution halted

paste: post/tmp/JCEC_SE/rMATS_result_FDR.txt: No such file or directory
error in paired model
WARNING: ignoring environment value of R_HOME
Loading required package: nloptr
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
Loading data...
A total of 27173 exons will be tested.
Preparing 4 clusters for parallel processing....
Starting analysis.
Error in { : task 1057 failed - "missing value where TRUE/FALSE needed"
Calls: <Anonymous> -> %dopar% -> <Anonymous>
Execution halted

paste: post/tmp/JCEC_A3SS/rMATS_result_FDR.txt: No such file or directory
error in paired model
WARNING: ignoring environment value of R_HOME
Loading required package: nloptr
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
Loading data...
A total of 23252 exons will be tested.
Preparing 4 clusters for parallel processing....
Starting analysis.
Error in { : task 1049 failed - "missing value where TRUE/FALSE needed"
Calls: <Anonymous> -> %dopar% -> <Anonymous>
Execution halted

paste: post/tmp/JCEC_A5SS/rMATS_result_FDR.txt: No such file or directory
error in paired model
WARNING: ignoring environment value of R_HOME
Loading required package: nloptr
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
Loading data...
A total of 28900 exons will be tested.
Preparing 4 clusters for parallel processing....
Starting analysis.
Error in { : task 599 failed - "missing value where TRUE/FALSE needed"
Calls: <Anonymous> -> %dopar% -> <Anonymous>
Execution halted

Any help would be appreciated, I'm happy to provide more info as needed.

Thank you,
Jack

kutsc...@gmail.com

unread,
Nov 29, 2021, 9:39:21 AM11/29/21
to rMATS User Group
This is the main part of the error for the paired model:


Error in { : task 43635 failed - "missing value where TRUE/FALSE needed"
Calls: <Anonymous> -> %dopar% -> <Anonymous>
Execution halted

After each of those errors there will be a second error like "No such file or directory" which happens because the paired model failed before producing that file. Similar errors were reported in this post: https://groups.google.com/g/rmats-user-group/c/2HyTIc1y4IQ/m/GYJRHyQRAQAJ

That other post has links to modified code for the paired model that should help get a better error message and hopefully also the row of the input file which causes the error. Can you give that code a try? You would need to update the number in the print statement with the task number from your error message: https://github.com/Xinglab/PAIRADISE/commit/2a4f6878ecb59ae7aa01b9e9f9c4a17038e70816#diff-aa5ed5f1eb7ecbf6e508085389354c8985b74027793edfe7a3d70cfe324096aeR129

Eric

Jack Riley

unread,
Nov 30, 2021, 8:08:55 AM11/30/21
to rMATS User Group
Hi Eric,

Thank you for your response.

I have followed the instructions from the other thread about creating a modified file with just the error causing exonID on the kutscherae-debug-error  branch (modified with my task number).

From my data exonList[43635]: 65552. So I used this to create the modified input file. 

For clarity here is the content of the post/modified/JCEC.raw.input.SE.txt file:

ID    IJC_SAMPLE_1    SJC_SAMPLE_1    IJC_SAMPLE_2    SJC_SAMPLE_2    IncFormLen    SkipFormLen
65552    9,68,27,1,46,40,54,20,38,54,53,28,26,20,11    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0    5,58,16,5,29,64,68,20,31,98,24,149,49,27,18    0,0,1,0,0,0,0,0,0,0,0,0,0,0,0    5564    49

and this is the error message I now see:

Loading required package: nloptr
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
Loading data...
A total of 2 exons will be tested.
Preparing 1 clusters for parallel processing....
Starting analysis.
Error in if ((abs(ll.new.u - ll.old.u) < tol) & (abs(ll.new.c - ll.old.c) <  :
  missing value where TRUE/FALSE needed
Calls: <Anonymous>
Execution halted

Thank you
Jack

kutsc...@gmail.com

unread,
Nov 30, 2021, 11:56:09 AM11/30/21
to rMATS User Group
The paired model is getting an infinite value during the calculation for that input: https://github.com/Xinglab/PAIRADISE/blob/c3334ffa593dbf26bc9428d46fd8406d190adcf9/pairadise/src/pairadise_model/R/loglikelihood.r#L50

It tries to do log((b1 + b2 * b3)^2) which ends up as log(0) resulting in -Inf. Changing some of the values in the input file avoids the error. It seems that the calculation only runs into the error in very specific cases where some terms exactly cancel out

I've opened this pull request to detect the error and output a p-value close to 1 for any input rows that have this calculation error: https://github.com/Xinglab/PAIRADISE/pull/4

If you install PAIRADISE from the code in that pull request then I think you should be able to rerun --task stat on your data

Eric

Jack Riley

unread,
Dec 2, 2021, 8:28:38 AM12/2/21
to rMATS User Group
Great this fixed the issue, thank you!
Reply all
Reply to author
Forward
0 new messages