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

principal component cannot be selected #36

Open
stemangiola opened this issue May 21, 2024 · 0 comments
Open

principal component cannot be selected #36

stemangiola opened this issue May 21, 2024 · 0 comments

Comments

@stemangiola
Copy link
Collaborator

library(spatialLIBD)
library(ExperimentHub)

spatial_data <- 
  ExperimentHub::ExperimentHub() |> 
  spatialLIBD::fetch_data( eh = _, type = "spe")

Principal components are there in the tibble representation

spatial_data |> as_tibble() |> colnames()

But cannot be selected

spatial_data |> select(PC1)

Error in `select_helper()`:
! Can't select columns that don't exist.Column `PC1` doesn't exist.

However, tidySCE can

spatial_data |> as("SingleCellExperiment") |> select(PC1)
tidySingleCellExperiment says: Key columns are missing. A data frame is returned for independent data analysis.
# A tibble: 47,681 × 1
       PC1
     <dbl>
 1  -2.04 
 2   3.36 
 3  -6.82 
 4 -17.6  
 5   0.371
 6   0.468
 7  -7.07 
 8  -1.24 
 9   3.47 
10   2.78 
# ℹ 47,671 more rows
# ℹ Use `print(n = ...)` to see more rows
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

1 participant