.TH BAMCONSENSUS 1 "August 2019" BIOBAMBAM .SH NAME bamconsensus - compute rough consensus sequence from alignments .SH SYNOPSIS .PP .B bamconsensus [reference=ref.fasta] < in.bam >out.fasta [options] .SH DESCRIPTION bamconsensus reads a BAM, SAM or CRAM file and computes a rough consensus based on the alignments contained. The input file needs to be sorted in coordinate order. The consensus is written as an alignment file on the standard output channel. The sequence names in the output file are structured as .PP contig_A_B_C_D_E .PP where .PP .B A is the numeric reference id (0 based) .PP .B B is the name of the reference sequence as given in the BAM header .PP .B C is a numerical contig id within the contigs for a given reference id .PP .B D is the start position on the reference sequence (inclusive) .PP .B E is the end position on the reference sequence (exclusive) .PP The reference key specifying the name of a FastA reference sequence file is required. The consensus is constructed by computing heavy paths in local DeBruijn graphs. Consequently it is usually a patchwork of the haplotypes present for diploid/polyploid genomes. .PP The following key=value pairs can be given: .PP .B reference=: reference FastA file (required) .PP .B verbose=<1>: Valid values are .IP 1: print progress report on standard error .IP 0: do not print progress report .PP .B T=: set the prefix for temporary file names .PP .B k=<32>: k-mer size used for consensus computation (maximum 32). .PP .B minlen=<50>: minimum length of alignments used (default 50). .PP .B inputformat=: input format .PP .B range=<>: input range to be processed. This option is only valid if the input is a coordinate sorted and indexed BAM file .SH AUTHOR Written by German Tischler-Höhle. .SH "REPORTING BUGS" Report bugs to .SH COPYRIGHT Copyright \(co 2019 German Tischler. License GPLv3+: GNU GPL version 3 .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.