[BioC] edgeR: error in readDGE
Wolfgang Huber
whuber at embl.de
Thu Nov 11 10:35:47 CET 2010
Dear Takuya
thanks, great.
The third file had apparently contained non-numeric values in the
'COUNT' column, which you fixed subsequently.
Wolfgang.
Il Nov/11/10 2:47 AM, $BB<ED(B $BBnLi(B ha scritto:
> Wolfgang,
>
> Thank you for your kind reply!
> I tried to change format by EXCEL (I am just beginner of R since this week...)
> Anyway it looks OK!
>
>
>
> BEFORE
>> for (f in targets$files)
> + str(read.delim(f, stringsAsFactors=FALSE))
> 'data.frame': 42131 obs. of 2 variables:
> $ SEQUENCE: chr "AAACAGCAGAGAGAGAGAGAGAGAGAG" "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" ...
> $ COUNT : int 0 0 0 0 0 0 0 0 0 0 ...
> 'data.frame': 42130 obs. of 2 variables:
> $ AAACAGCAGAGAGAGAGAGAGAGAGAG: chr "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" "AACAGCAGAACAAGCTGCTGTCTCTGT" ...
> $ X0 : int 3 5 0 0 14 0 0 0 0 0 ...
> 'data.frame': 42131 obs. of 2 variables:
> $ SEQUENCE: chr "AAACAGCAGAGAGAGAGAGAGAGAGAG" "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" ...
> $ COUNT : chr "0" "0" "0" "0" ...
> 'data.frame': 42131 obs. of 2 variables:
> $ SEQUENCE: chr "AAACAGCAGAGAGAGAGAGAGAGAGAG" "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" ...
> $ COUNT : int 0 0 0 0 0 0 0 0 0 0 ...
>
>
> AFTER
>
>> for (f in targets$files)
> + str(read.delim(f, stringsAsFactors=FALSE))
> 'data.frame': 42131 obs. of 2 variables:
> $ SEQUENCE: chr "AAACAGCAGAGAGAGAGAGAGAGAGAG" "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" ...
> $ COUNT : num 0 0 0 0 0 0 0 0 0 0 ...
> 'data.frame': 42131 obs. of 2 variables:
> $ SEQUENCE: chr "AAACAGCAGAGAGAGAGAGAGAGAGAG" "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" ...
> $ COUNT : num 0 3 5 0 0 14 0 0 0 0 ...
> 'data.frame': 42131 obs. of 2 variables:
> $ SEQUENCE: chr "AAACAGCAGAGAGAGAGAGAGAGAGAG" "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" ...
> $ COUNT : num 0 0 0 0 0 0 0 0 0 0 ...
> 'data.frame': 42131 obs. of 2 variables:
> $ SEQUENCE: chr "AAACAGCAGAGAGAGAGAGAGAGAGAG" "AAACAGCAGGTACAAGATCTACCCGGG" "AAACAGCAGTGTTCTGAAGCCAAACTC" "AACAGCAGAAAAAGCTGCTGTCTCTGT" ...
> $ COUNT : num 0 0 0 0 0 0 0 0 0 0 ...
>> d<- readDGE(targets)
>> d
> An object of class "DGEList"
> $samples
> files group description lib.size norm.factors
> 1 GAT.txt MT FT9 65895 1
> 2 ACA.txt WT FT9 67888 1
> 3 ACT.txt MT FT10 65144 1
> 4 ACG.txt WT FT10 23938 1
>
> $counts
> 1 2 3 4
> AAACAGCAGAGAGAGAGAGAGAGAGAG 0 0 0 0
> AAACAGCAGGTACAAGATCTACCCGGG 0 3 0 0
> AAACAGCAGTGTTCTGAAGCCAAACTC 0 5 0 0
> AACAGCAGAAAAAGCTGCTGTCTCTGT 0 0 0 0
> AACAGCAGAACAAGCTGCTGTCTCTGT 0 0 0 0
> 42126 more rows ...
>
>
> Thank you again.
>
> Best,
>
> Takuya
>
>
> On 2010/11/10, at 18:33, Wolfgang Huber wrote:
>
>> $BB<ED(B $BBnLi(B,
>>
>> It looks like the second column ("COUNT") in your files is not always numeric. Can you send the output of the following:
>>
>> for (f in targets$files)
>> str(read.delim(f, stringsAsFactors=FALSE))
>>
>>
>> Best wishes
>> Wolfgang
>>
>> Il Nov/10/10 9:36 AM, $BB<ED(B $BBnLi(B ha scritto:
>>> I am a beginner of everything of R and edgeR; just like "copy and paste of the command" of the manual.
>>>
>>> I tried to make DGEList object like descriptions on page 9.
>>> I could make object, "target", as follows.
>>>> targets
>>> files group description
>>> 1 GAT.txt MT FT9
>>> 2 ACA.txt WT FT9
>>> 3 ACT.txt MT FT10
>>> 4 ACG.txt WT FT10
>>>
>>> On the next command, I failed.
>>> d<- readDGE(targets)
>>>
>>> (I deleted "skip = 5, comment.char = "#"" from original command, because on my understanding,
>>> there were no rows to be skipped, nor comments.)
>>>
>>> error colSums(x$counts) : 'x' must be numeric
>>>
>>> This error message might be inaccurate, because it is localized.
>>>
>>> GAT.txt, and other txt files were made as a tab-delimited, plain-text, as follows, for example.
>>> SEQUENCE COUNT
>>> AAACAGCAGAGAGAGAGAGAGAGAGAG 0
>>> AAACAGCAGGTACAAGATCTACCCGGG 0
>>> AAACAGCAGTGTTCTGAAGCCAAACTC 0
>>> ....
>>>
>>> I use R for Mac OSX GUI 1.35 and newest edgeR.
>>>
>>> I am very happy, if you have any comments.
>>> Thank you.
>>>
>>> Takuya
>>>
>>> _______________________________________________
>>> Bioconductor mailing list
>>> Bioconductor at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
More information about the Bioconductor
mailing list