# NOT RUN {
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..")
# }
Run the code above in your browser using DataLab