meta.retrieval: Perform Meta-Genome Retrieval

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/meta.retrieval.R

Description

Download genomes, proteomes, cds, gff, rna, or assembly stats files of all species within a kingdom of life.

Usage

1
2
3
meta.retrieval(db = "refseq", kingdom, group = NULL, type = "genome",
  restart_at_last = TRUE, reference = TRUE, combine = FALSE,
  path = NULL)

Arguments

db

a character string specifying the database from which the genome shall be retrieved:

  • db = "refseq"

  • db = "genbank"

  • db = "emsembl"

  • db = "ensemblgenomes"

kingdom

a character string specifying the kingdom of the organisms of interest, e.g.

  • For NCBI RefSeq:

    • kingdom = "archaea"

    • kingdom = "bacteria"

    • kingdom = "fungi"

    • kingdom = "invertebrate"

    • kingdom = "plant"

    • kingdom = "protozoa"

    • kingdom = "viral"

    • kingdom = "vertebrate_mammalian"

    • kingdom = "vertebrate_other"

  • For NCBI Genbank:

    • kingdom = "archaea"

    • kingdom = "bacteria"

    • kingdom = "fungi"

    • kingdom = "invertebrate"

    • kingdom = "plant"

    • kingdom = "protozoa"

    • kingdom = "vertebrate_mammalian"

    • kingdom = "vertebrate_other"

  • For ENSEMBL:

    • kingdom = "Ensembl"

  • For ENSEMBLGENOMES

    • kingdom = "EnsemblBacteria"

    • kingdom = "EnsemblFungi"

    • kingdom = "EnsemblMetazoa"

    • kingdom = "EnsemblPlants"

    • kingdom = "EnsemblProtists"

Available kingdoms can be retrieved with getKingdoms.

group

only species belonging to this subgroup will be downloaded. Groups can be retrieved with getGroups.

type

type of sequences that shall be retrieved. Options are:

  • type = "genome" : (for genome assembly retrieval; see also getGenome),

  • type = "proteome" : (for proteome retrieval; see also getProteome),

  • type = "cds" : (for coding sequence retrieval; see also getCDS),

  • type = "gff" : (for annotation file retrieval in gff format; see also getGFF),

  • type = "gtf" : (for annotation file retrieval in gtf format (only for ensembl and ensemblgenomes); see also getGTF)

  • type = "rna" : (for RNA file retrieval in fasta format; see also getRNA),

  • type = "rm" : (for Repeat Masker output file retrieval; see also getRepeatMasker),

  • type = "assemblystats" : (for genome assembly quality stats file retrieval; see also getAssemblyStats).

restart_at_last

a logical value indicating whether or not meta.retrieval should pick up at the last species when re-running the function.

  • If restart_at_last = TRUE (Default) then meta.retrieval will skip all organisms that are already present in the folder and will start downloading all remaining species. However, this way meta.wretrieval will not be able to check whether already downloaded organism files are corrupted or not by checking the md5 checksum.

  • If restart_at_last = FALSE then meta.retrieval will start from the beginning and crawl through already downloaded organism files and check whether already downloaded organism files are corrupted or not by checking the md5 checksum. After checking existing files the function will start downloading all remaining organisms.

reference

a logical value indicating whether or not a genome shall be downloaded if it isn't marked in the database as either a reference genome or a representative genome.

combine

just in case type = "assemblystats" is specified, shall assemby stats of individual species be imported and combined to a data.frame?

path

path to the folder in which downloaded genomes shall be stored. By default the kingdom name is used to name the output folder.

Details

This function aims to perform bulk retrieval of the genomes, proteomes, cds, etc. of species that belong to the same kingdom of life or to the same subgroup.

Value

a character vector storing the file paths of the retrieved files.

Author(s)

Hajk-Georg Drost

See Also

meta.retrieval.all, getCollection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Not run: 
# get all available kingdoms for refseq
getKingdoms(db = "refseq")
# download all vertebrate genomes from refseq
meta.retrieval(kingdom = "vertebrate_mammalian", 
               db = "refseq", 
               type = "genome")

# get all available kingdoms for genbank
getKingdoms(db = "genbank")
# download all vertebrate genomes from genbank
meta.retrieval(kingdom = "vertebrate_mammalian", 
               db = "genbank", 
               type = "genome")

# get all available kingdoms for ensemblgenomes
getKingdoms(db = "ensemblgenomes")
# download all vertebrate genomes from ensemblgenomes
meta.retrieval(kingdom = "vertebrate_mammalian", 
               db = "ensemblgenomes", 
               type = "genome")

# In case users do not wish to retrieve genomes from an entire kingdom, 
# but rather from a subgoup (e.g. from species belonging to the 
# Gammaproteobacteria class, a subgroup of the bacteria kingdom), 
# they can use the following workflow"
# First, users can again consult the getKingdoms() function to retrieve 
# kingdom information.
getKingdoms(db = "refseq")

# In this example, we will choose the bacteria kingdom. 
# Now, the getGroups() function allows users to obtain available 
# subgroups of the bacteria kingdom.
getGroups(db = "refseq", kingdom = "bacteria")

# Now we choose the group Gammaproteobacteria and specify 
# the group argument in the meta.retrieval() function
meta.retrieval(kingdom = "bacteria", 
   roup = "Gammaproteobacteria", 
   db = "refseq", 
   type = "genome")

## End(Not run)

biomartr documentation built on July 2, 2018, 1:02 a.m.