This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Command-line tool to soft-clip reads from amplicon-based sequence based on
specified primer locations.

.. image::
:alt: Build Status

.. image::
:alt: Coverage Status

The official repository is at:


In amplicon-based target panel sequencing, regions-of-interest are amplified by
specific pairs of primers; consequently the regions-of-interest typically
always start and end with these primer sequences, sequences which match the
reference sequence exactly and do not reflect the actual sample sequence. In
some panel designs, the amplicons may be tiled such that an amplicon of one
region of interest may overlap the primer region of different amplicon. In this
arrangement, the overlapping regions should enable detection of variants that
fall within that primer region. However, the presence of the primer sequences
will typically overwhelm the signature of true, low-frequency variants.

Katana matches each read to its corresponding primer pair based on start
position of the read. Katana then soft-clips the primer region from the edge of
the read sequence, rescuing the signal of true variants measured by overlapping
amplicons. The output is conceptually similar to hard-clipping the primers from
the original FASTQ reads based on sequence identity but with the advantage that
retaining the primers during alignment improves alignment quality.
amplicon A [ primerREGION-OF-INTERESTprimer ]
amplicon B [ primerREGION-OF-INTERESTprimer ]

output read1 sequence: tgcatgAGTCTGATCTAGGTAGTTgacgtc (clipped amplicon A primers)
output read2 sequence: atctagGTAGTTGACGTCAGATAAtgcagc (clipped amplicon B primers)
(lowercase = soft-clipped)

Tags are added to each output read to help explain how it was modified:
- X0 : associated primer id
- X1 : original cigar string
- X2 : original reference start
- X3 : original reference_end (informational; useful for reverse reads)
- X4 : why read would be excluded (appears only if --preserve_all_alignments)

Katana assumes that:
- input bam is indexed
- primers come in sense-antisense pairs
- primer pairs are on the same chromosome
- primer chromsomes match the bam regions
- primer file is tab separated; the header line includes the following fields:
* Customer TargetID
* Chr
* Sense Start
* Antisense Start
* Sense Sequence
* Antisense Sequence
- primer file sense and antisense start are specified in 1-based coordinates

Quick Start

1. **Install Katana (see INSTALL.rst):**
$ pip install katana

2. **Get the examples directory:**
$ git clone

3. **Run Katana:**
$ katana Katana/examples/primers.txt Katana/examples/chr10.pten.bam clipped.bam

This will read chr10.pten.bam and produce clipped.bam which contains reads
adjusted to soft-clip (exclude) their respective primer regions. Unmapped reads
or reads which do not match a known primer are excluded.

Katana help


$ katana --help

usage: katana primer_manifest input_bam output_bam

Match each alignment in input BAM to primer, softclipping the primer region.

positional arguments:
primer_manifest path to primer manifest (tab-separated text)
input_bam path to input BAM
output_bam path to output BAM

optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
Preserve all incoming alignments (even if they are
unmapped, cannot be matched with primers, result in
invalid CIGARs, etc.)


Email for support and questions.

UM BRCF Bioinformatics Core


0.1.1 (XX/XX/XXXX)
- Fixed problems in BAM output:
- Corrected next reference in paired reads
- Excludes reads where CIGAR is entirely clipped
- Unpairs reads which had no mate in input
- Added BAM tags to excluded reads (useful when --preserving_all_reads)
- Adjusted to improve performance (about 6x faster)
- Added support for pip install
- Added functional tests
- Added support for travis CI
- Added support for Python3
- Added support for pysam 0.8.3

0.1 (1/28/2016)
- Initial Release

Katana is written and maintained by the University of Michigan
BRCF Bioinformatic Core; individual contributors include:

- Chris Gates
- Peter Ulintz
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Katana-0.1.1-py2.py3-none-any.whl (17.0 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Feb 10, 2016
Katana-0.1.1.tar.gz (12.0 kB) Copy SHA256 Checksum SHA256 Source Feb 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting