read_metadata {recount3} | R Documentation |
This function reads in the recount3
metadata files into R. You can first
locate the files using locate_url()
then download it to your computer
using file_retrieve()
.
read_metadata(metadata_files)
metadata_files |
A |
A data.frame()
with all lower case column names for the sample
metadata.
Other internal functions for accessing the recount3 data:
annotation_ext()
,
create_rse_manual()
,
file_retrieve()
,
locate_url_ann()
,
locate_url()
,
project_homes()
,
read_counts()
## Download the metadata files for project ERP110066 url_ERP110066_meta <- locate_url( "ERP110066", "data_sources/sra" ) local_ERP110066_meta <- file_retrieve( url = url_ERP110066_meta ) ## Read the metadata ERP110066_meta <- read_metadata(local_ERP110066_meta) dim(ERP110066_meta) colnames(ERP110066_meta) ## Read the metadata files for a project in a collection ## Note: using the test files since I can't access collections right now ## for this collection ERP110066_collection_meta <- read_metadata( metadata_files = file_retrieve( locate_url( "ERP110066", "collections/geuvadis_smartseq", recount3_url = "http://snaptron.cs.jhu.edu/data/temp/recount3" ) ) ) dim(ERP110066_collection_meta) ## New columns for this collection colnames(ERP110066_collection_meta)[!colnames(ERP110066_collection_meta) %in% colnames(ERP110066_meta)] ## Read the metadata for a mouse project DRP002367_meta <- read_metadata( metadata_files = file_retrieve( locate_url("DRP002367", "data_sources/sra", organism = "mouse") ) ) dim(DRP002367_meta) ## Locate and read the GTEx bladder metadata gtex_bladder_meta <- read_metadata( file_retrieve( locate_url("BLADDER", "data_sources/gtex") ) ) dim(gtex_bladder_meta) colnames(gtex_bladder_meta)