BWA_ALN(1)

NAME
bwa_aln.pl - Align a set of lanes to specified reference with single command.

SYNOPSIS
bwa_aln.pl [options] [file(s)...]

  Required parameters:
    -outdir    -o   Folder to output result to.
    -reference -r   Path to reference genome file *.fa[.gz]
    -sample    -s   Sample name to be applied to output file.
    -threads   -t   Number of threads to use. [1]

  Targeted processing:
    -process   -p   Only process this step then exit, optionally set -index
                      bam2fq - only applicable if input is bam
                         aln - Run 'bwa aln'
                       sampe - Run 'bwa sampe' and sorting to BAM
                        mark - Run duplicate marking (-index N/A)

    -index     -i   Optionally restrict '-p' to single job
                      bam2fq - 1..<lane_count>
                         aln - 1..<lane_count*2>
                       sampe - 1..<lane_count>

  Other:
    -help      -h   Brief help message.
    -man       -m   Full documentation.

  File list can be full file names or wildcard, e.g.
    bwa_aln.pl -t 16 -r some/genome.fa.gz -o myout -s sample input/*.fq.gz

  Run with '-m' for possible input file types.

OPTIONS

-outdir
    Directory to write output to. During processing a temp folder will be generated in this area, should the process fail only delete this if you are unable to resume the process.

    Final output files include: <SAMPLE>.bam, <SAMPLE>.bam.bai, <SAMPLE>.md5, <SAMPLE>.met

-reference
    Path to genome.fa[.gz] file and associated indexes for BWA.

-sample
    Name to be applied to output files. Special characters will not be magically fixed.

-threads
    Number of threads to be used in processing.

    If perl is not compiled with threading some steps will not run in parallel, however much of the script calls other tools that will still utilise this appropriately.

-help
    Print a brief help message and exits.

-man
    Prints the manual page and exits.

  TARGETED PROCESSING

-process
    If you want to run the code in a more efficient manner then this allows each procesing type to be executed in isolation. You can restrict to a single process within the block by specifying -index as well.

  INPUT FILE TYPES
There are several types of file that the script is able to process.

f[ast]q
    A standard uncompressed fastq file. Requires a pair of inputs with standard suffix of '_1' and '_2' immediately prior to '.f[ast]q'.

f[ast]q.gz
    As *.f[ast]q but compressed with gzip.

bam A list of single lane BAM files, no information is taken from the headers.

    This method has additional processing converted to *.fq.gz to give common start point.

DESCRIPTION
bwa_aln.pl will attempt to run all mapping steps for BWA ALN and subsequent duplicate marking automatically.