fetch_gene_from_genome: Extract a list of gene sequences from a genbank file

fetch_gene_from_genomeR Documentation

Extract a list of gene sequences from a genbank file

Description

Extract a list of gene sequences from a genbank file

Usage

fetch_gene_from_genome(gene, accession, rename = TRUE,
  detect_dups = TRUE)

Arguments

gene

Characte vector; gene names to extract.

accession

String; GenBank accession number of (full or partial) genome containing the gene(s) 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 instead of the sequence; if false, all copies will be returned, differentiated by appending numbers to the gene name.

Value

A list

Examples

## Not run: 
# KY427346 is the GenBank accession no. for the Diplazium striatum plastome
# https://www.ncbi.nlm.nih.gov/nuccore/KY427346

genes_to_get <- c("rbcL", "matK", "psbA")

fetch_gene_from_genome(genes_to_get, "KY427346")

## End(Not run)


joelnitta/gbfetch documentation built on March 2, 2024, 7:03 p.m.