SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
log normalization of RPKM values in voom Golsheed Bioinformatics 0 05-25-2015 06:56 AM
Limma/voom for RNA-seq data BioLion Bioinformatics 6 12-22-2014 08:03 AM
Please HELP! TCGA RNAseq data and Limma Mous Bioinformatics 4 11-22-2014 02:16 AM
Limma Voom Differential Splicing diffSplice() error Anomilie Bioinformatics 3 08-10-2014 11:49 PM
Differential expression analysis on RPKMs - Contrasts and contrasts of contrasts giorgifm Bioinformatics 6 08-16-2013 10:50 AM

Reply
 
Thread Tools
Old 09-21-2015, 11:48 AM   #1
Travis Lawrence
Junior Member
 
Location: Merced, CA

Join Date: Apr 2015
Posts: 2
Default Blocking and using contrasts in voom (limma) (RNAseq)

I am having trouble making the contrast matrix when I am using library preparation type (e.g. paired-end, single-end) as an addition variable in the model matrix:

Code:
Treatment <- factor(targets$Treatment[c(1:8,11:13)], levels=c("T1", "T2", "T3", "T4"))
Seq <- factor(targets$Sequence[c(1:8,11:13)], level=c("single", "pair"))
design <- model.matrix(~SeqType + Treatment)
y <- voom(x, design, plot=TRUE)
fit <- lmFit(y, design)
Where SeqType is a factor with a value for each RNAseq sample of either paired or single and Treatment is a factor labeling each sample as one of four treatments.

The resulting design matrix for the fit object is:
Code:
(Intercept) Seqpair Treatment2 Treatment3 Treatment4
      1       1        0          1          0  
      1       1        0          0          1
      1       0        1          0          0 
      1       1        1          0          0
      1       1        0          0          0
      1       0        0          0          1
      1       0        0          1          0
      1       0        0          0          0
      1       1        1          0          0
      1       1        0          1          0
      1       1        0          0          1
I am unsure of how to construct the contrast matrix to test all pairwise comparisons of treatments.

I have previously used the makeContrasts command, however, I also previously constructed the design matrix by providing it an intercept (design <- model.matrix(~0 + Treatment)) so constructing the contrasts was done by just giving the column headings of the design matrix to the makeContrasts function:

Code:
contrast.matrix <- makeContrasts(T1vsT2 = Treatment1-Treatment2)
Travis Lawrence is offline   Reply With Quote
Reply

Tags
differential expression, limma voom, rnaseq, voom

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO