Description Usage Arguments Details Value Examples
filter
returns a subset of features from gbRecordList
,
gbRecord
or gbFeatureTable
objects,
based on filters provided as key, range, or qualifier values.
select
returns a specified subset of annotations from GenBank Features
as a data.frame
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | filter(x, ...)
select(x, ...)
## S4 method for signature 'gbFeatureTable'
filter(x, ..., .cols = NULL)
## S4 method for signature 'gbFeatureTable'
select(x, ..., .cols = NULL)
## S4 method for signature 'gbRecord'
filter(x, ..., .cols = NULL)
## S4 method for signature 'gbRecord'
select(x, ..., .cols = NULL)
## S4 method for signature 'gbRecordList'
filter(x, ..., .cols = NULL)
## S4 method for signature 'gbRecordList'
select(x, ..., .cols = NULL)
|
x |
A ‘ |
... |
For |
.cols |
A character vector of ‘keys’ that specify annotaions
to be returned as a |
Filters are provided as named values using keywords and/or “qualifier = value” pairs:
Permissible keywords are:
For example: idx = c(3,4,5,6)
, idx = 100:150
,
index = c(1,12:20)
For example: range = "10000..25000"
,
range = "..10000,20000..25000"
,
range = "30000.."
For example: key = "CDS"
, key = c("CDS", "gene")
For example: product = "ribosomal"
, locus_tag = c("CPSIT_0123",
"CPSIT_0124", "CPSIT_0125")
, pseudo = TRUE
Depending on the value of .col
a gbRecordList
,
gbRecord
, orgbFeatureTable
or a data.frame
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | load(system.file("extdata", "S_cerevisiae_mito.rda", package = "biofiles"))
## filter all hydrophobic tRNAs from the yeast mitochondrion
hydrophobic <- c("Val", "Ile", "Leu", "Met", "Phe", "Trp", "Cys")
trna <- filter(x, key = "tRNA", product = hydrophobic)
## select start, end, orientation, product, and GeneID
df <- select(trna, "start", "end", "strand", "product", "db_xref.GeneID")
df
## combine the above steps into one
cols <- c("start", "end", "strand", "product", "db_xref.GeneID")
filter(x, key = "tRNA", product = hydrophobic, .cols = cols)
## filter all CDS from position 60,000 bp onward
filter(x, key = "CDS", range = "60000..")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.