Learn R Programming

hoardeR (version 0.10)

getAnnotation: Downloading or Importing of Annotation Data

Description

This function downloads (if needed) the annotation file from a given species from NCBI and loads it into the namespace.

Usage

getAnnotation(species=NULL, assembly=NULL, annotationFolder=NULL, 
                type="gff3", verbose)

Value

A data.table with the annotation information.

Arguments

species

The scientific name of the species (String).

assembly

The NCBI assembly version.

annotationFolder

The folder where the file will be stored.

type

The file extension/format of the annotation file.

verbose

Logical, if function gives feedback.

Author

Daniel Fischer

Details

This function downloads for a given species the annotation file, as provided from NCBI. The main parameters basically define the URL, where the file is located. The file is then downloaded into the folder, provided in annotationFolder and then imported to the namespace.

If a file has been downloaded previously, it will be loaded directly from that folder. In case the user wants to use an annotation that is not provided by NCBI, the corresponding files can also be placed into the same folder, following the naming scheme as suggested from the function and the function will load it from there.

Examples

Run this code
if (FALSE) {
susScrofa <- getAnnotation(species = "Sus scrofa", 
                           annotationFolder="/home/user/annotation")
                           
homoSapiens <- getAnnotation(species = "Homo sapiens", 
                             annotationFolder="/home/user/annotation")
}

Run the code above in your browser using DataLab