help with DESeq
1
0
Entering edit mode
@akula-nirmala-nihnimh-c-5007
Last seen 4.5 years ago
Hi, We have 4 cases and 5 controls. We would like to add RIN number as one of the covariates to the data analysis. Here is my code which gives errors: > countsTable=read.table("4Cases_5Controls_counts.txt",header=TRUE) > cdsFull<- newCountDataSet( countsTable, nisc1Design ) > cdsFull<- estimateSizeFactors( cdsFull ) > cdsFull<- estimateDispersions(cdsFull,"pooled") > Error in rowSums(sapply(tapply((1:ncol(counts))[replicated_sample], factor(conditions[replicated_sample]), : > 'x' must be an array of at least two dimensions > Any suggestions will be greatly appreciated. Thank you very much. Regards, Nirmala ---------------------------------------------------------------------- -------------- Nirmala Akula, MS, PhD Contractor, Human Genetics Branch NIMH/NIH Blg 35, Rm 1A/205 Bethesda, MD - 20892 Phone# 301-451-4258 [[alternative HTML version deleted]]
Genetics Genetics • 1.1k views
ADD COMMENT
0
Entering edit mode
Simon Anders ★ 3.7k
@simon-anders-3855
Last seen 3.7 years ago
Zentrum für Molekularbiologie, Universi…
Dear Nirmala > We have 4 cases and 5 controls. We would like to add RIN number as one of the covariates to the data analysis. Here is my code which gives errors: > >> countsTable=read.table("4Cases_5Controls_counts.txt",header=TRUE) >> cdsFull<- newCountDataSet( countsTable, nisc1Design ) >> cdsFull<- estimateSizeFactors( cdsFull ) >> cdsFull<- estimateDispersions(cdsFull,"pooled") >> Error in rowSums(sapply(tapply((1:ncol(counts))[replicated_sample], factor(conditions[replicated_sample]), : >> 'x' must be an array of at least two dimensions At the very least, tell us what is the variables you use to construct the CountDataSet, i.e., post the content of 'nisc1Design' and the head of 'countsTable'. Simon
ADD COMMENT
0
Entering edit mode
Hi, Below are details of the countsTable and phenotype file. > head (countsTable) bipolar1 bipolar2 bipolar3 bipolar4 control1 control2 control3 NM_000014 13019 23895 33315 13370 26488 25620 31899 NM_000015 5 6 9 1 4 6 5 NM_000016 2932 3316 2874 3320 3195 3017 2312 NM_000017 1156 945 1741 1494 977 800 815 NM_000018 20826 12992 24670 20231 16074 14433 21448 NM_000019 5721 6193 6719 6935 6891 5469 5740 control4 control5 NM_000014 24253 28868 NM_000015 8 4 NM_000016 3684 2475 NM_000017 738 634 NM_000018 15473 19125 NM_000019 6918 7710 > nisc1Design=read.table("C://Documents and Settings/aaakulan/Desktop/nisc1_phenotype.txt",header=TRUE) > nisc1Design Condition RIN Age Sex bipolar1 Bipolar 8.8 46 1 bipolar2 Bipolar 6.0 48 1 bipolar3 Bipolar 8.9 73 1 bipolar4 Bipolar 8.0 56 2 control1 Control 8.5 45 1 control2 Control 8.6 57 1 control3 Control 8.0 63 1 control4 Control 8.1 39 2 control5 Control 7.9 56 2 > cdsFull <- newCountDataSet( countsTable,nisc1Design ) > cdsFull <- estimateSizeFactors( cdsFull ) > cdsFull <- estimateDispersions( cdsFull ) Error in rowSums(sapply(tapply((1:ncol(counts))[replicated_sample], factor(conditions[replicated_sample]), : 'x' must be an array of at least two dimensions > Thank you very much. Regards, Nirmala ________________________________________ From: Simon Anders [anders@embl.de] Sent: Monday, December 12, 2011 3:11 PM To: Akula, Nirmala (NIH/NIMH) [C]; bioconductor at r-project.org Subject: Re: [BioC] help with DESeq Dear Nirmala > We have 4 cases and 5 controls. We would like to add RIN number as one of the covariates to the data analysis. Here is my code which gives errors: > >> countsTable=read.table("4Cases_5Controls_counts.txt",header=TRUE) >> cdsFull<- newCountDataSet( countsTable, nisc1Design ) >> cdsFull<- estimateSizeFactors( cdsFull ) >> cdsFull<- estimateDispersions(cdsFull,"pooled") >> Error in rowSums(sapply(tapply((1:ncol(counts))[replicated_sample], factor(conditions[replicated_sample]), : >> 'x' must be an array of at least two dimensions At the very least, tell us what is the variables you use to construct the CountDataSet, i.e., post the content of 'nisc1Design' and the head of 'countsTable'. Simon
ADD REPLY
0
Entering edit mode
Dear Nirmala On 2011-12-12 22:01, Akula, Nirmala (NIH/NIMH) [C] wrote: >> nisc1Design > Condition RIN Age Sex > bipolar1 Bipolar 8.8 46 1 > bipolar2 Bipolar 6.0 48 1 > bipolar3 Bipolar 8.9 73 1 > bipolar4 Bipolar 8.0 56 2 > control1 Control 8.5 45 1 > control2 Control 8.6 57 1 > control3 Control 8.0 63 1 > control4 Control 8.1 39 2 > control5 Control 7.9 56 2 We only had factorial designs in mind when implementing DESeq's GLM facility. It may be possible to tweak it to also accept quantitative covariates but I am not convinced that this would have many applications. I don't know what exactly you are aiming at in your analysis but hoping that a covariate has a linear influence on your measured quantity (gene expression, I presume) seems extremely optimistic in the case of age -- and for RIN, I have no idea why one should expect that. By the way, if you encode sex with integers, the GLM fitter might mistake this for a quantitative covariate as well. Better use letters to be sure that it is treated as a factor. Simon
ADD REPLY
0
Entering edit mode
Thank you very much Simon for your response. Nirmala ---------------------------------------------------------------------- -------------- Nirmala Akula, MS, PhD Contractor, Human Genetics Branch NIMH/NIH Blg 35, Rm 1A/205 Bethesda, MD - 20892 Phone# 301-451-4258 -----Original Message----- From: Simon Anders [mailto:anders@embl.de] Sent: Monday, December 12, 2011 4:26 PM To: Akula, Nirmala (NIH/NIMH) [C] Cc: bioconductor at r-project.org Subject: Re: [BioC] help with DESeq Dear Nirmala On 2011-12-12 22:01, Akula, Nirmala (NIH/NIMH) [C] wrote: >> nisc1Design > Condition RIN Age Sex > bipolar1 Bipolar 8.8 46 1 > bipolar2 Bipolar 6.0 48 1 > bipolar3 Bipolar 8.9 73 1 > bipolar4 Bipolar 8.0 56 2 > control1 Control 8.5 45 1 > control2 Control 8.6 57 1 > control3 Control 8.0 63 1 > control4 Control 8.1 39 2 > control5 Control 7.9 56 2 We only had factorial designs in mind when implementing DESeq's GLM facility. It may be possible to tweak it to also accept quantitative covariates but I am not convinced that this would have many applications. I don't know what exactly you are aiming at in your analysis but hoping that a covariate has a linear influence on your measured quantity (gene expression, I presume) seems extremely optimistic in the case of age -- and for RIN, I have no idea why one should expect that. By the way, if you encode sex with integers, the GLM fitter might mistake this for a quantitative covariate as well. Better use letters to be sure that it is treated as a factor. Simon
ADD REPLY

Login before adding your answer.

Traffic: 809 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6