Error in colSums(counts) : 'x' must be numeric
1
0
Entering edit mode
@khan-saad-m-mu-student-4839
Last seen 9.6 years ago
Hi I am a novice in both R and EdgeR. I have a readcounts tab seperated file (with around 24 conditions belonging to 6 different groups with its first column containing the tag identifiers and the other columns containing the read counts. I used read.delim function in R in the following manner :- seq_data <- read.table("newfile.txt", header = TRUE, sep = "\t" ) after that I tried to make a DGEList in the following manner :- Dlist <- DGEList (counts = seq_data) it gives me the following error :- Error in colSums(counts) : 'x' must be numeric after going through the mailing list i also tried the solution given below in one of the mailing list :- for (f in seq_data$files) str(read.delim(f, stringAsFactors=FALSE)) but it does not works. Please suggest where I am going wrong thanks & regards Saad [[alternative HTML version deleted]]
edgeR edgeR • 12k views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 5 weeks ago
United States
note that read.table creates a data.frame instance (see ?read.table, Value section). As far as I can tell, DGEList will succeed with such an input although it explicitly asks for a matrix in its help page. Therefore the most likely issue is that you have some nonnumeric data in a column of your seq_data. You will need to spend some time with R documentation to become more independent with interpreting error messages. Please do read the bioconductor mailing list posting guide. On Wed, Sep 7, 2011 at 7:36 PM, Khan, Saad M. (MU-Student) < smk5g5@mail.missouri.edu> wrote: > Hi I am a novice in both R and EdgeR. I have a readcounts tab seperated > file (with around 24 conditions belonging to 6 different groups with its > first column containing the tag identifiers and the other columns containing > the read counts. I used read.delim function in R in the following manner :- > > > > seq_data <- read.table("newfile.txt", header = TRUE, sep = "\t" ) > > > > after that I tried to make a DGEList in the following manner :- > > > > Dlist <- DGEList (counts = seq_data) > > > > it gives me the following error :- > > > > Error in colSums(counts) : 'x' must be numeric > > > > after going through the mailing list i also tried the solution given below > in one of the mailing list :- > > > > for (f in seq_data$files) > > str(read.delim(f, stringAsFactors=FALSE)) > > > > but it does not works. Please suggest where I am going wrong > > > > thanks & regards > > Saad > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 971 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