Skip to content
jtroehr edited this page Apr 20, 2017 · 19 revisions

Flexbar logo

Usage of Flexbar 3.0

flexbar -r reads [-b barcodes] [-a adapters] [options]

Information on software:

-h, --help
      Display the help message.
-hh, --full-help
      Display the help message with advanced options.
-hm, --man-help
      Print advanced options as man document.
-v, --versions
      Print Flexbar and SeqAn version numbers.
-c, --cite
      Show program reference for citation.

Basic parameters

Input read files, output prefix name and multi-threading:

-n, --threads NUM
      Number of threads to employ. Default: 1.
-N, --bundle NUM
      Number of read pairs per thread. Default: 256.
-t, --target STR
      Prefix for output file names or paths. Default: flexbarOut.
-r, --reads FILE
      Fasta/q file or stdin (-) with reads that may contain barcodes.
-p, --reads2 FILE
      Second input file of paired reads, gz and bz2 files supported.

Barcode detection

Barcodes are detected, removed and guide the separation of reads:

-b, --barcodes FILE
      Fasta file with barcodes for demultiplexing, may contain N.
-b2, --barcodes2 FILE
      Additional barcodes file for second read set in paired mode.
-br, --barcode-reads FILE
      Fasta/q file containing separate barcode reads for detection.
-be, --barcode-trim-end STR
      Type of detection, see section trim-end modes. Default: LTAIL.
-bn, --barcode-tail-length NUM
      Region size in tail trim-end modes. Default: barcode length.
-bo, --barcode-min-overlap NUM
      Minimum overlap of barcode and read. Default: barcode length.
-bt, --barcode-error-rate NUM
      Error rate threshold for mismatches and gaps. Default: 0.1.
-bk, --barcode-keep
      Keep barcodes within reads instead of removal.
-bu, --barcode-unassigned
      Include unassigned reads in output generation.
-bm, --barcode-match NUM
      Alignment match score. Default: 1.
-bi, --barcode-mismatch NUM
      Alignment mismatch score. Default: -1.
-bg, --barcode-gap NUM
      Alignment gap score. Default: -9.

Adapter removal

Adapter sequences are detected and removed if criteria are met:

-a, --adapters FILE
      Fasta file with adapters for removal that may contain N.
-a2, --adapters2 FILE
      File with extra adapters for second read set in paired mode.
-as, --adapter-seq STR
      Single adapter sequence as alternative to adapters option.
-ar, --adapter-read-set STR
      Consider only single read set for adapters. One of 1 and 2.
-ac, --adapter-revcomp
      Consider also reverse complement of each adapter in search.
-ae, --adapter-trim-end STR
      Type of removal, see section trim-end modes. Default: RIGHT.
-an, --adapter-tail-length NUM
      Region size for tail trim-end modes. Default: adapter length.
-ad, --adapter-relaxed
      Skip restriction to pass read ends in right and left modes.
-ao, --adapter-min-overlap NUM
      Minimum overlap of adapter and read for removal. Default: 3.
-at, --adapter-error-rate NUM
      Error rate threshold for mismatches and gaps. Default: 0.1.
-am, --adapter-match NUM
      Alignment match score. Default: 1.
-ai, --adapter-mismatch NUM
      Alignment mismatch score. Default: -1.
-ag, --adapter-gap NUM
      Alignment gap score. Default: -6.

Filtering and trimming

Filter and trim reads before and after processing barcodes and adapters:

-u, --max-uncalled NUM
      Allowed uncalled bases N for each read. Default: 0.
-x, --pre-trim-left NUM
      Trim given number of bases on 5' read end before detection.
-y, --pre-trim-right NUM
      Trim specified number of bases on 3' end prior to detection.
-k, --post-trim-length NUM
      Trim to specified read length from 3' end after removal.
-m, --min-read-length NUM
      Minimum read length to remain after removal. Default: 18.

Quality-based trimming

Trim reads based on sequence quality scores:

-q, --qtrim STR
      Quality-based trimming mode. One of TAIL, WIN, and BWA.
-qf, --qtrim-format STR
      Quality format. One of sanger, solexa, i1.3, i1.5, and i1.8.
-qt, --qtrim-threshold NUM
      Minimum quality as threshold for trimming. Default: 20.
-qw, --qtrim-win-size NUM
      Region size for sliding window approach. Default: 5.
-qa, --qtrim-post-removal
      Perform quality-based trimming after removal steps.

Output selection

Select options for output file generation:

-f, --fasta-output
      Prefer non-quality format fasta for output.
-z, --zip-output STR
      Direct compression of output files. One of GZ and BZ2.
-1, --stdout-reads
      Write reads to stdout, tagged and interleaved if needed.
-j, --length-dist
      Generate length distribution for read output files.
-s, --single-reads
      Write single reads for too short counterparts in pairs.
-S, --single-reads-paired
      Write paired single reads with N for short counterparts.

Logging and tagging

Write alignments to log file or choose read tagging options:

-l, --align-log STR
      Print chosen read alignments. One of ALL, MOD, and TAB.
-o, --stdout-log
      Write statistics to console instead of target log file.
-g, --removal-tags
      Tag reads that are subject to adapter or barcode removal.
-e, --number-tags
      Replace read tags by ascending number to save space.
-d, --random-tags
      Capture read sequence at barcode or adapter N positions.

Trim-end modes

Available trim-end modes for barcodes and adapters:

  • ANY: longer side of read remains after removal of overlap
  • LEFT: right side remains after removal, align <= read end
  • RIGHT: left part remains after removal, align >= read start
  • LTAIL: consider first n bases of reads in alignment
  • RTAIL: use only last n bases, see tail-length options