Skip to main content

Unique-Sam

Unique-Sam is a simple command line tool to remove the duplicated alignments in the SAM file. If the MAPQ field of the alignment is available, unique-sam will keep one and only one alignment with the highest score. Otherwise, unique-sam will calculate a score according to the alignment’s MD or CIGAR field and use the calculated value to remove the duplicated alignments.

Install

  • Install with the source code, in the source folder:

    python setup.py install
  • If you have **pip** installed, you can simply run

    pip install unique-sam

    After installation you can access unique-sam from your command line.

Usage

unique-sam need a SAM format file to run properly. In your command line environment:

unique-sam input.sam -o output.sam

For more about unique-sam run:

unique-sam --help

Unique Strategy

Following strategies are applied to find the unique & the best alignment

  1. Keep the alignment pair that has the highest score. If more than one pairs are found to have the same “Highest Score”, these pairs will be removed.

  2. Read1 and Read2 should be mapped on different strands.

  3. The segment length decided by the read pairs should be longer than 0.7 * read length

Log File

All removed alignments will be written into log file input.sam.log under current folder. Each line of the log file start with a symbol and followed by the deleted alignment (the original alignment record in the input.sam). The symbol describe the reason of why this/these alignments should be removed. The specification of these symbols are listed in the follow table:

| Symbol | Description | | —— | ———– | | ! | Error lines | | < | Low score alignments | | = | Pairs with more than one best score | | ~ | Read pair mapped on the same strand | | ? | Segment length too short |

Download files

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

Source Distribution

unique-sam-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file unique-sam-0.1.0.tar.gz.

File metadata

  • Download URL: unique-sam-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for unique-sam-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b0fa17ba42708527693901039bd9cb9b91a9304e3392aca3c8cbdd08b5772e4
MD5 41521a48dc630b8c9c32c55e7fe84a0a
BLAKE2b-256 f7263877b4c75bf7bec446057507dbf3916c14af9f5dfc3fa5f415b8f709f262

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page