Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Question about model design in edgeR user guide case study example 4.5

    Good afternoon,
    I am analyzing RNAseq data from 2 different populations exposed to 2 experimental treatments and my experimental design is very similar to case study 4.5 in the June 2014 edgeR user guide. Im hoping someone can annotate/explain this part of the R script that deals with model design. Im unsure to what the 1,4 and 5,5 refer and the meaning of ref="mock."

    Thanks in advance for help with this admittedly beginner question.

    From the user guide:
    Code:
    > library(NBPSeq) 
    > library(edgeR) 
    > data(arab) 
    > head(arab)
    
                    mock1 mock2 mock3 hrcc1 hrcc2 hrcc3
    AT1G01010   35        77      40      46     64    60 
    AT1G01020   43        45      32      43     39    49 
    AT1G01030   16        24      26      27     35    20 
    AT1G01040   72        43      64      66     25    90 
    AT1G01050   49        78      90      67     45    60 
    AT1G01060   0         15      2       0      21    8
    
    #There are two experimental factors, treatment (hrcc vs mock) and the time that each replicate was conducted:
    
    > Treat <- factor(substring(colnames(arab),1,4)) 
    > Treat <- relevel(Treat, ref="mock") 
    > Time <- factor(substring(colnames(arab),5,5))

  • #2
    I assume it's the last 3 lines that you have questions about.

    Code:
    Treat <- factor(substring(colnames(arab),1,4))
    When reading code, read it from inside out. So "colnames(arab)" will return, '"mock1" "mock2" "mock3" "hrcc1" ...'. That's then given to substring(), which outputs characters 1 through 4. This will then return, '"mock" "mock" "mock" "hrcc" ...'. This is then made into a factor with factor().

    Code:
    Treat <- relevel(Treat, ref="mock")
    When the factor was made in the previous command, the lexicographically first level (hrcc) was made the reference level. You probably want fold-changes versus mock instead, so that's what the relevel() command does.

    Code:
    Time <- factor(substring(colnames(arab),5,5))
    As with "Treat", except now substring is just returning the 5th character, '"1" "2" "3" "1" "2" "3"'.

    Comment


    • #3
      Thank you for the response! It helped a lot.

      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
      28 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      24 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