File: samtools.py

package info (click to toggle)
python-pysam 0.20.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,348 kB
  • sloc: ansic: 137,388; python: 8,501; sh: 283; makefile: 263; perl: 41
file content (55 lines) | stat: -rw-r--r-- 1,775 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from pysam.utils import PysamDispatcher

# samtools command line options to export in python
SAMTOOLS_DISPATCH = {
    # samtools 'documented' commands
    "view": ("view", None),
    "head": ("head", None),
    "sort": ("sort", None),
    "mpileup": ("mpileup", None),
    "consensus": ("consensus", None),
    "depth": ("depth", None),
    "faidx": ("faidx", None),
    "fqidx": ("fqidx", None),
    "tview": ("tview", None),
    "index": ("index", None),
    "idxstats": ("idxstats", None),
    "fixmate": ("fixmate", None),
    "flagstat": ("flagstat", None),
    "calmd": ("calmd", None),
    "merge": ("merge", None),
    "markdup": ("markdup", None),
    "rmdup": ("rmdup", None),
    "reference": ("reference", None),
    "reheader": ("reheader", None),
    "cat": ("cat", None),
    "targetcut": ("targetcut", None),
    "phase": ("phase", None),
    "bam2fq": ("bam2fq", None),
    "dict": ("dict", None),
    "addreplacerg": ("addreplacerg", None),
    "pad2unpad": ("pad2unpad", None),
    "depad": ("pad2unpad", None),
    "bedcov": ("bedcov", None),
    "coverage": ("coverage", None),
    "bamshuf": ("bamshuf", None),
    "collate": ("collate", None),
    "stats": ("stats", None),
    "fasta": ("fasta", None),
    "fastq": ("fastq", None),
    "quickcheck": ("quickcheck", None),
    "split": ("split", None),
    "flags": ("flags", None),
    "ampliconclip": ("ampliconclip", None),
    "ampliconstats": ("ampliconstats", None),
    "version": ("version", None),
    "fqimport": ("import", None),
    "samples": ("samples", None),
}

# instantiate samtools commands as python functions
for key, options in SAMTOOLS_DISPATCH.items():
    cmd, parser = options
    globals()[key] = PysamDispatcher("samtools", cmd, parser)

__all__ = list(SAMTOOLS_DISPATCH)