Running MAJIQ PSI on replicates

86 views
Skip to first unread message

Alexis W

unread,
Feb 11, 2021, 3:14:43 PM2/11/21
to majiq_voila
Hello,

I have several groups, with several replicates in each. For example:

Condition_A: cond_A_rep1,cond_A_rep2
Condition_B: cond_B_rep1,cond_B_rep2
Condition_C: cond_C_rep1,cond_C_rep2


If I use the command builder on the website, the instruction is to use a separate `psi` command for each sample:


    Quantify command:

    $ majiq psi -o ./psi -j 10-n conda ./build/cond_A_rep1.majiq
    $ majiq psi -o ./psi -j 10-n conda ./build/cond_A_rep2.majiq
    $ majiq psi -o ./psi -j 10-n condb ./build/cond_B_rep1.majiq
    $ majiq psi -o ./psi -j 10-n condb ./build/cond_B_rep2.majiq
    $ majiq psi -o ./psi -j 10-n condc ./build/cond_C_rep1.majiq
    $ majiq psi -o ./psi -j 10-n condc ./build/cond_C_rep2.majiq



But reading the `majiq psi` parameters description or this older thread, it seems like I should instead run one command per group (rather than per replicate).

Is the Command Builder incorrect on that? Or is the group-level file modified by each sample-level command? And in that second case, would it be expected to break if running in e.g. Nextflow that runs each command in a separate, clean, sub-directory?

Best,
Alexis.

mgaz...@biociphers.org

unread,
Feb 11, 2021, 5:48:35 PM2/11/21
to majiq_voila
Hi Alexis, 

Thanks for your question. 

You are correct in your references to the parameter description and the older thread: majiq psi was intended to be run on a group of replicate samples that, presumably, share the same underlying PSI value. This would be something like cell lines, mouse models, etc. We will work to include this behavior in the Command Builder as an option. In the mean time you can just list out all the .majiq files that you want to be included in your group PSI quantification. For example in Condition_A you would run:
`majiq psi -o ./psi -j 10 -n conda ./build/cond_A_rep1.majiq  ./build/cond_A_rep2.majiq`

Currently, the Command Builder output you described is splitting up each sample into its own PSI run. Depending on your samples and experimental design, this may be desirable. For example, if you are dealing with primary human samples were you might expect variability between "replicate" samples that were grouped together at the majiq build step. You may want to compare all replicates against one another within the same group to get an idea of the variability between your group samples, for example. 

Let me know if you have any further questions about this or if anything was unclear.

Best,
Matt

Alexis W

unread,
Feb 12, 2021, 1:35:06 PM2/12/21
to majiq_voila
Hi Matt,

Thank you for your fast response, it does answer my main question. One thing that is still a bit unclear though: when running each replicate separately, we get a single file per group (per `--name` parameter, in this example we get "conda.psi.tsv"). Is this file read by MAJIQ PSI and modified in-place each time a sample is run from an existing group? Or is the file overwritten by subsequent replicates?

Best,
Alexis.

mgaz...@biociphers.org

unread,
Feb 18, 2021, 12:44:40 PM2/18/21
to majiq_voila
Hi Alexis, 

It seems like the command line arguments suggested from the Command Builder for majiq psi is using the group name (e.g. "conda") and not the replicate names (e.g. "cond_A_rep1") for the --name parameter. 

This is a bug in the Command Builder since using the same --name parameter for multiple majiq psi runs will cause the output files to be overwritten each time. In the example you posted we would expect the resulting conda.psi.tsv to contain only the data from cond_A_rep2 since the data from replicate 1 was overwritten. Our developer will work to fix this and implement the group level PSI Command Builder option. 

In the meantime the correct lines to generate PSI quantification for each replicate separately would be like: 
$ majiq psi -o ./psi -j 10 -n cond_A_rep1 ./build/cond_A_rep1.majiq
$ majiq psi -o ./psi -j 10 -n cond_A_rep2 ./build/cond_A_rep2.majiq

If you want to quantify the condition A data together to get group level PSI it would: 
$ majiq psi -o ./psi -j 10 -n conda ./build/cond_A_rep1.majiq ./build/cond_A_rep2.majiq

Hope that helps and sorry for the confusion. 

Best,
Matt

Alexis W

unread,
Feb 18, 2021, 3:57:10 PM2/18/21
to majiq_voila
Perfect, it all makes sense now!

If the developer is going to modify the Command Builder, another surprising point is how it complains of invalid group names for uppercase characters (although it then works as expected).

Best,
Alexis.

Matthew Gazzara

unread,
Feb 24, 2021, 1:09:33 PM2/24/21
to majiq_voila
Hi Alexis, 

Glad to have helped and thank you for using / improving the tool with your questions!

Upper case characters should be allowed in the group names. We will fix that shortly. 

Both the group level PSI and individual sample level PSI have now been implemented in the Command Builder with a new question ("How do you want PSI values to be calculated?") so feel free to use that now. 

Thanks, 
Matt
Reply all
Reply to author
Forward
0 new messages