knitr::opts_chunk$set(echo = TRUE)
library(dplyr) library(LoomExperiment) library(hca) library(hcaquery)
hca
packagehca::projects()
brain_homo_sapien_filter <- hca::filters( genusSpecies = list(is = "Homo sapiens"), organ = list(is = c("brain")), workflow = list(is = c("optimus_v4.2.2"))) brain_homo_sapien_proj <- hca::projects(filters = brain_homo_sapien_filter) brain_homo_sapien_proj
project_id <- brain_homo_sapien_proj$projectId[3]
file_filter <- hca::filters(projectId = list(is = project_id)) proj_files <- hca::files(filter = file_filter) proj_files
additional_file_filters <- hca::filters(projectId = list(is = project_id), fileFormat = list(is = "loom"), donorCount = list(is = c(1))) proj_files_refined <- hca::files(filter = additional_file_filters, sort = "fileSize", order = "asc") proj_files_refined
project_file_locations <- proj_files_refined %>% hca::files_download() project_file_locations
hcaquery
package.loom
files from the Optimus workflow across all projectstest_file_filter <- hca::filters(workflow = list(is = c("optimus_v4.2.2")), fileFormat = list(is = c("loom"))) test_file_tbl <- hca::files(filters = test_file_filter, size = 2, sort = "fileSize", order = "asc") project_file_locations <- test_file_tbl %>% hca::files_download()
exp_1 <- LoomExperiment::import(project_file_locations[1], type = "SingleCellLoomExperiment") metadata(exp_1) exp_2 <- LoomExperiment::import(project_file_locations[2], type = "SingleCellLoomExperiment") metadata(exp_2)
hcaquery::files_to_db(test_file_tbl)
hcaquery::available_tables() hcaquery::table_description("genes_tbl") hcaquery::table_description("cells_tbl") hcaquery::table_description("assays_tbl") hcaquery::table_description("experiment_overviews")
## example of queries on accessible db tables hca_tbls <- hca_tables() human_experiments <- hca_tbls$experiments_tbl %>% filter(donor_organism_genus_species == "Homo sapiens") human_experiments
SingleCellExperiment
objectgenes <- c("Gm18956", "Gm37180", "Gm37363") smat <- hca_file_gene_query(genes = genes, file_ident = "b077b456-6362-59ea-a5b6-230dd8bc6d91") smat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.