目录

licence PyPI version install with bioconda

Description

calcs is a command-line tool specifically designed to append a minimap2’s cs tag to a SAM file.

[!CAUTION]

calcs is deprecated.

If your SAM file has MD tags, we recommend using cstag-cli or paftools.js sam2paf.
Even if your SAM/BAM files do not have MD tags, we recommend using samtools calmd to add MD tags, and cstag-cli to add cs tags since calcs requires computational time.
See the Comparison with other tools section for details.

Installation

You can install calcs using pip:

pip install calcs

Alternatively, you can get calcs from bioconda:

conda install -c bioconda calcs

Usage

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

Options

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

Examples

# cs tag (short form)
calcs examples/example.sam --reference examples/ref.fa > example_cs.sam

# cs tag (long form)
calcs examples/example.sam --reference examples/ref.fa --long > example_cslong.sam

# PAF format with cs tag (short form)
calcs examples/example.sam --reference examples/ref.fa --paf > example_cs.paf

# PAF format with cs tag (long form)
calcs examples/example.sam --reference examples/ref.fa --paf --long > example_cslong.paf

# Multiprocessing
calcs examples/example.sam --reference examples/ref.fa --threads 4 > 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

Comparison with other tools

Here is the brief comparison between calcs, cstag-cli, and sam2paf.

calcs cstag-cli sam2paf
Input SAM and FASTA SAM or BAM with a MD tag SAM with a MD tag
Output format SAM or PAF SAM or BAM PAF
Speed Slow🐢 Fast🐇 Fast🐇

Instead of calcs, we recommend using either cstag-cli or sam2paf.
If a SAM file lacks MD tags, you can first add these tags using samtools calmd and then apply cstag-cli.

关于

一个用于科学计算和数据分析的Python库

764.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号