Skip to main content

Store any file as a fasta file

Project description

Disclaimer: this is only a proof-of-concept (and a joke), please don't actually use this.

bin2fasta

Store any file as a fasta file!

Installation

$ pip install bin2fasta

Usage

$ 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.

Basic example:

$ 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
$

Note that you can easily chain multiple commands by piping their respective outputs and using -:

$ 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
$

Poetry workflow

Only relevant for developers:

Run executable:

$ poetry run bin2fasta

Publish to PyPi:

$ poetry --build publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bin2fasta-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bin2fasta-0.0.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file bin2fasta-0.0.2.tar.gz.

File metadata

  • Download URL: bin2fasta-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for bin2fasta-0.0.2.tar.gz
Algorithm Hash digest
SHA256 38a0f42f8f424bc196eb2396e26a9758eab419275291e757eaa51c735cb38e84
MD5 a6b7eeb46b887d8f04a04ce1c1331a54
BLAKE2b-256 0b20d9640ed23b703a4536e9577f1a0199cb39f9c9bf4ed99097ad763993af19

See more details on using hashes here.

File details

Details for the file bin2fasta-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: bin2fasta-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for bin2fasta-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 674d86dacb045ac61937b243eda04ea695f2141ba1a2b17ea6fc915a01fef53a
MD5 6e9586b260c084e2a0d3bc583f5dc823
BLAKE2b-256 2cfbd399ff258a4407ee6bf8cefd436f6768cd212a613318a052de10a625ac18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page