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 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()