AnnotationHubMetadata-class {AnnotationHubData} | R Documentation

## Class `"AnnotationHubMetadata"` and methods

### Description

`AnnotationHubMetadata` is used to represent record(s) in the server data base.

### Usage

    AnnotationHubMetadata(AnnotationHubRoot, SourceUrl, SourceType,
    		 SourceVersion, SourceLastModifiedDate, SourceMd5 =
    		 NA_character_, SourceSize, DataProvider, Title,
    		 Description, Species, TaxonomyId, Genome, Tags,
    		 Recipe, RDataClass, RDataDateAdded, RDataPath,
    		 Maintainer, ..., BiocVersion = BiocManager::version(),
    		 Coordinate_1_based = TRUE, Notes = NA_character_,
    		 DispatchClass, Location_Prefix =
    		 "http://s3.amazonaws.com/annotationhub/")

    toJson(x)
    constructSeqInfo(species, genome)

    metadata(x, ...)
    hubError(x)
    inputFiles(object, ...)
    outputFile(object)
    ahmToJson(ahm)
    deleteResources(id)
    getImportPreparerClasses()
    makeAnnotationHubResource(objName, makeAnnotationHubMetadataFunction,
    			  ..., where)

### Arguments

`AnnotationHubRoot` | `character(1)` Absolute path to directory structure containing resources to be added to AnnotationHub. Internal use only.
`SourceUrl` | `character()` URL of original resource(s).
`SourceType` | `character()` Form of original data, e.g., BED, FASTA, etc. `getValidSourceTypes()` list currently acceptable values. If nothing seems appropiate for your data reach out to maintainer@bioconductor.org.
`SourceVersion` | `character(1)` Version of original file.
`SourceLastModifiedDate` | `POSIXct()` The date when the source was last modified.
`SourceMd5` | `character()` md5 hash of original file.
`SourceSize` | `numeric(1)` Size of original file in bytes.
`DataProvider` | `character(1)` Provider of original data, e.g., NCBI, UniProt etc.
`Title` | `character(1)` Title for the resource with version or genome build as appropriate.
`Description` | `character(1)` Description of the resource. May include details such as data type, format, study origin, sequencing technology, treated vs control, number of samples etc.
`Species` | `character(1)` Species name. For help on valid species see `getSpeciesList, validSpecies, or suggestSpecies.`
`TaxonomyId` | `character(1)` NCBI code. There are checks for valid taxonomyId given the Species which produce warnings. See GenomeInfoDb::loadTaxonomyDb() for full validation table.
`Genome` | `character(1)` Name of genome build.
`Tags` | `character()` Free-form tags that serve as search terms.
`Recipe` | `character(1)` Name of recipe function. Only applicable to recipes created by the Bioconductor core team and included in AnnotationHubData base code.
`RDataClass` | `character()` Class of derived R object, e.g., GRanges. Length must match the length of `RDataPath`.
`RDataDateAdded` | `POSIXct()` Date resource was added to AnnotationHub. The default is today's date and is auto-generated when metadata are constructed. Resources will appear in snapshots with a date greater than or equal to the `RDataDateAdded`.
`RDataPath` | `character()` File path to where object is stored in AWS S3 bucket or on the web.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.
`Maintainer` | `character(1)` Maintainer name and email address, ‘A Maintainer a.maintainer@email.com’
`BiocVersion` | `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.
`Coordinate_1_based` | `logical(1)` Do coordinates start with 1 or 0?
`DispatchClass` | `character(1)`. Determines how data are loaded into R. The value for this field should be ‘Rda’ if the data were serialized with `save()` and ‘Rds’ if serialized with `saveRDS`. The filename should have the appropriate ‘rda’ or ‘rds’ extension. 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 maintainer@bioconductor.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 maintainer@bioconductor.org.
`Location_Prefix` | `character(1)` URL location of AWS S3 bucket or web site where resource is located.
`Notes` | `character()` Notes about the resource.
`ahm` | An instance of class `AnnotationHubMetadata`.
`x` | An instance of class `AnnotationHubMetadata`.
`object` | An `AnnotationHubRecipe` instance.
`species` | `character(1)` The organism, e.g., "Homo sapiens".
`genome` | `character(1)` The genome build, e.g., "hg19".
`id` | An id whose DB record is to be fully deleted.
`objName` | `character(1)` The name of the PreparerClass used for dispatch.
`makeAnnotationHubMetadataFunction` | `function` Function (name) that makes `AnnotationHubMetadata` objects from the resource(s).
`where` | Environment where function definition is defined. Default value is sufficient.
`...` | Additional arguments passed to methods.

### Value

`AnnotationHubMetadata` returns an instance of the class.

`jsonPath` returns a `character(1))` representation of the full path to the location of the `json` file associated with this record.

`toJson` returns the JSON representation of the record.

`fromJson` retuns an instance of the class, as parsed from the JSON file.

### Objects from the Class

Objects can be created by calls to the constructor, `AnnotationHubMetadata()`.

### Author(s)

Dan Tenenbaum and Marc Carlson

### Examples

    getClass("AnnotationHubMetadata")

[Package AnnotationHubData version 1.20.2 Index]