{"id":16948421,"url":"https://github.com/bow/crimson","last_synced_at":"2025-04-06T19:12:50.035Z","repository":{"id":34984002,"uuid":"39066411","full_name":"bow/crimson","owner":"bow","description":"Bioinformatics tool outputs converter to JSON or YAML","archived":false,"fork":false,"pushed_at":"2024-11-17T00:43:14.000Z","size":1444,"stargazers_count":36,"open_issues_count":6,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T17:11:21.148Z","etag":null,"topics":["bioinformatics","converter","json","yaml"],"latest_commit_sha":null,"homepage":"https://github.com/bow/crimson","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dcb9/yii2-phpredis","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-14T09:36:15.000Z","updated_at":"2024-09-14T06:59:01.000Z","dependencies_parsed_at":"2023-02-10T01:01:04.387Z","dependency_job_id":"bdc2109a-3cd2-4589-baf7-e43eae67c4c5","html_url":"https://github.com/bow/crimson","commit_stats":{"total_commits":380,"total_committers":7,"mean_commits":"54.285714285714285","dds":0.5605263157894738,"last_synced_commit":"979f51613737776fc49f7d8490e23afa9db211da"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bow%2Fcrimson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bow%2Fcrimson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bow%2Fcrimson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bow%2Fcrimson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bow","download_url":"https://codeload.github.com/bow/crimson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535519,"owners_count":20954576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","converter","json","yaml"],"created_at":"2024-10-13T21:50:43.623Z","updated_at":"2025-04-06T19:12:50.013Z","avatar_url":"https://github.com/bow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `crimson`\n\n[![pypi](https://img.shields.io/pypi/v/crimson)](https://pypi.org/project/crimson)\n[![ci](https://github.com/bow/crimson/actions/workflows/ci.yml/badge.svg)](https://github.com/bow/crimson/actions?query=branch%3Amaster)\n[![coverage](https://api.codeclimate.com/v1/badges/7904a5424f60f09ebbd7/test_coverage)](https://codeclimate.com/github/bow/crimson/test_coverage)\n\n\n`crimson` converts non-standard bioinformatics tool outputs to JSON or YAML.\n\nCurrently it can convert outputs of the following tools:\n\n  * [FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/\u003e) (``fastqc``)\n  * [FusionCatcher](https://github.com/ndaniel/fusioncatcher) (``fusioncatcher``)\n  * [samtools](http://www.htslib.org/doc/samtools.html) flagstat (``flagstat``)\n  * [Picard](https://broadinstitute.github.io/picard/) metrics tools (``picard``)\n  * [STAR](https://github.com/alexdobin/STAR) log file (``star``)\n  * [STAR-Fusion](https://github.com/STAR-Fusion/STAR-Fusion) hits table (``star-fusion``)\n  * [Variant Effect Predictor](http://www.ensembl.org/info/docs/tools/vep/index.html)\n    plain text output (``vep``)\n\nFor each conversion, there are two execution options: as command line tool or as a Python\nlibrary function. The first alternative uses `crimson` as a command-line tool. The second one\nrequires importing the `crimson` library in your program.\n\n\n## Installation\n\n`crimson` is available on the [Python Package Index](https://pypi.org/project/crimson/)\nand you can install it via ``pip``:\n\n```shell\n$ pip install crimson\n```\n\nIt is also available on\n[BioConda](https://bioconda.github.io/recipes/crimson/README.html), both through the\n`conda` package manager or as a\n[Docker container](https://quay.io/repository/biocontainers/crimson?tab=tags).\n\nFor Docker execution, you may also use\n[the GitHub Docker registry](https://github.com/bow/crimson/pkgs/container/crimson). This\nregistry hosts the latest version, but does not host versions 1.1.0 or earlier.\n\n```shell\ndocker pull ghcr.io/bow/crimson\n```\n\n\n## Usage\n\n### As a command line tool\n\nThe general command is `crimson {tool_name}`. By default, the output is written to\n`stdout`. For example, to use the `picard` parser, you would execute:\n\n```shell\n$ crimson picard /path/to/a/picard.metrics\n```\n\nYou can also write the output to a file by specifying a file name. The following\ncommand writes the output to a file named `converted.json`:\n\n```shell\n$ crimson picard /path/to/a/picard.metrics converted.json\n```\n\nSome parsers may accept additional input formats. The FastQC parser, for example, also\naccepts a path to a FastQC output directory as its input:\n\n\n```shell\n$ crimson fastqc /path/to/a/fastqc/dir\n```\n\nIt also accepts a path to a zipped result:\n\n```shell\n$ crimson fastqc /path/to/a/fastqc_result.zip\n```\n\nWhen in doubt, use the ``--help`` flag:\n\n```shell\n$ crimson --help            # for the general help\n$ crimson fastqc --help     # for the parser-specific help, in this case FastQC\n```\n\n### As a Python library function\n\nThe specific function to import is generally located at `crimson.{tool_name}.parser`. So to\nuse the `picard` parser in your program, you can do:\n\n```python\nfrom crimson import picard\n\n# You can specify the input file name as a string or path-like object...\nparsed = picard.parse(\"/path/to/a/picard.metrics\")\n\n# ... or a file handle\nwith open(\"/path/to/a/picard.metrics\") as src:\n    parsed = picard.parse(src)\n```\n\n## Why?\n\n  * Not enough tools use standard output formats.\n  * Writing and re-writing the same parsers across different scripts is not a productive\n    way to spend the day.\n\n\n## Local Development\n\nSetting up a local development requires that you set up all of the supported Python\nversions. We use [pyenv](https://github.com/pyenv/pyenv) for this.\n\n```shell\n# Clone the repository and cd into it.\n$ git clone https://github.com/bow/crimson\n$ cd crimson\n\n# Create your local development environment. This command also installs\n# all supported Python versions using `pyenv`.\n$ make dev\n\n# Run the test and linter suite to verify the setup.\n$ make lint test\n\n# When in doubt, just run `make` without any arguments.\n$ make\n```\n\n\n## Contributing\n\nIf you are interested, `crimson` accepts the following types contribution:\n\n  * Documentation updates / tweaks (if anything seems unclear, feel free to open an issue)\n  * Bug reports\n  * Support for tools' outputs which can be converted to JSON or YAML\n\nFor any of these, feel free to open an issue in the [issue\ntracker](https://github.com/bow/crimson/issues\u003e) or submit a pull request.\n\n\n## License\n\n`crimson` is BSD-licensed. Refer to the ``LICENSE`` file for the full license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbow%2Fcrimson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbow%2Fcrimson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbow%2Fcrimson/lists"}