Skip to content
martinghunt edited this page Aug 12, 2015 · 2 revisions

Task: bam2reads

This extracts reads from a sorted by coordinate indexed BAM file, to be used for reassembly.

Usage and options

The general usage is

circlator bam2reads [options] <in.bam> <outprefix>

There are the folowing options:

  • --discard_unmapped: Use this to not keep unmapped reads. By default unmapped reads are kept.
  • --only_contigs FILENAME: File of contig names (one per line). Only reads that map to these contigs are kept (and unmapped reads, unless --discard_unmapped is used). By default all contigs are used.
  • --length_cutoff INT: All reads mapped to contigs shorter than this will be kept. Default: 100000.
  • --min_read_length INT: Minimum length of read to output. Default: 250.

Output files

The reads at contig ends are written to outprefix.fasta. There is also a log file, called outprefix.log, showing the contig lengths and coordinates used for each contig. For example:

[bamfilter]	#contig	length  reads_kept
[bamfilter] contig1 2227566 1-50000;2177567-2227566
[bamfilter] contgi2 20111   all

we see that the reads from the end 50,000 bases were kept from contig1, and all reads that mapped to contig2 were kept.

Clone this wiki locally