BATTENBERG(1)

NAME
battenberg.pl - Analyse aligned bam files via the battenberg algorithm to detect subclones and copynumber variations.

SYNOPSIS
battenberg.pl [options]

  Required parameters:
    -outdir                -o   Folder to output result to.
    -reference             -r   Path to reference genome index file *.fai
    -tumbam                -tb  Path to tumour bam file
                                 - when '-a' defined sample name
    -normbam               -nb  Path to normal bam file
                                 - when '-a' defined sample name
    -gender                -ge  Gender, XX, XY or L (see -gl)
    -impute-info           -e   Location of the impute info file
    -thousand-genomes-loc  -u   Location of the directory containing 1k genomes data
    -ignore-contigs-file   -ig  File containing contigs to ignore
                                - specifically male sex chromosome, mitochondria and non primary contigs

   Optional parameters:
    -allele-counts         -a   Provide a tar.gz containing the impute allele counts
    -prob-loci             -c   Location of prob_loci.txt file [included in release]
    -min-bq-allcount       -q   Minimum base quality to permit allele counting [20]
    -segmentation-gamma    -sg  Segmentation gamma [10]
    -phasing-gamma         -pg  Phasing gamma [1]
    -clonality-distance    -cd  Clonality distance [0]
    -ascat-distance        -ad  ASCAT distance [1]
    -balanced-threshold    -bt  Balanced threshold [0.51]
    -platform-gamma        -lg  Platform gamma [1]
    -min-ploidy            -mp  Min ploidy [1.6]
    -max-ploidy            -xp  Max ploidy [4.8]
    -min-rho               -mr  Min Rho [0.1]
    -min-goodness-of-fit   -mg  Min goodness of fit [0.63]
    -species               -rs  Reference species []
    -assembly              -ra  Reference assembly []
    -protocol              -pr  Sequencing protocol [WGS]
    -platform              -pl  Sequencing platfrom [ILLUMINA]
    -genderloci            -gl  List of gender loci, required when '-ge L' [share/gender/GRCh37d5_Y.loci]
                                - these are loci that will not present at all in a female sample

   Optional system related parameters:
    -threads           -t   Number of threads allowed on this machine (default 1)
    -logs              -g   Location to write logs (default is ./logs)

   Targeted processing (further detail under OPTIONS):
    -process  -p  Only process this step then exit, optionally set -index
    -index    -i  Optionally restrict '-p' to single job
    -jobs     -j  Declare with -p to determine how many jobs are needed for this step

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

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 are:

     <tumour_sample>_copynumberprofile.png
     <tumour_sample>_hetdata.tar.gz
     <tumour_sample>_rafseg.tar.gz
     <tumour_sample>_second_nonroundedprofile.png
     <normal_sample>_allelecounts.tar.gz
     <tumour_sample>_allelecounts.tar.gz
     <tumour_sample>_distance.png
     <tumour_sample>_impute_input.tar.gz
     <tumour_sample>_nonroundedprofile.png
     <tumour_sample>_rho_and_psi.txt
     <tumour_sample>_subclones.tar.gz
     <tumour_sample>_battenberg_cn.vcf.gz
     <tumour_sample>_battenberg_cn.vcf.gz.tbi
     <tumour_sample>_Germline<tumour_sample>.png
     <tumour_sample>_impute_output.tar.gz
     <tumour_sample>_normal_contamination.txt
     <tumour_sample>_second_copynumberprofile.png
     <tumour_sample>_subclones.txt
     <tumour_sample>_hetbaf.tar.gz
     <tumour_sample>_logR_Baf_segmented.vcf.gz
     <tumour_sample>_logR_Baf_segmented.vcf.gz.tbi
     <tumour_sample>_other.tar.gz
     <tumour_sample>_second_distance.png
     <tumour_sample>_Tumor<tumour_sample>.png

-reference
    Path to genome.fa.fai file and the assumed location of its associated .fa file.

-tumbam
    Path to mapped, indexed, duplicate marked/removed tumour bam file.

-normbam
    Path to mapped, indexed, duplicate marked/removed normal bam file.

-ignore-contigs-file
    Path to ignore file containing a list of contigs to ignore

-is-male
    Flag the sample as male, otherwise female is assumed

-impute-info
    Path to the impute_info.txt file to be used by impute

-thousand-genomes-loc
    Directory containing the 1000genomes loci data

-prob-loci
    Location of the prob_loci.txt file

-min-bq-allcount
    Minimum base quality of alleles to be counted in allele counting step

-segmentation-gamma
    Optional battenberg input Segmentation gamma

-phasing-gamma
    Optional battenberg input Phasing gamma

-clonality-distance
    Optional battenberg input Clonality distance

-ascat-distance
    Optional battenberg input ASCAT distance

-balanced-threshold
    Optional battenberg input Balanced threshold

-platform-gamma
    Optional battenberg input Platform gamma

-min-ploidy
    Optional battenberg input Min ploidy

-max-ploidy
    Optional battenberg input Max ploidy

-min-rho
    Optional battenberg input Min Rho

-min-goodness-of-fit
    Optional battenberg input Min goodness of fit

-species
    Reference species (default: Human)

-assembly
    Reference species assembly (default: 37)

-protocol
    Sequencing protocol (default: WGS)

-platform
    Sequencing platform (default HiSeq)

-threads
    Number of threads allowed on this machine (default 1)

-logs
    Location to write logs (default is ./logs)

-process
    Only process this step then exit, optionally set -index. The order of steps is as follows:

        allelecount *
        baflog
        imputefromaf *
        impute *
        combineimpute *
        haplotypebafs *
        cleanuppostbaf *
        plothaplotypes *
        combinebafs
        segmentphased
        fitcn
        subclones
        finalise

    '*' denotes that the step has parallel processing. You can determine the total number by executing the command as:

        battenberg.pl ...... -p <PROCESS> -j

    1 to this value can be used with '-i' on these processes. For all other steps please use '-i 1'.

-index
    Optionally restrict '-p' to single job

DESCRIPTION
battenberg.pl will attempt to run all caveman steps automatically including collation of output files.