figwig 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- figwig/__init__.py +11 -0
- figwig/__main__.py +61 -0
- figwig/_kernels.py +765 -0
- figwig/bam2bw.py +2635 -0
- figwig/bigwig.py +802 -0
- figwig/install_skill.py +61 -0
- figwig/py.typed +0 -0
- figwig/skills/figwig/SKILL.md +84 -0
- figwig/skills/figwig/references/bam2bw.md +89 -0
- figwig/skills/figwig/references/errors.md +51 -0
- figwig/skills/figwig/references/reading.md +174 -0
- figwig/skills/figwig/references/threads-and-memory.md +122 -0
- figwig/skills/figwig/references/writing.md +135 -0
- figwig/writer.py +1565 -0
- figwig-0.1.0.dist-info/METADATA +361 -0
- figwig-0.1.0.dist-info/RECORD +19 -0
- figwig-0.1.0.dist-info/WHEEL +4 -0
- figwig-0.1.0.dist-info/entry_points.txt +2 -0
- figwig-0.1.0.dist-info/licenses/LICENSE +21 -0
figwig/__init__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# __init__.py
|
|
2
|
+
# Contact: Jacob Schreiber <jmschreiber91@gmail.com>
|
|
3
|
+
|
|
4
|
+
__version__ = '0.1.0'
|
|
5
|
+
|
|
6
|
+
from .bigwig import BigWigReader
|
|
7
|
+
from .bigwig import read_bigwig
|
|
8
|
+
from .writer import BigWigWriter
|
|
9
|
+
from .writer import write_bigwig
|
|
10
|
+
|
|
11
|
+
__all__ = ['BigWigReader', 'read_bigwig', 'BigWigWriter', 'write_bigwig']
|
figwig/__main__.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# __main__.py
|
|
2
|
+
# Contact: Jacob Schreiber <jmschreiber91@gmail.com>
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
The `figwig` command, also run as `python -m figwig`. `figwig bam2bw`
|
|
6
|
+
converts SAM/BAM files or BED/tsv files of fragments into per-base bigWig
|
|
7
|
+
tracks (see `figwig.bam2bw`), and `figwig install-skill` installs figwig's
|
|
8
|
+
Claude Code skill (see `figwig.install_skill`).
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import sys
|
|
12
|
+
import argparse
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _parser():
|
|
16
|
+
from . import __version__
|
|
17
|
+
|
|
18
|
+
parser = argparse.ArgumentParser(prog='figwig',
|
|
19
|
+
description='The commands of figwig, a reader and writer of bigWig files.')
|
|
20
|
+
parser.add_argument('--version', action='version',
|
|
21
|
+
version='figwig {}'.format(__version__))
|
|
22
|
+
|
|
23
|
+
commands = parser.add_subparsers(dest='command', metavar='command',
|
|
24
|
+
required=True)
|
|
25
|
+
commands.add_parser('bam2bw', help="Convert SAM/BAM or BED/tsv files into "
|
|
26
|
+
"per-base bigWig tracks of reads' 5' ends; see figwig bam2bw -h.")
|
|
27
|
+
|
|
28
|
+
install = commands.add_parser('install-skill', help="Install figwig's "
|
|
29
|
+
"Claude Code skill into a skills directory.", description="Copy "
|
|
30
|
+
"figwig's Claude Code skill, which teaches a coding agent how to read "
|
|
31
|
+
"and write bigWigs with figwig, into DIRECTORY/figwig.")
|
|
32
|
+
install.add_argument('-d', '--directory', default=None, help="The skills "
|
|
33
|
+
"directory to install into. Default is ~/.claude/skills.")
|
|
34
|
+
install.add_argument('--symlink', action='store_true', help="Link to the "
|
|
35
|
+
"skill inside the installed package instead of copying it, so that "
|
|
36
|
+
"edits to the package show up at once; the link breaks if the package "
|
|
37
|
+
"moves or is uninstalled.")
|
|
38
|
+
install.add_argument('-f', '--force', action='store_true', help="Remove "
|
|
39
|
+
"whatever is at the destination first, such as the skill of an older "
|
|
40
|
+
"figwig.")
|
|
41
|
+
return parser
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def main(argv=None):
|
|
45
|
+
argv = sys.argv[1:] if argv is None else list(argv)
|
|
46
|
+
|
|
47
|
+
# A command's own arguments are parsed by the command, so that its usage
|
|
48
|
+
# and errors are its own.
|
|
49
|
+
if len(argv) > 0 and argv[0] == 'bam2bw':
|
|
50
|
+
from . import bam2bw
|
|
51
|
+
bam2bw.main(argv[1:], prog='figwig bam2bw', fast_exit=True)
|
|
52
|
+
return
|
|
53
|
+
|
|
54
|
+
args = _parser().parse_args(argv)
|
|
55
|
+
if args.command == 'install-skill':
|
|
56
|
+
from . import install_skill
|
|
57
|
+
install_skill.run(args)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
if __name__ == '__main__':
|
|
61
|
+
main()
|