findExternal: Locates an external executable

Description Usage Arguments Details Value Author(s)

View source: R/findExternal.R

Description

Locates an external executable.

Usage

 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
37
38
39
40
  # The generic internal function used
  findExternal(mustExist=TRUE, command, path=NULL, version=NULL, versionPattern=NULL,
  expectedStatus=c(0L, 1L), force=FALSE, verbose=FALSE, ...)

  # Programming environments
  findJava(...)
  findPerl(...)
  findPython(...)

  # fastq-dump
  findFastqDump(..., commandName="fastq-dump",
  versionPattern=".*fastq-dump[ ]*:[ ]*([0-9.]+)", verbose=FALSE)

  # FastQC
  findFastQC(mustExist=TRUE, ..., verbose=FALSE)

  # BWA
  findBWA(...)

  # Bowtie and TopHat
  findBowtie2(..., command=c("bowtie2", "bowtie2-build", "bowtie2-inspect",
  "bowtie2-align", "bowtie2-align-l", "bowtie2-align-s"))
  findTopHat(..., command="tophat", path=NULL)
  findTopHat1(..., command="tophat", version=c(1, 2))
  findTopHat2(..., command="tophat2", version=c(2, 3))

  # GATK
  findGATK(mustExist=TRUE, ..., verbose=FALSE)

  # Picard
  findPicard(mustExist=TRUE, ..., verbose=FALSE)

  # Samtools
  findSamtools(...)

  # CNVkit
  findCNVkit(..., command="cnvkit.py")

  # HTSeq
  findHTSeq(..., command=c("htseq-count", "htseq-qa"))

Arguments

mustExist

If TRUE, an exception is thrown if the executable could not be located.

command

A character string specifying the name of the executable to locate.

version

If non-NULL, specifies which version of the executable to retrieve.

versionPattern

(A named character string specifying the gsub() regular expression to extraction the version where there name is the command-line option specifying how to call the external for retrieving the version output.

expectedStatus

An integer vector of expected status codes returned when querying the executable for the version.

force

If TRUE, cached results are ignored, otherwise not.

verbose

See Verbose.

...

Additional arguments passed to findExternal(), or ignored.

Details

The executable is searched using (in order):

  1. Sys.which(command)

Value

Returns the pathname (or the path) of the external executable. If not found, NULL is returned, unless if mustExist=TRUE in case an error is thrown. If versionPattern is specified, then the inferred version is returned as attribute 'version'.

Author(s)

Henrik Bengtsson


HenrikBengtsson/aroma.seq documentation built on Feb. 15, 2021, 2:21 a.m.