Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    • seqadmin
      Current Approaches to Protein Sequencing
      by seqadmin


      Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
      04-04-2024, 04:25 PM
    • seqadmin
      Strategies for Sequencing Challenging Samples
      by seqadmin


      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
      03-22-2024, 06:39 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 04-11-2024, 12:08 PM
    0 responses
    25 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 04-10-2024, 10:19 PM
    0 responses
    29 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 04-10-2024, 09:21 AM
    0 responses
    25 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 04-04-2024, 09:00 AM
    0 responses
    52 views
    0 likes
    Last Post seqadmin  
    Working...
    X