runWithFinishCheck: Install dependent data or software with finishing check

Description Usage Arguments Value Examples

View source: R/configVal.R

Description

Install dependent data or software with finishing check

Usage

1
2
3
4
5
6
7
8
9
runWithFinishCheck(func, refName, refFilePath = NULL, genome = NULL)

checkAndInstallBSgenome(refFilePath, genome = getGenome())

checkAndInstallOrgDb(refFilePath, genome = getGenome())

checkAndInstallTxDb(refFilePath, genome = getGenome())

checkAndInstallGenomeFa(refFilePath)

Arguments

func

Function scalar. The function with refFilePath argument (reference file directory). The returned value will be set as the reference object.

refName

Character scalar. Reference name for getRef, getRefFiles and getRefRc.

refFilePath

Character scalar. The reference file relative directory under the "refdir/genome/"

genome

Character scalar. The genome like "hg19". Default: getGenome()

Value

runWithFinishCheck

No value will be returned

checkAndInstallBSgenome

check if there is the BSgenome package installed for curent genome and install it if not. No value will be returned.

checkAndInstallOrgDb

check if there is the OrgDb package installed for curent genome and install it if not. No value will be returned.

checkAndInstallTxDb

check if there is the TxDb package installed for curent genome and install it if not. Nothing will be returned.

checkAndInstallGenomeFa

check if genome FASTA file exist and install if not. No value will be returned

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
checkAndInstall <- function(){
   runWithFinishCheck(func = checkAndInstallBSgenome,refName = "bsgenome")
   runWithFinishCheck(func = checkAndInstallGenomeFa,refName = "fasta",
   refFilePath = paste0(getGenome(),".fa"))
}
initPipeFrame(availableGenome = c("hg19", "hg38","mm9","mm10","testgenome"),
              defaultJobName = paste0("pkgname","-pipeline")
)

setGenome("hg19")

wzthu/pipeFrame documentation built on Sept. 22, 2021, 4:36 p.m.