Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Biol
    Junior Member
    • Oct 2016
    • 2

    Help with DESeq2 in a host-vector-pathogen experiment

    Hi everyone.

    I am trying to use DESeq2 to find DEGs in my experiment, but I am confused about the usage of the formulas and I would be grateful if somebody could help me to clarify it.

    My experiment contain 3 "treatments": plants challenged by both insect vector and pathogen (IP, samples S09-S12), plants challenged with only the insect vector (I, samples S05-08) and healthy plants (H, without insects or pathogen, samples S01-04). Each treatment has 4 replicates, totalling 12 samples (S). I want to find differences between all of the groups (H x I, H x IP, I x IP), since I want to see the effect of both insect feeding and pathogen infection on the host transcriptome.
    I created the following design:

    >colData
    Insect Pathogen
    S01 No No
    S02 No No
    S03 No No
    S04 No No
    S05 Yes No
    S06 Yes No
    S07 Yes No
    S08 Yes No
    S09 Yes Yes
    S10 Yes Yes
    S11 Yes Yes
    S12 Yes Yes

    >design=model.matrix(~Vector + Pathogen, colData)
    >design

    (Intercept) VectorYes PathogenYes
    A01 1 0 0
    A02 1 0 0
    A03 1 0 0
    A04 1 0 0
    A05 1 1 0
    A06 1 1 0
    A07 1 1 0
    A08 1 1 0
    A09 1 1 1
    A10 1 1 1
    A11 1 1 1
    A12 1 1 1

    >dds <- DESeqDataSetFromMatrix(countData = countData,
    colData = colData,
    design = ~ Vector + Pathogen)

    Then, I tried to applied DESeq function to further extract differences using contrasts, but I got the following message:

    > dds = DESeq(dds)

    Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
    contrasts can be applied only to factors with 2 or more levels


    What am I doing wrong? Is this the best design for this type of experiment or should I modify it?

    Thanks in advance for any help
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Your contrasts will be a bit simpler to setup if you use the following groups:

    Code:
    colData = data.frame(group=c(rep("Control",4), rep("Vector", 4), rep("VectorPathogen", 4)))
    You can then specify a design of "~group" and contrasts like:

    Code:
    res <- results(dds, contrast=c("group", "VectorPathogen", "Vector"))

    Comment

    Latest Articles

    Collapse

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 06-05-2026, 10:09 AM
    0 responses
    11 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-04-2026, 08:59 AM
    0 responses
    23 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-02-2026, 12:03 PM
    0 responses
    28 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-02-2026, 11:40 AM
    0 responses
    22 views
    0 reactions
    Last Post SEQadmin2  
    Working...