create one matrix with all events

95 views
Skip to first unread message

Indrani Poddar

unread,
Sep 28, 2022, 9:48:16 PM9/28/22
to rMATS User Group
Hello,

I am new to rMATS analysis. And I am trying to make one matrix with rows are events and cols are samples.  My samples were run in 2 batches with 2 different rMATS runs as they are different groups, as a result number of events  from these 2 runs differ.

Now that I want to create 1 big matrix with all samples PSI for all events from 2 runs, how should I proceed.  For examples, samples from run A has n events while samples from run B has m events.

Do I need to do anything with genomic location of events from run A and run B to collapse them anyhow? 

 Please suggest.

Thank you.

kutsc...@gmail.com

unread,
Sep 29, 2022, 3:28:16 PM9/29/22
to rMATS User Group
You can get rMATS output that has the same events for different samples by running all the samples in the same "--task post" step. Here are instructions from the README for running the prep and post steps: https://github.com/Xinglab/rmats-turbo/tree/v4.1.2#running-prep-and-post-separately

Trying to combine the events from two different rMATS runs is not easy. You can look for events that are shared between the two runs by checking the genomic coordinates. If the events in the two runs have the same coordinates then it makes sense to combine those results under the same event row in your final matrix. For other events that don't match between the samples it is not clear how to handle them for the combined matrix. If you are interested in those events then it is best to run rMATS on all the samples together

Eric

Indrani Poddar

unread,
Sep 29, 2022, 9:28:15 PM9/29/22
to rMATS User Group
Thank you for your suggestion, it is very helpful.
Indrani

Pranab Santara

unread,
Nov 1, 2022, 2:31:12 AM11/1/22
to rMATS User Group
Hello to all,
            I am new in this rmats analysis. i have installed it with conda . i want to work with BAM files. can you please guide me for further analysis? I am now stuck with this procedure
Create txt files that will be used to pass this grouping of inputs to rMATS. The expected format is `,` to separate replicates.
- `/path/to/b1.txt`
```
/path/to/1_1.bam,/path/to/1_2.bam
```
- `/path/to/b2.txt`
```
/path/to/2_1.bam,/path/to/2_2.bam
```
please tell me how to proceed further.

Thanking you 

Thomas Danhorn

unread,
Nov 1, 2022, 2:59:36 PM11/1/22
to Pranab Santara, rMATS User Group
Hi Pranab,

You can use any text editor to create the text files with the BAM file
names. In a command line environment on many Linux installations, nano is
one of the more beginner-friendly editors. If you use an edior on your
laptop/desktop, make sure the line-endings are only LF, not CR+LF. You
can use the dos2unix utility in many Linux installations to fix
line-endings.

Alternatively, you can create the test file from the command line:

echo /path/to/1_1.bam,/path/to/1_2.bam > b1.txt

(and similarly for b2.txt; the ">" redirects the output of the echo
command and writes it to the b1.txt file instead of to the screen.)


Once you have those text files, you can use them as parameters with the
--b1 and --b2 options and run rMATS.

Hope this helps,

Thomas
> --
> You received this message because you are subscribed to the Google Groups "rMATS User Group" group.
> To unsubscribe from this group and stop receiving emails from it, 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/bd9d865f-cad0-43bd-a454-14e3fce8aad6n%40googlegroups.com.
>
Reply all
Reply to author
Forward
0 new messages