Multiple pairwise comparisons in ballgown
1
1
Entering edit mode
@rachaeldetar-14765
Last seen 6.9 years ago

Hi, 
I have some RNA seq data with 3 genotypes and two treatments. I'd like to do pairwise comparisons between every group. Is there an easy way to do this in ballgown, or do I need to subset my dataset into each combination of genotype/treatment, and run the ballgown pipeline on them pair by pair? What I really want as an output is a table of log2 fold change values for each pairwise comparison. 

The command where I think this may be relevent is pasted below:

> results_transcripts = stattest(bg_chrX_filt, feature="transcript", covariate="genotype_salt_mM", getFC=TRUE, meas="FPKM")
Warning message:
In stattest(bg_chrX_filt, feature = "transcript", covariate = "genotype_salt_mM",  :
  fold changes only available for 2-group comparisons

Thanks,

Rachael DeTar

ballgown • 2.9k views
ADD COMMENT
0
Entering edit mode
Alyssa Frazee ▴ 210
@alyssa-frazee-6710
Last seen 4.0 years ago
San Francisco, CA, USA

Hi Rachael, ballgown doesn't do pairwise comparisons by default, but there are a few ways to force it to do it for you. The strategy you mention (running the pipeline on them pair by pair) is one option (you can use the "subset" function to make 6 ballgown objects, one with each genotype x pair treatment, then run "stattest" with each of the 6 objects). This is probably the easiest way to get what you want -- you'll have a two-group comparison and then you can pull the fold change values directly from the stattest function. (There are a couple other strategies I can think of as well, but they aren't as straightforward as the above and if you do want the 6 fold change values, there's some annoying data wrangling you'll have to do yourself. Ballgown doesn't automatically emit coefficients for more complex designs like yours because it's ~impossible to guess which values are important to the scientist in complex designs. But if this doesn't work, feel free to reply and folks can help brainstorm better solutions). 

ADD COMMENT
0
Entering edit mode

Hi Alyssa,

What is the code for subsetting the bg object based on sample info in pData? I essentially want to make pairwise comparisons like Rachael without having to read in the expression tables every time to create a new bg object.

Thanks!

Pooja

ADD REPLY
0
Entering edit mode

Hi Pooja, ballgown has a subset method built in that operates directly on the objects: https://rdrr.io/bioc/ballgown/man/subset.html

You can also find these docs by doing ?subset in R after loading up the ballgown library.

Good luck!

ADD REPLY

Login before adding your answer.

Traffic: 679 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6