Skip to main content

Tags reads in a BAM file based on other BAM files.

Project description

Readtagger

https://travis-ci.org/bardin-lab/readtagger.svg?branch=master https://coveralls.io/repos/github/bardin-lab/readtagger/badge.svg?branch=master

Tags reads in a BAM file based on other BAM files.

Installation

pip install readtagger

Usage

To tag reads in file a.bam with file b.bam and output to path output.bam, type

readtagger --tag_file a.bam --annotate_with b.bam ----output_file output.bam

This will by default tag reads with the RD, RR, MD and MR tags, where the RD tag has detail mapping information for the current read, while the MD tag has the information for the mate. RR and MR contain the aligned reference (i.e chromosome). The first letter can be changed on a per-file basis by appending “:first_letter_read:first_letter_mate” to the file path. To change the above example into X for the read and Y for the mate, run:

readtagger --tag_file a.bam --annotate_with b.bam:X:Z ----output_file output.bam

To tag one bam file using multiple alignment files, run:

readtagger --tag_file a.bam --annotate_with b.bam:A:B c.bam:C:D ----output_file output.bam

Now reads that align in file b.bam will be tagged with AR, AD and BR, BD, while reads aligned in file c.bam are marked with CR, CD and DR, DD.

Advanced usage

To see the advanced options, type:

readtagger -h

Testing

If you modify readtagger, you can run all tests by running tox:

pip install tox
tox

History

0.1.9 (2017-02-17)

  • Add automated deployment to Galaxy Toolshed

0.1.8 (2017-02-17)

  • Minor release to test release process

0.1.7 (2017-02-17)

  • Extend testing with coverage testing
  • Automate deployment to pypi and conda
  • Register project with pyup.io

0.1.6 (2017-02-16)

  • Rename to readtagger
  • Fix bug with stdin closing file descriptor too early, leading to corrupt BAM files
  • Extend testing

0.1.5 (2017-02-12)

  • Add option (-wd) to write suboptimal tag into separate BAM file
  • Add option (-wv) to write verified tags into separate BAM file
  • Performance improvments by letting sambamba handle BAM reading and writing. Also elimininate regualr expression to parse cigarstring

0.1.4 (2017-02-10)

  • Add option (-k) to keep alternative tags if they do not explain the softclipped read any better. Default is to discard them.

0.1.3.2 (2017-02-08)

  • Fix dovetailing script

0.1.3 (2017-02-07)

  • Add option to allow dovetailing in alignment files when tagging reads
  • Add separate entrypoint for standalone script

0.1.2 (2017-02-05)

  • Add conda recipe
  • Python3 string fix

0.1.0 (2017-02-05)

  • Initial version

Project details


Release history Release notifications

History Node

0.4.11

History Node

0.4.10

History Node

0.4.6

History Node

0.4.5

History Node

0.4.4

History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.25

History Node

0.3.24

History Node

0.3.23

History Node

0.3.22

History Node

0.3.21

History Node

0.3.20

History Node

0.3.19

History Node

0.3.18

History Node

0.3.17

History Node

0.3.16

History Node

0.3.15

History Node

0.3.14

History Node

0.3.13

History Node

0.3.12

History Node

0.3.11

History Node

0.3.10

History Node

0.3.9

History Node

0.3.8

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.0

History Node

0.1.13

History Node

0.1.12

History Node

0.1.10

This version
History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
readtagger-0.1.9.tar.gz (12.3 kB) Copy SHA256 hash SHA256 Source None Feb 17, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page