#bam #sam #hts #cli

app bamkit

bamkit:用于操作 bam 文件的简单程序

2 个不稳定版本

0.2.0 2022年12月9日
0.1.0 2022年12月6日

#18 in #sam

GPL-3.0 许可证

18KB
401 代码行

bamkit

🦀 bamkit:用于操作 bam 文件的简单程序

安装

cargo install bamkit

# or

git clone https://github.com/sharkLoc/bamkit.git
cd bamkit
cargo b --release
# mv target/release/bamkit to anywhere you want 

使用方法

bamkit: a simple program for bam file manipulation

Usage: bamkit <COMMAND>

Commands:
  view    sam bam conversion
  region  get target region from bam file
  flags   bam file flag value show
  insert  insert size plot for bam file
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help information
  -V, --version  Print version information

查看
bamkit view -h
sam bam conversion

Usage: bamkit view [OPTIONS] [INPUT]

Arguments:
  [INPUT]  input bam[sam] file

Options:
  -H, --Header     show sam file header only
  -b, --bam        output is bam
  -o, --out <OUT>  output file name or write to stdout
  -h, --help       Print help information
区域
bamkit region -h
get target region from bam file

Usage: bamkit region [OPTIONS] --bam <BAM> <REG>

Arguments:
  <REG>  bam[sam] file target postion, eg, chr1:100-300

Options:
  -b, --bam <BAM>  input sorted and indexed bam file
  -s, --sam        output is sam
  -o, --out <OUT>  output file name or write to stdout, default bam format
  -h, --help       Print help information
插入
bamkit insert -h
insert size plot for bam file

Usage: bamkit insert [OPTIONS] --name <NAME> [BAM]

Arguments:
  [BAM]  input bam[sam] file

Options:
  -m, --max <MAX>    max insert szie length [default: 1000]
  -n, --name <NAME>  the html format plot file name
  -h, --help         Print help information

示例: bamkit insert test.bam -n insertPlot

insert
标志
bamkit flags -h
bam file flag value show

Usage: bamkit flags <FLAG>

Arguments:
  <FLAG>  specify bam[sam] flag value

Options:
  -h, --help  Print help information

示例: bamkit flags 163

flags

** 任何错误请提交问题 **💖

依赖

~19–32MB
~445K SLoC