leekgroup / derfinder

R package for DER Finder, a method for differential expression analysis of RNA-seq data
http://biostatistics.oxfordjournals.org/content/early/2014/01/06/biostatistics.kxt053.short?rss=1
MIT License
22 stars 11 forks source link

fix dependencies #7

Open alyssafrazee opened 10 years ago

alyssafrazee commented 10 years ago

packages "BSgenome.Hsapiens.UCSC.hg19" and "BSgenome.Mmusculus.UCSC.mm10" are REALLY SUPER SUPER slow in installing and aren't always needed. Is there a way to only load main packages when installing the packages and load those bulky ones only if the user needs them? (i.e. doesn't already have an annotation)?

Also, fix README to include all dependencies (not just the "Depends") and while you're at it, fix Depends vs. Imports.

brianhigh commented 9 years ago

This seems to work:

# Conditionally install packages by testing with require() first and only installing if that fails.
source("http://bioconductor.org/biocLite.R")
for (pkg in c("BSgenome.Hsapiens.UCSC.hg19", "BSgenome.Mmusculus.UCSC.mm10"))
{
    require(pkg, character.only = TRUE) || biocLite(pkg)
}