Skip to main content

call CS tag to SAM file

Project description

Description

Append the minimap2's CS tag to SAM file.
If the CS tag is already present, this command will overwrite the existing tag.

:warning: This tool will be maintained until the samtools team implements official CS caller.

Installation

You can install calcs using pip:

pip install calcs

Usage

calcs [options] <in.sam> -r/--reference <in.fasta>

Getting Started

# CS tag (short form)
calcs aln.sam -r ref.fasta > aln_cs.sam
# CS tag (long form)
calcs aln.sam -r ref.fasta -l > aln_cslong.sam
# PAF format with CS tag (short form)
calcs aln.sam -r ref.fasta -p > aln_cs.paf
# PAF format with CS tag (long form)
calcs aln.sam -r ref.fasta -p -l > aln_cslong.paf
# Multithreading
calcs aln.sam -r ref.fasta -t 4 > aln_cs.sam

Options

-l, --long: output the cs tag in  the long form
-t, --threads INT: number of threads to use (default: 1)

Examples

calcs examples/example.sam -r examples/ref.fa > example_cs.sam

If the input file is a BAM/CRAN format, you can use samtools view.

samtools view examples/example.bam |
  calcs -l -r examples/ref.fa |
  samtools sort > example_cslong.bam

paftools.js sam2paf vs calcs

sam2paf calcs
Speed + -
Report substitution + (if SAM includes MD tag) +
Report CS tag + (if SAM includes MD tag) +
Output format PAF SAM or PAF

Project details


Download files

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

Source Distribution

calcs-0.0.0.9999.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

calcs-0.0.0.9999-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

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