View source: R/sequence_download.R
ncbi_taxon_sample | R Documentation |
Downloads a sample of sequences meant to evenly capture the diversity of a
given taxon. Can be used to get a shallow sampling of vast groups.
CAUTION: This function can make MANY queries to Genbank depending on
arguments given and can take a very long time. Choose your arguments
carefully to avoid long waits and needlessly stressing NCBI's servers. Use a
downloaded database and a parser from the taxa
package when possible.
ncbi_taxon_sample(
name = NULL,
id = NULL,
target_rank,
min_counts = NULL,
max_counts = NULL,
interpolate_min = TRUE,
interpolate_max = TRUE,
min_children = NULL,
max_children = NULL,
seqrange = "1:3000",
getrelated = FALSE,
fuzzy = TRUE,
limit = 10,
entrez_query = NULL,
hypothetical = FALSE,
verbose = TRUE
)
name |
( |
id |
( |
target_rank |
( |
min_counts |
(named |
max_counts |
(named |
interpolate_min |
( |
interpolate_max |
( |
min_children |
(named |
max_children |
(named |
seqrange |
(character) Sequence range, as e.g., "1:1000". This is the range of sequence lengths to search for. So "1:1000" means search for sequences from 1 to 1000 characters in length. |
getrelated |
(logical) If TRUE, gets the longest sequences of a species in the same genus as the one searched for. If FALSE, returns nothing if no match found. |
fuzzy |
(logical) Whether to do fuzzy taxonomic ID search or exact
search. If |
limit |
( |
entrez_query |
( |
hypothetical |
( |
verbose |
( |
## Not run:
# Look up 5 ITS sequences from each fungal class
data <- ncbi_taxon_sample(name = "Fungi", target_rank = "class", limit = 5,
entrez_query = '"internal transcribed spacer"[All Fields]')
# Look up taxonomic information for sequences
obj <- lookup_tax_data(data, type = "seq_id", column = "gi_no")
# Plot information
filter_taxa(obj, taxon_names == "Fungi", subtaxa = TRUE) %>%
heat_tree(node_label = taxon_names, node_color = n_obs, node_size = n_obs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.