Description Usage Arguments Details Value Author(s) See Also Examples
Retrieving genomes from NCBI using the Entrez programming utilities.
1 | entrezDownload(accession, out.file, verbose = TRUE)
|
accession |
A character vector containing a set of valid accession numbers at the NCBI Nucleotide database. |
out.file |
Name of the file where downloaded sequences should be written in FASTA format. |
verbose |
Logical indicating if textual output should be given during execution, to monitor the download progress. |
The Entrez programming utilities is a toolset for automatic download of data from the
NCBI databases, see E-utilities Quick Start
for details. entrezDownload
can be used to download genomes from the NCBI Nucleotide
database through these utilities.
The argument accession must be a set of valid accession numbers at NCBI Nucleotide, typically all accession numbers related to a genome (chromosomes, plasmids, contigs, etc). For completed genomes, where the number of sequences is low, accession is typically a single text listing all accession numbers separated by commas. In the case of some draft genomes having a large number of contigs, the accession numbers must be split into several comma-separated texts. The reason for this is that Entrez will not accept too many queries in one chunk.
The downloaded sequences are saved in out.file on your system. This will be a FASTA formatted file.
Note that all downloaded sequences end up in this file. If you want to download multiple genomes,
you call entrezDownload
multiple times and store in multiple files.
The name of the resulting FASTA file is returned (same as out.file
), but the real result of
this function is the creation of the file itself.
Lars Snipen and Kristian Liland.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# Accession numbers for the chromosome and plasmid of Buchnera aphidicola, strain APS
acc <- "BA000003.2,AP001071.1"
genome.file <- tempfile(pattern = "Buchnera_aphidicola", fileext = ".fna")
txt <- entrezDownload(acc, out.file = genome.file)
# ...cleaning...
ok <- file.remove(genome.file)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.