#
# List all available methods for getName generic function:
#
methods(getName)
#
# Example with seven DNA sequences from a FASTA file:
#
ff <- system.file("sequences/someORF.fsa", package = "seqinr")
fs <- read.fasta(file = ff)
stopifnot(all(getName(fs) == c("YAL001C", "YAL002W", "YAL003W",
"YAL005C", "YAL007C", "YAL008W", "YAL009W")))
#
# Example with 49 sequences from an ACNUC server:
#
if (FALSE) {
# Need internet connection
choosebank("emblTP")
fc <- query("fc", "sp=felis catus et t=cds et o=mitochondrion")
getName(fc)
closebank()
}
Run the code above in your browser using DataLab