operations are possible only for numeric, logical or complex types
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.3 years ago
Hi, I try to use pathview using a list of fold-changes obtained from microarray data, with corresponding ENTREZ ID's. Running the last command I encouter the error: Error in discrete & disc.cond1 : operations are possible only for numeric, logical or complex types I don't understand what the problem is as, to my opinion, my data input is numeric. I did it as follows: #this table is just a txt file with two columns; one #with ENTREZ ID's and one with fold-changes. FDR <- read.table("Foldchange.txt", dec=",", header=T, check.names=FALSE) mode(FDR) [1] "list" class(FDR) [1] "data.frame" #as the "mode" is "list" I unlisted: FDRunlist <- unlist(FDR) is.vector(FDRunlist) [1] TRUE class(FDRunlist) [1] "numeric" mode(FDRunlist) [1] "numeric" names(FDRunlist)[1:5] [1] "19" "20" "52" "59" "87" head(FDRunlist) 19 20 52 59 87 -0.6840078 0.3224513 -0.4224444 -0.1587436 0.7630991 102 -0.4196958 tail(FDRunlist) 100652853 100861532 100874195 100996255 100996511 0.7640486 1.0621681 -0.4461532 0.7015199 0.5199217 100996870 0.4943131 This data looks exactly the same as the gse16873.t example file (except for the negative values) so I don't know why I got the error after the next line: pv.out <- pathview(gene.data=FDRunlist, pathway.id="04930", gene.idtype = "entrez", species="hsa", out.suffix="FDR", limit=list(gene=3.5), discrete=list(gene=F)) I hope somebody can help me out! -- output of sessionInfo(): R version 3.0.1 (2013-05-16) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Dutch_Netherlands.1252 LC_CTYPE=Dutch_Netherlands.1252 LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C LC_TIME=Dutch_Netherlands.1252 attached base packages: [1] splines tools parallel stats graphics grDevices utils datasets methods base other attached packages: [1] pathview_1.1.4 KEGGgraph_1.16.0 graph_1.38.3 XML_3.98-1.1 affyio_1.28.0 survival_2.37-4 multtest_2.16.0 annotate_1.38.0 hgu133plus2.db_2.9.0 [10] org.Hs.eg.db_2.9.0 RSQLite_0.11.4 DBI_0.2-7 AnnotationDbi_1.22.6 vsn_3.28.0 affy_1.38.1 Biobase_2.20.1 BiocGenerics_0.6.0 loaded via a namespace (and not attached): [1] BiocInstaller_1.10.4 grid_3.0.1 IRanges_1.18.4 lattice_0.20-24 limma_3.16.8 MASS_7.3-29 png_0.1-7 preprocessCore_1.22.0 [9] Rgraphviz_2.4.1 stats4_3.0.1 xtable_1.7-1 zlibbioc_1.6.0 -- Sent via the guest posting facility at bioconductor.org.
hgu133plus2 pathview hgu133plus2 pathview • 14k views
ADD COMMENT
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 18 months ago
United States
Hi Linda, Sorry I didn?t notice your question on pathview because of the subject line didn?t seem to be related. Several pathview arguments have to be a list of two elements with "gene" and "cpd" as the names, even though "cpd" value has no actual effect for your case. These include limit, discrete, bins, both.dirs, trans.fun, low, mid, and high. Please check the help info for details: ?pathview So you last call should be: pv.out <- pathview(gene.data=FDRunlist, pathway.id="04930", gene.idtype = "entrez", species="hsa", out.suffix="FDR", limit=list(gene=3.5, cpd=1), discrete=list(gene=F, cpd=F)) you may actually drop discrete argument in a whole above as that?s the default. HTH, Weijun -------------------------------------------- Subject: operations are possible only for numeric, logical or complex types To: bioconductor at r-project.org, lindazuurbier at yahoo.ca Date: Monday, December 16, 2013, 9:43 AM Hi, I try to use pathview using a list of fold-changes obtained from microarray data, with corresponding ENTREZ ID's. Running the last command I encouter the error: Error in discrete & disc.cond1 : ? operations are possible only for numeric, logical or complex types I don't understand what the problem is as, to my opinion, my data input is numeric. I did it as follows: #this table is just a txt file with two columns; one #with ENTREZ ID's and one with fold-changes. FDR <- read.table("Foldchange.txt", dec=",", header=T, check.names=FALSE) mode(FDR) [1] "list" class(FDR) [1] "data.frame" #as the "mode" is "list" I unlisted: FDRunlist <- unlist(FDR) is.vector(FDRunlist) [1] TRUE class(FDRunlist) [1] "numeric" mode(FDRunlist) [1] "numeric" names(FDRunlist)[1:5] [1] "19" "20" "52" "59" "87" head(FDRunlist) ? ? ? ? 19? ? ? ???20? ? ? ???52? ? ? ???59? ? ? ? 87 -0.6840078? 0.3224513 -0.4224444 -0.1587436? 0.7630991 ? ? ???102 -0.4196958 tail(FDRunlist) 100652853? 100861532? 100874195? 100996255? 100996511??? 0.7640486? 1.0621681 -0.4461532? 0.7015199? 0.5199217? 100996870 0.4943131 This data looks exactly the same as the gse16873.t example file (except for the negative values) so I don't know why I got the error after the next line: pv.out? <- pathview(gene.data=FDRunlist, pathway.id="04930", gene.idtype = "entrez", species="hsa", out.suffix="FDR",? limit=list(gene=3.5), discrete=list(gene=F)) I hope somebody can help me out! -- output of sessionInfo(): R version 3.0.1 (2013-05-16) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Dutch_Netherlands.1252? LC_CTYPE=Dutch_Netherlands.1252? ? LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C? ? ? ? ? ? ? ? ? ? ???LC_TIME=Dutch_Netherlands.1252? ? attached base packages: [1] splines???tools? ???parallel? stats? ???graphics? grDevices utils? ???datasets? methods???base? ??? other attached packages: [1] pathview_1.1.4? ? ???KEGGgraph_1.16.0? ???graph_1.38.3? ? ? ???XML_3.98-1.1? ? ? ???affyio_1.28.0? ? ? ? survival_2.37-4? ? ? multtest_2.16.0? ? ? annotate_1.38.0? ? ? hgu133plus2.db_2.9.0 [10] org.Hs.eg.db_2.9.0???RSQLite_0.11.4? ? ???DBI_0.2-7? ? ? ? ? ? AnnotationDbi_1.22.6 vsn_3.28.0? ? ? ? ???affy_1.38.1? ? ? ? ? Biobase_2.20.1? ? ???BiocGenerics_0.6.0? loaded via a namespace (and not attached): [1] BiocInstaller_1.10.4? grid_3.0.1? ? ? ? ? ? IRanges_1.18.4? ? ? ? lattice_0.20-24? ? ???limma_3.16.8? ? ? ? ? MASS_7.3-29? ? ? ? ???png_0.1-7? ? ? ? ? ???preprocessCore_1.22.0 [9] Rgraphviz_2.4.1? ? ???stats4_3.0.1? ? ? ? ? xtable_1.7-1? ? ? ? ? zlibbioc_1.6.0? -- Sent via the guest posting facility at bioconductor.org.
ADD COMMENT

Login before adding your answer.

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