Description Usage Arguments Note Author(s) References See Also Examples
This function fetch sequences from the NCBI GenBank into fasta or GenBank files. The elements can be a result from function searchGB or a vector with UIDs or GenBank accession numbers.
1 | fetchseq(ids, db="nuccore", rettype="fasta", retmode="text")
|
ids |
data recovered from function |
db |
The database to retrieve sequences from. It uses UIDs or GenBank Accession numbers. It can be any of available options in NCBI databases. Set to "nuccore" as default. It retrieves data from two databases, genbank (any database) or pubmed. |
rettype |
either "fasta" or "gb". Set to "fasta" as default (best for retrieving data from a vector of UIDs or Accession numbers with known taxa). "gb" option retrieves more data information for each sequence (recommended when retrieving data from a search with function searchGB). New options added for db="pubmed", either rettype="docsum" for summary records or rettype="abstract" for complete records. |
Warning for extensive data retrieving: connection to server would be interrupted by NCBI. Function offers a 1 seconds delay every 3 records retrieved.
L.N. Peraza-Flores
For details on database visit: https://ncbi.nlm.nih.gov
searchGB, read_fasta, read_gb, read_PubMedRec, write2fas
1 2 3 4 5 6 7 | # load example data:
# from a vector of NCBI Accession numbers
seqs_data <- c("KP168671", "EU140072", "AY008665", "EU140235", "EU139932")
retr_seqs <- fetchseq(seqs_data, rettype="fasta")
# from results of function searchGB
sear_seqs <- searchGB("Cattleya crispata", retmax=5)
retr_seqsSgb <- fetchseq(sear_seqs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.