Getting started with Solanum.lycopersicum package

Usage of a package like this has been deliberately kept very simple. The methods supported are the same ones that work for all the packages based on AnnotationDb objects. The methods that can be applied to these new packages are columns, keys, keytypes and select. So to learn which kinds of data can be retrieved from a package like this we would simply load the package and then call the columns method.

tom <- Solanum.lycopersicum
## To learn which of those kinds of data can be used as keys to extract data,
## we use the keytypes method.
## To extract specific keys, we need to use the keys method, and also
## provide it a legitimate keytype:
head(keys(tom, keytype="ENTREZID"))
head(keys(tom, keytype="ITAG"))
head(keys(tom, keytype="SGN"))
head(keys(tom, keytype="UNIPROT"))
head(keys(tom, keytype="lycocyc"))
head(keys(tom, keytype="GO"))

k <- head(keys(tom, keytype="ITAG"), n = 3)
k2 <- head(keys(tom, keytype="GO"), n = 3)
keys <- c("Solyc00g005000.2",

keys2 <- c("Solyc00g005000.2.1",

select(tom, keys=k, columns=c("UNIPROT"), keytype="ITAG")
select(tom, keys=k, columns=c("SGN"), keytype="ITAG")
res <- select(tom, keys=k2, columns=c("ITAG"), keytype="GO")
res2 <- select(tom, keys=k2, columns=c("ENTREZID", "REFSEQ", "DEFINITION"), keytype="GO")

select(tom, keys=keys, columns=c("UNIPROT"), keytype="ITAG")
select(tom, keys=keys2, columns=c("UNIPROT"), keytype="ITAG")
select(tom, keys=keys, columns=c("TXNAME", "TXID", "CDSNAME"), keytype="GENEID")
select(tom, keys=keys2, columns=c("TXNAME", "TXID", "CDSNAME"), keytype="ITAG")

afukushima/Solanum.lycopersicum documentation built on May 10, 2019, 7:29 a.m.