将任何文件存储为fasta文件
bin2fasta的Python项目详细描述
免责声明:这只是一个概念的证明(和一个笑话),请不要使用这个。
bin2fasta
将任何文件存储为fasta文件!
安装
$ pip install bin2fasta
用法
$ bin2fasta --help Usage: bin2fasta [OPTIONS] FILENAME Store any file as a fasta file Options: -D, --decode Enable conversion from FASTA to binary. -o, --output FILENAME File to write to. --help Show this message and exit.
基本示例:
$ file foo.png foo.png: PNG image data, 618 x 257, 8-bit/color RGBA, non-interlaced $ bin2fasta -o bar.fasta foo.png 319400it [00:00, 683649.99it/s] $ head -c50 bar.fasta >Sequence_master AGTTGAGGCGCCTTACTGCCGAATTAGTTAAGA $ bin2fasta --decode -o baz.png bar.fasta 159700it [00:00, 455825.67it/s] $ file baz.png baz.png: PNG image data, 618 x 257, 8-bit/color RGBA, non-interlaced $ diff foo.png baz.png $
注意,您可以通过管道连接多个命令的各自输出并使用-
:
$ cat foo.png | xz | gpg -c | bin2fasta - > bar.fasta $ cat bar.fasta | bin2fasta -D - | gpg -d | xz --decompress > baz.png $ diff foo.png baz.png $
诗歌工作流程
仅适用于developers:
运行可执行文件:
$ poetry run bin2fasta
发布到pypi:
$ poetry --build publish