Make ExperimentHubMetadata objects from metadata.csv file located in the "inst/extdata/" package directory of an ExperimentHub package.
Full path to data package including the package name; no trailing slash
Name of single metadata file located in "inst/extdata". If none is provided the function looks for a file named "metadata.csv".
makeExperimentHubMetadata: Reads the resource metadata in the metadata.csv file into a ExperimentHubMetadata object. The ExperimentHubMetadata is inserted in the ExperimentHub database. Intended for internal use or package authors checking the validity of package metadata.
Formatting metadata files:
makeExperimentHubMetadata reads .csv files of metadata
located in "inst/extdata". Internal functions perform checks for
required columns and data types and can be used by package authors
to validate their metadata before submitting the package for
The rows of the .csv file(s) represent individual
resources (i.e., data objects) and the columns are the metadata
fields. All fields should be a single character string of length 1.
Required Fields in metadata file:
character(1). Name of the resource. This can be
the exact file name (if self-describing) or a more complete
character(1). Brief description of the
resource, similar to the 'Description' field in a package
character(1). The first Bioconductor version
the resource was made available for. Unless removed from
the hub, the resource will be available for all versions
greater than or equal to this field. Generally the current
devel version of Bioconductor.
character(1). Genome. Can be NA
character(1). Format of original data, e.g., FASTA,
BAM, BigWig, etc.
getValidSourceTypes() list currently
acceptable values. If nothing seems appropiate for your data
reach out to email@example.com.
character(1). Optional location of original
data files. Multiple urls should be provided as a comma separated
character(1). Version of original data.
character(1). Species.For help on valid
getSpeciesList, validSpecies, or
suggestSpecies. Can be NA.
character(1). Taxonomy ID. There are
checks for valid taxonomyId given the Species which produce
warnings. See GenomeInfoDb::loadTaxonomyDb() for full validation
table. Can be NA.
logical. TRUE if data are
1-based. Can be NA
character(1). Name of company or institution
that supplied the original (raw) data.
character(1). Maintainer name and email in the
following format: Maintainer Name <username@address>.
character(1). R / Bioconductor class the data
are stored in, e.g., GRanges, SummarizedExperiment,
ExpressionSet etc. If the file is loaded or read into R
what is the class of the object.
character(1). Determines how data are
loaded into R. The value for this field should be
‘Rda’ if the data were serialized with
‘Rds’ if serialized with
saveRDS. The filename
should have the appropriate ‘rda’ or ‘rds’
extension. There are other available DispathClass types
and the function
A number of dispatch classes are pre-defined in
AnnotationHub/R/AnnotationHubResource-class.R with the suffix
‘Resource’. For example, if you have sqlite files, the
AnnotationHubResource-class.R defines SQLiteFileResource so
the DispatchClass would be SQLiteFile. Contact
firstname.lastname@example.org if you are not sure which class
to use. The function
AnnotationHub::DispatchClassList() will output a
matrix of currently implemented DispatchClass and brief
description of utility. If a predefine class does not seem
appropriate contact email@example.com. An all
purpose DispathClass is
FilePath that instead of trying
to load the file into R, will only return the path to the
locally downloaded file.
character(1). Do not include this field
if data are stored in the Bioconductor AWS S3; it will be
If data will be accessed from a location other than AWS S3 this field should be the base url.
character().This field should be the
remainder of the path to the resource. The
Location_Prefix will be prepended to
RDataPath for the full path to the resource.
If the resource is stored in Bioconductor's AWS S3
buckets, it should start with the name of the package associated
with the metadata and should not start with a leading
slash. It should include the resource file name. For
strongly associated files, like a bam file and its index
file, the two files should be separates with a colon
:. This will link a single hub id with the multiple files.
‘Tags’ are search terms used to define a subset of
resources in a
Hub object, e.g, in a call to
For ExperimentHub resources, ‘Tags’ are automatically generated from the ‘biocViews’ in the DESCRIPTION. ‘Tags’ values supplied by the user are not be entered in the database and are not part of the formal metadata. This 'controlled vocabulary' approach was taken to limit the search terms to a well defined set and may change in the future.
‘Tags’ for AnnotationHub resources are a free-form field of search terms defined by the user. The package name is added as one of the ‘Tags’ before the metadata are finalized. Multiple ‘Tags’ are specified as a colon separated string, e.g., tags for two resources would look like this:
NOTE: The metadata file can have additional columns beyond the 'Required Fields' listed above. These values are not added to the Hub database but they can be used in package functions to provide an additional level of metadata on the resources.
RDataPath. These two fields make up
the complete file path url for downloading the data file. If using
the Bioconductor AWS S3 bucket the Location_Prefix should not be
included in the metadata file[s] as this field will be populated
RDataPath will be the directory structure you
uploaded to S3. If you uploaded a directory ‘MyAnnotation/’, and
that directory had a subdirectory ‘v1/’ that contained two files
‘counts.rds’ and ‘coldata.rds’, your metadata file will contain
two rows and the RDataPaths would be ‘MyAnnotation/v1/counts.rds’
and ‘MyAnnotation/v1/coldata.rds’. If you host your data on a
publicly accessible site you must include a base url as the
Location_Prefix. If your data file was at
metadata file will have one row and the
Location_Prefix would be
‘ftp://myinstiututeserver/’ and the
RDataPath would be
A list of
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
## makeExperimentHubMetadata() reads data from inst/scripts/<files>.csv ## into ExperimentHubMetadata objects. These objects are used to insert ## metadata into the production database. This function is used internally ## by addResources() and is not intended to be called directly. ## For an example of how this works we can use the GSE62944 ExperimentHub ## package. Download the source tarball from: # http://www.bioconductor.org/packages/devel/data/experiment/html/GSE62944.html ## and unpack it. Set 'pathToPackage' to point to the downloaded source. ## Then call the function: ## Not run: makeExperimentHubMetadata("path/to/mypackage") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.