Description Usage Arguments Value Author(s) Examples
View source: R/makeOrgPackage.R
The makeOrgPackage
function allows the user to make an
organism package from any collection of data frames that are united by
a common gene ID.
1 2 3 4 5 6 7 8 9 10 | makeOrgPackage(...,
version,
maintainer,
author,
outputDir=getwd(),
tax_id,
genus=NULL,
species=NULL,
goTable=NULL,
verbose=TRUE)
|
... |
A set of data.frames containing annotation data. Each of
these arguments must be named. Those names will become the names of
the tables in the final database. Also, there are no rownames for
these data.frames, and the colnames are the names that will be used as
extractable fields in the final package. In other words they will be
what comes back when you call |
version |
What is the version number for this package? format: \'x.y.z\' |
maintainer |
Who is the package maintainer? (must include email to be valid) |
author |
Who is the creator of this package? |
outputDir |
A path where the package source should be assembled. |
tax_id |
The Taxonomy ID that represents your organism. (NCBI has a nice online browser for finding the one you need) |
genus |
Single string indicating the genus. |
species |
Single string indicating the species. |
goTable |
By default, this is NULL, but if one of your '...'
data.frames has GO annotations, then this name will be the name of
that argument. When you specify this, |
verbose |
When TRUE progress messages are displayed. |
The path to the package that just created. This is useful for calling install.packages as the next step.
M. Carlson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | if(interactive()){
## Makes an organism package for Zebra Finch data.frames:
finchFile <- system.file("extdata","finch_info.txt",package="AnnotationForge")
finch <- read.table(finchFile,sep="\t")
## not that this is how it should always be, but that it *could* be this way.
fSym <- finch[,c(2,3,9)]
fSym <- fSym[fSym[,2]!="-",]
fSym <- fSym[fSym[,3]!="-",]
colnames(fSym) <- c("GID","SYMBOL","GENENAME")
fChr <- finch[,c(2,7)]
fChr <- fChr[fChr[,2]!="-",]
colnames(fChr) <- c("GID","CHROMOSOME")
finchGOFile <- system.file("extdata","GO_finch.txt",package="AnnotationForge")
fGO <- read.table(finchGOFile,sep="\t")
fGO <- fGO[fGO[,2]!="",]
fGO <- fGO[fGO[,3]!="",]
colnames(fGO) <- c("GID","GO","EVIDENCE")
makeOrgPackage(gene_info=fSym, chromosome=fChr, go=fGO,
version="0.1",
maintainer="Some One <so@someplace.org>",
author="Some One <so@someplace.org>",
outputDir = ".",
tax_id="59729",
genus="Taeniopygia",
species="guttata",
goTable="go")
## then you can call install.packages based on the return value
install.packages("./org.Tguttata.eg.db", repos=NULL)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.