fetch_gene | R Documentation |
If duplicates are detected via 'detect_dups' and 'rename' is TRUE, duplicates will be differentiated by appending a numeral to the name, e.g. "accession-gene-1", "accession-gene-2", etc.
fetch_gene(gene_name, rec, rename = TRUE, detect_dups = TRUE)
gene_name |
Name of gene to extract. Must match genbank data exactly, case-sensitive. |
rec |
An instance of the gbRecord class. Typically a (sub)genome containing the gene of interest. |
rename |
Logical; should the sequence be renamed as "accession-gene"? |
detect_dups |
Logical; should duplicates be detected? If TRUE, a text warning will be returned in the case that this gene has duplicate copies in the genome; if false, all copies will be returned. |
See https://github.com/gschofl/biofiles
object of class DNAbin
## Not run:
gb_file <- reutils::efetch(uid = "KY427346", db = "nuccore",
rettype = "gbwithparts", retmode = "text")
# Parse GenBank record text file
this_rec <- biofiles::gbRecord(gb_file)
fetch_gene("rbcL", this_rec)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.