Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem regarding get a column metadata #7

Closed
git-jrwang opened this issue Sep 22, 2017 · 4 comments
Closed

Problem regarding get a column metadata #7

git-jrwang opened this issue Sep 22, 2017 · 4 comments

Comments

@git-jrwang
Copy link

Hi:

I try your example code to get column metadata from the sample .gctx file. It gives me an error as follow:
Error in withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning")) :
invalid multibyte string at '<84>'
I am not sure what happens?

@tnat1031
Copy link
Contributor

Hi @git-jrwang , sorry you are having a problem. Can you please post the command you are running? Also does this work for you (from within R console)?

library(cmapR)
example("read.gctx.meta")

@git-jrwang
Copy link
Author

I can read row meta, but not column meta. Here is the output of code.

library("cmapR")
Loading required package: rhdf5
Loading required package: data.table
data.table 1.10.4
The fastest way to learn (by data.table authors): https://www.datacamp.com/courses/data-analysis-the-data-table-way
Documentation: ?data.table, example(data.table) and browseVignettes("data.table")
Release notes, videos and slides: http://r-datatable.com
example("read.gctx.meta")

rd.gc.> gct_file <- system.file("extdata", "modzs_n272x978.gctx", package="cmapR")

rd.gc.> # row meta
rd.gc.> row_meta <- read.gctx.meta(gct_file)

rd.gc.> str(row_meta)
'data.frame': 978 obs. of 6 variables:
$ id : chr "200814_at" "222103_at" "201453_x_at" "204131_s_at" ...
$ is_bing : int 1 1 1 1 1 1 1 1 1 1 ...
$ is_lm : int 1 1 1 1 1 1 1 1 1 1 ...
$ pr_gene_id : int 5720 466 6009 2309 387 3553 427 5898 23365 6657 ...
$ pr_gene_symbol: chr "PSME1" "ATF1" "RHEB" "FOXO3" ...
$ pr_gene_title : chr "proteasome (prosome, macropain) activator subunit 1 (PA28 alpha)" "activating transcription factor 1" "Ras homolog enriched in brain" "forkhead box O3" ...

rd.gc.> # column meta
rd.gc.> col_meta <- read.gctx.meta(gct_file, dimension="column")
Error in withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning")) :
invalid multibyte string at '<84>'

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950
[2] LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950

attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base

other attached packages:
[1] cmapR_1.0 data.table_1.10.4 rhdf5_2.20.0

loaded via a namespace (and not attached):
[1] zlibbioc_1.22.0 compiler_3.4.1 tools_3.4.1

@git-jrwang
Copy link
Author

I have found problem myself. It is my LC_Locale. If I change to English, the problem solved.

@tnat1031
Copy link
Contributor

@git-jrwang great, thanks for letting us know about that and glad you could solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants