I found that a RPKM data.frame seems strange. This data.frame is obtained from AnnotationHub and the source is from Epigenomics RoadMap Project. The below is codes help you see the problem.
library("AnnotationHub") ah <- AnnotationHub() epiFiles <- query(ah, "EpigenomeRoadMap") dfs <- subset(epiFiles, rdataclass == "data.frame") # View(data.frame(dfs$title, dfs$description, dfs$sourceurl)) rpkm <- dfs[] # View(rpkm) # the title seems not right, and the last column are all NAs # download it by myself url <- dfs$sourceurl filename <- basename(url) download.file(url, destfile=filename) if (file.exists(filename)) myrpkm <- read.table(filename, header = TRUE, row.names = 1) # View(myrpkm) # it seems right # See # ========================= # EXPRESSION QUANTIFICATION # ========================= # in http://egg2.wustl.edu/roadmap/data/byDataType/rna/README
My sessionInfo is
R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale:  LC_COLLATE=Chinese (Simplified)_People's Republic of China.936  LC_CTYPE=Chinese (Simplified)_People's Republic of China.936  LC_MONETARY=Chinese (Simplified)_People's Republic of China.936  LC_NUMERIC=C  LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages:  parallel stats  graphics grDevices  utils datasets  methods base other attached packages:  AnnotationHub_2.5.12  BiocGenerics_0.19.2 loaded via a namespace (and not attached):  Rcpp_0.12.7  IRanges_2.7.17  digest_0.6.10  mime_0.5  R6_2.2.0  xtable_1.8-2  DBI_0.5-1  stats4_3.3.1  RSQLite_1.0.0  BiocInstaller_1.23.9  httr_1.2.1  curl_2.1  S4Vectors_0.11.18  tools_3.3.1  Biobase_2.33.4  shiny_0.14.1  httpuv_1.3.3  AnnotationDbi_1.35.4  htmltools_0.3.5  interactiveDisplayBase_1.11.3
After I read
I think the first column should be gene id and the first numeric column should be expression index of sample E000. So I load it by
read.table(filename, header = TRUE, row.names = 1).
I found that more than one data.frame with this problem. Hope this kind of data could be reloaded appropriately by AnnotationHub.
Thanks in advance,