buildBowtie2CommandLine: Build a Bowtie2 Command Line

buildBowtie2CommandLineR Documentation

Build a Bowtie2 Command Line

Description

Construct one bowtie2 command line from a set of file names, options, and Bowtie index information.

Usage

buildBowtie2CommandLine(inputFastqFile, 
	outputAlignFile = sub("fastq$", "align", inputFastqFile), 
	m = 1, k = NULL, noHitsFile = NULL, multiHitsFile = NULL, 
	optionsFile = "Options.txt",
	alignIndex=getOptionValue( optionsFile, "GenomicIndex"),
	alignPolicy=getOptionValue( optionsFile, "GenomicAlignmentPolicy"),
	maxReads=NULL, verbose=TRUE, debug=FALSE) 

Arguments

inputFastqFile

required file name of .fastq reads to be aligned.

outputAlignFile

name for the to-be-created file of alignments.

m

maximum number of alingment locations allowed to call a read 'aligned'. This is the value passed to the '-m' option in Bowtie.

k

maximum number of alingment locations to report for an aligned read. This is the value passed to the '-k' option in Bowtie.

noHitsFile

optional file name to collect reads that do not align.

multiHitsFile

optional file name to collect reads that align to more than 'm' locations.

alignIndex

the basename of the Bowtie index to align against. Note the the path to all index files is set via bowtiePar('IndexPath').

alignPolicy

a character string of additional Bowtie arguments that include any alignment policy and threshold setting for calling a read 'aligned'.

maxReads

the maximum number of reads to pass to Bowtie

Details

This takes the current 'bowtie2Par()' settings and the given arguments, to construct one Unix style command line that can be used to run Bowtie2 to generate alignments.

If inputFastqFile is compressed, decompression is done via a Unix pipe. When maxReads is not NULL, the subset of reads is used via Unix 'head'.

Value

A character string of length 1 that can be passed to callBowtie2 or to the 'system()' command to invoke Bowtie2.

Note

Various Bowtie2 command options from the optionsFile are prepended before the alignment policy parameters, so the policy can override as appropriate.

Author(s)

Bob Morrison

References

http://bowtie-bio.sourceforge.net/

See Also

callBowtie2, bowtie2Par, fastqToBAM


robertdouglasmorrison/DuffyNGS documentation built on March 24, 2024, 4:16 p.m.