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

Error in fetch_dense_values #41

Closed
jbagnot opened this issue Jun 27, 2024 · 3 comments
Closed

Error in fetch_dense_values #41

jbagnot opened this issue Jun 27, 2024 · 3 comments

Comments

@jbagnot
Copy link

jbagnot commented Jun 27, 2024

Hello, thank you for the wonderful tool. First time posting, so please let me know if this issue has been solved elsewhere (I couldn't find) or if more information would be helpful. I have been using a method similar to that outlined here (https://shixiangwang.github.io/home/en/post/ucscxenatools-201908/) for fetching dense values for quite some time, but at some point the past few months my previous code started throwing the following error message when running: Error in FUN(X[[i]], ...) : is.atomic(p) | is.list(p) is not TRUE

I get it running the same code as the vignette:

> luad_cohort = XenaData %>%
+     filter(XenaHostNames == "tcgaHub") %>% # select TCGA Hub
+     XenaScan("TCGA Lung Adenocarcinoma")   # select LUAD cohort
> luad_cohort
# A tibble: 23 × 17
   XenaHosts                XenaHostNames XenaCohorts XenaDatasets SampleCount DataSubtype Label Type 
   <chr>                    <chr>         <chr>       <chr>              <int> <chr>       <chr> <chr>
 1 https://tcga.xenahubs.n… tcgaHub       TCGA Lung … RABIT/separ…         467 pathway ac… RABI… clin…
 2 https://tcga.xenahubs.n… tcgaHub       TCGA Lung … RABIT/separ…         120 pathway ac… RABI… clin…
 3 https://tcga.xenahubs.n… tcgaHub       TCGA Lung … TCGA.LUAD.s…         151 DNA methyl… Meth… geno…
 4 https://tcga.xenahubs.n… tcgaHub       TCGA Lung … TCGA.LUAD.s…         492 DNA methyl… Meth… geno…

> ge <- luad_cohort %>%
+     filter(DataSubtype == 'gene expression RNAseq', Label == 'IlluminaHiSeq')
> ge
# A tibble: 1 × 17
  XenaHosts                 XenaHostNames XenaCohorts XenaDatasets SampleCount DataSubtype Label Type 
  <chr>                     <chr>         <chr>       <chr>              <int> <chr>       <chr> <chr>
1 https://tcga.xenahubs.net tcgaHub       TCGA Lung … TCGA.LUAD.s…         576 gene expre… Illu… geno…
# ℹ 9 more variables: AnatomicalOrigin <chr>, SampleType <chr>, Tags <chr>, ProbeMap <chr>,
#   LongTitle <chr>, Citation <chr>, Version <chr>, Unit <chr>, Platform <chr>

> KRAS = fetch_dense_values(host = ge$XenaHosts,
+                           dataset = ge$XenaDatasets,
+                           identifiers = "KRAS",
+                           use_probeMap = TRUE) %>%
+     .[1, ]
Error in FUN(X[[i]], ...) : is.atomic(p) | is.list(p) is not TRUE
Copy link

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

@ShixiangWang
Copy link
Member

Should be networking issue.

> library(UCSCXenaTools)
> luad_cohort = XenaData %>%
+   dplyr::filter(XenaHostNames == "tcgaHub") %>% # select TCGA Hub
+   XenaScan("TCGA Lung Adenocarcinoma")   # select LUAD cohort
> luad_cohort
# A tibble: 23 × 17
   XenaHosts    XenaHostNames XenaCohorts XenaDatasets SampleCount DataSubtype
   <chr>        <chr>         <chr>       <chr>              <int> <chr>      
 1 https://tcgtcgaHub       TCGA LungRABIT/separ467 pathway ac2 https://tcgtcgaHub       TCGA LungRABIT/separ120 pathway ac3 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s151 DNA methyl4 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s492 DNA methyl5 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s516 copy numbe6 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s237 protein ex7 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s576 gene expre8 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s60 miRNA matu9 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s576 gene expre10 https://tcgtcgaHub       TCGA LungTCGA.LUAD.s576 gene expre# ℹ 13 more rows
# ℹ 11 more variables: Label <chr>, Type <chr>, AnatomicalOrigin <chr>,
#   SampleType <chr>, Tags <chr>, ProbeMap <chr>, LongTitle <chr>,
#   Citation <chr>, Version <chr>, Unit <chr>, Platform <chr>
# ℹ Use `print(n = ...)` to see more rows
> ge <- luad_cohort %>%
+   dplyr::filter(DataSubtype == 'gene expression RNAseq', Label == 'IlluminaHiSeq')
> ge
# A tibble: 1 × 17
  XenaHosts     XenaHostNames XenaCohorts XenaDatasets SampleCount DataSubtype
  <chr>         <chr>         <chr>       <chr>              <int> <chr>      
1 https://tcgatcgaHub       TCGA LungTCGA.LUAD.s576 gene expre# ℹ 11 more variables: Label <chr>, Type <chr>, AnatomicalOrigin <chr>,
#   SampleType <chr>, Tags <chr>, ProbeMap <chr>, LongTitle <chr>,
#   Citation <chr>, Version <chr>, Unit <chr>, Platform <chr>
> KRAS = fetch_dense_values(host = ge$XenaHosts,
+                           dataset = ge$XenaDatasets,
+                           identifiers = "KRAS",
+                           use_probeMap = TRUE) %>%
+   .[1, ]
-> Obtaining gene symbols from probeMap...
-> Checking identifiers...
-> Done.
-> Checking samples...
-> Done.
-> Checking if the dataset has probeMap...
-> Done. ProbeMap is found.
> KRAS
TCGA-69-7978-01 TCGA-62-8399-01 TCGA-78-7539-01 TCGA-50-5931-11 
         10.250          10.290          10.820          10.290 

@jbagnot
Copy link
Author

jbagnot commented Jul 25, 2024

Thank you for the reply. I'm not sure what was causing the error exactly, but I found a work around in which I set samples equal to the 'sample' column from the clinical query survival object. For some reason I get this error when samples = NULL. Using the vignette the following then was successful:

KRAS = fetch_dense_values(host = ge$XenaHosts,
+                           dataset = ge$XenaDatasets,
+                           identifiers = "KRAS",
+                           samples = cli$LUAD_survival.txt$sample,
+                           use_probeMap = TRUE) %>%
+   .[1, ]

@jbagnot jbagnot closed this as completed Jul 25, 2024
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