ropensci / UCSCXenaTools

:package: An R package for accessing genomics data from UCSC Xena platform, from cancer multi-omics to single-cell RNA-seq https://cran.r-project.org/web/packages/UCSCXenaTools/
https://docs.ropensci.org/UCSCXenaTools
GNU General Public License v3.0
106 stars 12 forks source link

UCSCXenaTools: Retrieve Gene Expression and Clinical Information from UCSC Xena for Survival Analysis #40

Closed gbregni closed 3 months ago

gbregni commented 5 months ago

Hi, I tried to use the markdown published on https://ropensci.org/blog/2019/09/06/ucscxenatools-surv/

This is what happens:

merged_data = tibble(sampleID = names(KRAS), KRAS_expression = as.numeric(KRAS)) %>% left_join(cli, by = "sampleID") %>% filter(sample_type == "Primary Tumor") %>% # Keep only 'Primary Tumor' select(sampleID, KRAS_expression, OS.time, OS) %>% rename(time = OS.time, status = OS)

Error in auto_copy(): ! x and y must share the same src. ℹ x is a <tbl_df/tbl/data.frame> object. ℹ y is a list. ℹ Set copy = TRUE if y can be copied to the same source as x (may be slow). Run rlang::last_trace() to see where the error occurred.

I think this is due to the fact that cli is not a 6 x 157 nibble as in your markdown, but rather a list of 2 tibbles ($LUAD_clinicalMatrix # and $LUAD_survival.txt), each containing part of the needed info. Any suggestions? Thanks!

github-actions[bot] commented 5 months ago

Thanks for reporting, Shixiang will reply as soon as possible:)

ShixiangWang commented 3 months ago

Sorry for the delay. The data source has been changed.

cli = XenaPrepare(cli_query)

cli$LUAD_clinicalMatrix
cli$LUAD_survival.txt

You have to merged the two dataframe as a dataframe.