%\VignetteEngine{utils::Sweave} %\VignetteIndexEntry{LRBase.Ssc.eg.db} \documentclass[11pt,a4paper,english,arial,twoside]{article} <>= BiocStyle::latex() @ \usepackage[numbers]{natbib} \usepackage{amsmath} \usepackage{amssymb} \usepackage{hyperref,url} \usepackage[utf8]{inputenc} \usepackage{comment} \setlength{\textheight}{8.5in} \setlength{\textwidth}{6in} \setlength{\topmargin}{-0.25in} \setlength{\oddsidemargin}{0.25in} \setlength{\evensidemargin}{0.25in} \begin{document} \SweaveOpts{concordance=TRUE} \title{\bf Introduction to LRBaseDbi and LRBase.XXX.eg.db-type packages} \author{Koki Tsuyuzaki$^1$, Manabu Ishii$^1$, and Itoshi Nikaido$^1$.} \maketitle \begin{center} \noindent $^1$Laboratory for Bioinformatics Research, RIKEN Center for Biosystems Dynamics Research, Japan\\ \noindent \end{center} \begin{center} {\tt k.t.the-answer@hotmail.co.jp} \end{center} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Introduction} This document provides the way to use LRBaseDbi and LRBase.XXX.eg.db-type packages. LRBase.XXX.eg.db-type packages provide the pair list of ligand-receptor (L-R) genes. The packages are generated by the LRBaseDbi package. LRBaseDbi has two roles; class-definition and construction of LRBase.XXX.eg.db-type packages. LRBaseDbi defines a class "LRBaseDb" and unifies the object's behavior such as column function described later. The makeLRBasePackage function of LRBaseDbi generates the user's original LRBase.XXX.eg.db-type packages. \section{makeLRBasePackage} Here we use makeLRBasePackage function to create a LRBase.XXX.eg.db-type package. Only users have to specify are 1. a L-R corresponding table containing the columns "GENEID$\_$L" (NCBI Gene IDs of the ligand) and "GENEID$\_$R" (NCBI Gene IDs of the receptor) and 2. a meta-information table describing the L-R list. Here we use the demo data of L-R list of the FANTOM5 project. \begin{center} <>= library('LRBaseDbi') if(interactive()){ example('makeLRBasePackage') } @ \end{center} After makeLRBasePackage, FANTOM5.Hsa.eg.db is generated. Here, we will install the package. \begin{center} <>= if(interactive()){ filepath <- list.files(destination, full.names=TRUE) install.packages(filepath, repos=NULL, type='source') library('FANTOM5.Hsa.eg.db') packageVersion('FANTOM5.Hsa.eg.db') } @ \end{center} \section{columns, keytypes, keys, and select} All LRBase.XXX.eg.db-type package has the same name object and it is instantiated by the LRBaseDb-class. Many data access functions for this object are implemented. For example, columns returns the rows which we can retrieve in LRBase.XXX.eg.db-type packages. keytypes returns the rows which can be used as the optional parameter in keys and select functions against LRBase.XXX.eg.db-type packages. keys function returns the value of keytype. select function returns the rows in particular columns, which are having user-specified keys. This function returns the result as a data frame. \begin{center} <>= if(interactive()){ columns(FANTOM5.Hsa.eg.db) keytypes(FANTOM5.Hsa.eg.db) key_FN5 <- keys(FANTOM5.Hsa.eg.db, keytype='GENEID_R') head(select(FANTOM5.Hsa.eg.db, keys=key_FN5[1:2], columns=c('GENEID_L', 'GENEID_R'), keytype='GENEID_R')) } @ \end{center} \section{Other functions} Other additional functions like species, nomenclature, and listDatabases are available. In each LRBase.XXX.eg.db-type package, species function returns the common name and nomenclature returns the scientific name. listDatabases function returns the source of data. dbInfo returns the information of the package. dbfile returns the directory where sqlite file is stored. dbschema returns the schema of database. dbconn returns the connection to the sqlite database. \begin{center} <>= if(interactive()){ species(FANTOM5.Hsa.eg.db) nomenclature(FANTOM5.Hsa.eg.db) listDatabases(FANTOM5.Hsa.eg.db) dbInfo(FANTOM5.Hsa.eg.db) dbfile(FANTOM5.Hsa.eg.db) dbschema(FANTOM5.Hsa.eg.db) dbconn(FANTOM5.Hsa.eg.db) } @ \end{center} %\clearpage \section{Redirecting to the scTensor package} Description for any LRBase-related packages is written in the vignette of \Rpackage{scTensor} package. \noindent Please follow the link below \newline \url{http://www.bioconductor.org/packages/release/bioc/html/scTensor.html} \newline \noindent or just type \newline \noindent \begin{center} <>= if(interactive()){ if (!requireNamespace('BiocManager', quietly = TRUE)){ install.packages('BiocManager') } BiocManager::install('scTensor') library('scTensor') vignette('scTensor') } @ \end{center} in R console window. \end{document}