### MergeBamAlignment

USAGE: MergeBamAlignment [options]

Merges alignment data from a SAM or BAM file with additional data stored in an unmapped BAM file and produces a third SAM or BAM file of aligned and unaligned reads. NOTE that this program expects to find a sequence dictionary in the same directory as REFERENCE_SEQUENCE and expects it to have the same base name as the reference fasta except with the extension '.dict'

Option | Description
--- | ---
UNMAPPED_BAM=File | Original SAM or BAM file of unmapped reads, which must be in queryname order. Required.
ALIGNED_BAM=File | SAM or BAM file(s) with alignment data. This option may be specified 0 or more times. Cannot be used in conjuction with option(s) READ1_ALIGNED_BAM (R1_ALIGNED) READ2_ALIGNED_BAM (R2_ALIGNED)
READ1_ALIGNED_BAM=File | SAM or BAM file(s) with alignment data from the first read of a pair. This option may be specified 0 or more times. Cannot be used in conjuction with option(s) ALIGNED_BAM (ALIGNED)
READ2_ALIGNED_BAM=File | SAM or BAM file(s) with alignment data from the second read of a pair. This option may be specified 0 or more times. Cannot be used in conjuction with option(s) ALIGNED_BAM (ALIGNED)
OUTPUT=File | Merged SAM or BAM file to write to. Required.
REFERENCE_SEQUENCE=File | Path to the fasta file for the reference sequence. Required.
PROGRAM_RECORD_ID=String | The program group ID of the aligner (if not supplied by the aligned file). Default value: null.
PROGRAM_GROUP_VERSION=String | The version of the program group (if not supplied by the aligned file). Default value: null.
PROGRAM_GROUP_COMMAND_LINE=String | The command line of the program group (if not supplied by the aligned file). Default value: null.
PROGRAM_GROUP_NAME=String | The name of the program group (if not supplied by the aligned file). Default value: null.
PAIRED_RUN=Boolean | Whether this is a paired-end run. Required. Possible values: {true, false}
JUMP_SIZE=Integer | The expected jump size (required if this is a jumping library). Deprecated. Use EXPECTED_ORIENTATIONS instead Default value: null. Cannot be used in conjuction with option(s) EXPECTED_ORIENTATIONS (ORIENTATIONS)
CLIP_ADAPTERS=Boolean | Whether to clip adapters where identified. Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}
IS_BISULFITE_SEQUENCE=Boolean | Whether the lane is bisulfite sequence (used when caculating the NM tag). Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}
ALIGNED_READS_ONLY=Boolean | Whether to output only aligned reads. Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}
MAX_INSERTIONS_OR_DELETIONS=Integer | The maximum number of insertions or deletions permitted for an alignment to be included. Alignments with more than this many insertions or deletions will be ignored. Set to -1 to allow any number of insertions or deletions. Default value: 1. This option can be set to 'null' to clear the default value.
ATTRIBUTES_TO_RETAIN=String | Reserved alignment attributes (tags starting with X, Y, or Z) that should be brought over from the alignment data when merging. This option may be specified 0 or more times.
READ1_TRIM=Integer | The number of bases trimmed from the beginning of read 1 prior to alignment Default value: 0. This option can be set to 'null' to clear the default value.
READ2_TRIM=Integer | The number of bases trimmed from the beginning of read 2 prior to alignment Default value: 0. This option can be set to 'null' to clear the default value.
EXPECTED_ORIENTATIONS=PairOrientation | The expected orientation of proper read pairs. Replaces JUMP_SIZE Possible values: {FR, RF, TANDEM} This option may be specified 0 or more times. Cannot be used in conjuction with option(s) JUMP_SIZE (JUMP)
SORT_ORDER=SortOrder | The order in which the merged reads should be output. Default value: coordinate. This option can be set to 'null' to clear the default value. Possible values: {unsorted, queryname, coordinate}
CLIP_OVERLAPPING_READS=Boolean | For paired reads, soft clip the 3' end of each read if necessary so that it does not extend past the 5' end of its mate. Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}