SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is more than two conditions possible in DESEQ? greener RNA Sequencing 5 05-09-2011 04:10 PM
Defining the path to BWA inside Stampy oiiio Bioinformatics 0 04-21-2011 10:15 AM
PCR conditions for PE adapters Luke Illumina/Solexa 3 03-02-2011 09:48 AM
Terms defining sequencing accuracy Michael L. Altshuler General 0 12-12-2007 07:38 AM

Reply
 
Thread Tools
Old 04-10-2012, 04:35 PM   #1
mouchkam
Junior Member
 
Location: Portland, OR

Join Date: Apr 2012
Posts: 7
Default DESeq: defining conditions

Hello,

I'm very new to DESeq and am hoping to verify that my script is correct, specifically relating to importing my data (a text file with raw count data for two treatments, AC and SC, 4 biological replicates for each) and defining my treaments. Below is my script and I've attached a txt file with the first few lines of my data as an example of my input format. Specifically, I'm wanting to compare AC to SC. The script seems to work beautifully, but I just want to check that I haven't incorrectly imported the data and/or assigned the treatments.

Thanks so much!

CountData<- read.table("AC_SC_readCountsDESeq.txt",row.names=1, header=TRUE,)
conds <- c(rep("AC",4), rep("SC",4))
cds <- newCountDataSet( CountData, conds )
LibrarySize <- estimateSizeFactors( cds )
sizeFactors( LibrarySize )
head( counts( LibrarySize, normalized=TRUE ) )
Disp <- estimateDispersions( LibrarySize )
DE <- nbinomTest( Disp, "AC", "SC" )
Attached Files
File Type: txt Sample.txt (319 Bytes, 12 views)
mouchkam is offline   Reply With Quote
Old 04-10-2012, 04:58 PM   #2
sdriscoll
I like code
 
Location: San Diego, CA, USA

Join Date: Sep 2009
Posts: 438
Default

looks good to me. i usually don't make all of the extra variables but it doesn't matter. what i mean is if i had run it i would have kept redefining 'cds' since each of the commands only updates the count dataset object with new/updated information and nothing is lost.

so it would look like this...

CountData<- read.table("AC_SC_readCountsDESeq.txt",row.names=1, header=TRUE,)
conds <- c(rep("AC",4), rep("SC",4))
cds <- newCountDataSet( CountData, conds )
cds <- estimateSizeFactors( cds )
sizeFactors( cds )
head( counts( cds, normalized=TRUE ) )
cds <- estimateDispersions( cds )
DE <- nbinomTest( cds, "AC", "SC" )
sdriscoll is offline   Reply With Quote
Old 04-10-2012, 05:45 PM   #3
mouchkam
Junior Member
 
Location: Portland, OR

Join Date: Apr 2012
Posts: 7
Default

Wonderful! Thanks for your help and for your suggestion. I originally thought that reusing the same variable was confusing, but since it seems like pretty standard practice, I think I just confuse myself when altering code if I define new variables. Thanks again!
mouchkam is offline   Reply With Quote
Reply

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 05:49 PM.


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