.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. .TH BAM2FASTX "1" "May 2016" "bam2fastx 2.1.1+dfsg" "User Commands" .SH NAME bam2fastx \- tophat component converting bam directly into fastx .SH DESCRIPTION .SS "bam2fastx v2.1.1 () usage:" .IP bam2fastx [\-\-fasta|\-a] [\-C|\-\-color] [\-P|\-\-paired] [\-N] [\-A|\-\-all|\-M|\-\-mapped\-only] [\-Q] [\-\-sam|\-s|\-t] [\-o ] .PP By default, bam2fastx only converts the unmapped reads from the input file, .IP discarding those unmapped reads flagged as QC failed. The input BAM/SAM file MUST be sorted by read name (\fB\-n\fR option for samtools sort). If the input file name is "\-", stdin will be used instead. .SH OPTIONS .TP \fB\-A\fR,\-\-all convert all reads (mapped and unmapped) (but discarding those flagged as QC failed, unless \fB\-Q\fR) .TP \fB\-P\fR paired reads are expected and converted into two output files (see comments below) .TP \fB\-Q\fR convert unmapped reads even when flagged as QC failed .TP \fB\-M\fR,\-\-maped\-only convert only mapped reads .TP \fB\-N\fR for \fB\-P\fR, append \fI\,/1\/\fP and \fI\,/2\/\fP suffixes to read names .TP \fB\-O\fR ignore the original quality values (OQ tag) and write the current quality values (default is to use OQ data if found) .TP \fB\-C\fR,\-\-color reads are in ABI SOLiD color format .TP \fB\-s\fR,\-t,\-\-sam input is a SAM text file (default: BAM input expected) .TP \fB\-a\fR,\-\-fasta output FASTA records, not FASTQ (discard quality values) .TP \fB\-o\fR output file name or template (see below) .IP serves as a name template when \fB\-P\fR option is provided, as suffixes \&.1 and .2 will be automatically inserted before the file extension in , such that two file names will be created. If ends in .gz or .bz2 then bam2fastx will write the output compressed by gzip or bzip2 respectively. .IP Example of converting all paired reads from a BAM file to FASTQ format: .IP bam2fastx \fB\-PANQ\fR \fB\-o\fR sample.fq.gz sample.sortedbyname.bam .IP In this example the output will be written in two files: .IP sample.1.fq.gz and sample.2.fq.gz