runWithFinishCheck {pipeFrame} | R Documentation

## Install dependent data or software with finishing check

### Description

Install dependent data or software with finishing check

### Usage

    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

    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")

[Package pipeFrame version 1.10.0 Index]