make-prg


Namemake-prg JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/iqbal-lab-org/make_prg
SummaryCode to create a PRG from a Multiple Sequence Alignment file
upload_time2023-07-20 10:09:01
maintainer
docs_urlNone
authorMichael Hall
requires_python>=3.8,<=3.11
licenseMIT
keywords python reference-graph genome-graph bioinformatics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # make_prg

A tool to create and update PRGs for input to [Pandora][pandora] and [Gramtools][gramtools] from a set of 
Multiple Sequence Alignments.

![master branch badge](https://github.com/iqbal-lab-org/make_prg/actions/workflows/ci.yaml/badge.svg) 
[![codecov](https://codecov.io/github/iqbal-lab-org/make_prg/branch/master/graph/badge.svg?token=6IQSY13MSH)](https://codecov.io/github/iqbal-lab-org/make_prg)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)


# Support

We fully support `make_prg` on `linux` with `python` versions `3.8`-`3.11`. For other operating systems, `make_prg`
can be run through containers.

[TOC]: #

## Table of Contents
- [Install](#install)
  - [No installation needed - precompiled portable binary](#no-installation-needed---precompiled-portable-binary)
  - [pip](#pip)
  - [conda](#conda)
  - [Container](#container)
- [Running on a sample example](#running-on-a-sample-example)
- [Usage](#usage)

## Install

### No installation needed - precompiled portable binary

You can use `make_prg` with no installation at all by simply downloading the precompiled binary, and running it.
In this binary, all libraries are linked statically. Compilation is done using [PyInstaller](https://github.com/pyinstaller/pyinstaller).

#### Requirements
`GLIBC >= 2.29` (present on `Ubuntu >= 19.04`, `Debian >= 11`, `CentOS >= 9`, etc);

#### Download
```
wget https://github.com/iqbal-lab-org/make_prg/releases/download/0.5.0/make_prg_0.5.0
```

#### Run
```
chmod +x make_prg_0.5.0
./make_prg_0.5.0 -h
```

### pip

**Requirements**: `python>=3.8,<=3.11`

```sh
pip install make_prg
```

### conda

```sh
conda install -c bioconda make_prg
```

### Container

Docker images are hosted at [quay.io].

#### `singularity`

Prerequisite: [`singularity`][singularity]

```sh
URI="docker://quay.io/iqballab/make_prg"
singularity exec "$URI" make_prg --help
```

The above will use the latest version. If you want to specify a version then use a
[tag][quay.io] (or commit) like so.

```sh
VERSION="0.5.0"
URI="docker://quay.io/iqballab/make_prg:${VERSION}"
```

#### `docker`

[![Docker Repository on Quay](https://quay.io/repository/iqballab/make_prg/status "Docker Repository on Quay")](https://quay.io/repository/iqballab/make_prg)

Prerequisite: [`docker`][docker]

```sh
docker pull quay.io/iqballab/make_prg
docker run quay.io/iqballab/make_prg --help
```

You can find all the available tags on the [quay.io repository][quay.io].

## Running on a sample example

To see how to input files to both `make_prg from_msa` and `make_prg update`, and the outputs
they create on a sample example, see [sample example](sample_example).

## Usage

```
$ make_prg --help
usage: make_prg <subcommand> <options>

Subcommand entrypoint

options:
  -h, --help     show this help message and exit
  -V, --version  show program's version number and exit

Available subcommands:
  
    from_msa     Make PRG from multiple sequence alignment
    update       Update PRGs given new sequences.
```

#### `from_msa`

```
$ make_prg from_msa --help
usage: make_prg from_msa

options:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Multiple sequence alignment file or a directory containing such files
  -s SUFFIX, --suffix SUFFIX
                        If the input parameter (-i, --input) is a directory, then filter for files with this suffix. If this parameter is not given, all files in the input directory is considered.
  -o OUTPUT_PREFIX, --output-prefix OUTPUT_PREFIX
                        Prefix for the output files
  -f ALIGNMENT_FORMAT, --alignment-format ALIGNMENT_FORMAT
                        Alignment format of MSA, must be a biopython AlignIO input alignment_format. See http://biopython.org/wiki/AlignIO. Default: fasta
  -N MAX_NESTING, --max-nesting MAX_NESTING
                        Maximum number of levels to use for nesting. Default: 5
  -L MIN_MATCH_LENGTH, --min-match-length MIN_MATCH_LENGTH
                        Minimum number of consecutive characters which must be identical for a match. Default: 7
  -O OUTPUT_TYPE, --output-type OUTPUT_TYPE
                        p: PRG, b: Binary, g: GFA, a: All. Combinations are allowed i.e., gb: GFA and Binary. Default: a
  -F, --force           Force overwrite previous output
  -t THREADS, --threads THREADS
                        Number of threads. 0 will use all available. Default: 1
  -v, --verbose         Increase output verbosity (-v for debug, -vv for trace - trace is for developers only)
  --log LOG             Path to write log to. Default is stderr
```

#### `update`

```
$ make_prg update --help
usage: make_prg update

options:
  -h, --help            show this help message and exit
  -u UPDATE_DS, --update-DS UPDATE_DS
                        Filepath to the update data structures (a *.update_DS.zip file created from make_prg from_msa or update)
  -o OUTPUT_PREFIX, --output-prefix OUTPUT_PREFIX
                        Prefix for the output files
  -d DENOVO_PATHS, --denovo-paths DENOVO_PATHS
                        Filepath containing denovo sequences. Should point to a denovo_paths.txt file
  -D LONG_DELETION_THRESHOLD, --deletion-threshold LONG_DELETION_THRESHOLD
                        Ignores long deletions of the given size or longer. If long deletions should not be ignored, put a large value. Default: 10
  -O OUTPUT_TYPE, --output-type OUTPUT_TYPE
                        p: PRG, b: Binary, g: GFA, a: All. Combinations are allowed i.e., gb: GFA and Binary. Default: a
  -F, --force           Force overwrite previous output
  -t THREADS, --threads THREADS
                        Number of threads. 0 will use all available. Default: 1
  -v, --verbose         Increase output verbosity (-v for debug, -vv for trace - trace is for developers only)
  --log LOG             Path to write log to. Default is stderr
```

[pandora]: https://github.com/rmcolq/pandora
[gramtools]: https://github.com/iqbal-lab-org/gramtools/
[docker]: https://docs.docker.com/v17.12/install/
[quay.io]: https://quay.io/repository/iqballab/make_prg
[singularity]: https://sylabs.io/guides/3.4/user-guide/quick_start.html#quick-installation-steps


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iqbal-lab-org/make_prg",
    "name": "make-prg",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<=3.11",
    "maintainer_email": "",
    "keywords": "python,reference-graph,genome-graph,bioinformatics",
    "author": "Michael Hall",
    "author_email": "michael@mbh.sh",
    "download_url": "https://files.pythonhosted.org/packages/4f/2e/dcaea80f51948d5b132200a2866b6feb44a687cee0e0967feb80ebda36c7/make_prg-0.5.0.tar.gz",
    "platform": null,
    "description": "# make_prg\n\nA tool to create and update PRGs for input to [Pandora][pandora] and [Gramtools][gramtools] from a set of \nMultiple Sequence Alignments.\n\n![master branch badge](https://github.com/iqbal-lab-org/make_prg/actions/workflows/ci.yaml/badge.svg) \n[![codecov](https://codecov.io/github/iqbal-lab-org/make_prg/branch/master/graph/badge.svg?token=6IQSY13MSH)](https://codecov.io/github/iqbal-lab-org/make_prg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n\n# Support\n\nWe fully support `make_prg` on `linux` with `python` versions `3.8`-`3.11`. For other operating systems, `make_prg`\ncan be run through containers.\n\n[TOC]: #\n\n## Table of Contents\n- [Install](#install)\n  - [No installation needed - precompiled portable binary](#no-installation-needed---precompiled-portable-binary)\n  - [pip](#pip)\n  - [conda](#conda)\n  - [Container](#container)\n- [Running on a sample example](#running-on-a-sample-example)\n- [Usage](#usage)\n\n## Install\n\n### No installation needed - precompiled portable binary\n\nYou can use `make_prg` with no installation at all by simply downloading the precompiled binary, and running it.\nIn this binary, all libraries are linked statically. Compilation is done using [PyInstaller](https://github.com/pyinstaller/pyinstaller).\n\n#### Requirements\n`GLIBC >= 2.29` (present on `Ubuntu >= 19.04`, `Debian >= 11`, `CentOS >= 9`, etc);\n\n#### Download\n```\nwget https://github.com/iqbal-lab-org/make_prg/releases/download/0.5.0/make_prg_0.5.0\n```\n\n#### Run\n```\nchmod +x make_prg_0.5.0\n./make_prg_0.5.0 -h\n```\n\n### pip\n\n**Requirements**: `python>=3.8,<=3.11`\n\n```sh\npip install make_prg\n```\n\n### conda\n\n```sh\nconda install -c bioconda make_prg\n```\n\n### Container\n\nDocker images are hosted at [quay.io].\n\n#### `singularity`\n\nPrerequisite: [`singularity`][singularity]\n\n```sh\nURI=\"docker://quay.io/iqballab/make_prg\"\nsingularity exec \"$URI\" make_prg --help\n```\n\nThe above will use the latest version. If you want to specify a version then use a\n[tag][quay.io] (or commit) like so.\n\n```sh\nVERSION=\"0.5.0\"\nURI=\"docker://quay.io/iqballab/make_prg:${VERSION}\"\n```\n\n#### `docker`\n\n[![Docker Repository on Quay](https://quay.io/repository/iqballab/make_prg/status \"Docker Repository on Quay\")](https://quay.io/repository/iqballab/make_prg)\n\nPrerequisite: [`docker`][docker]\n\n```sh\ndocker pull quay.io/iqballab/make_prg\ndocker run quay.io/iqballab/make_prg --help\n```\n\nYou can find all the available tags on the [quay.io repository][quay.io].\n\n## Running on a sample example\n\nTo see how to input files to both `make_prg from_msa` and `make_prg update`, and the outputs\nthey create on a sample example, see [sample example](sample_example).\n\n## Usage\n\n```\n$ make_prg --help\nusage: make_prg <subcommand> <options>\n\nSubcommand entrypoint\n\noptions:\n  -h, --help     show this help message and exit\n  -V, --version  show program's version number and exit\n\nAvailable subcommands:\n  \n    from_msa     Make PRG from multiple sequence alignment\n    update       Update PRGs given new sequences.\n```\n\n#### `from_msa`\n\n```\n$ make_prg from_msa --help\nusage: make_prg from_msa\n\noptions:\n  -h, --help            show this help message and exit\n  -i INPUT, --input INPUT\n                        Multiple sequence alignment file or a directory containing such files\n  -s SUFFIX, --suffix SUFFIX\n                        If the input parameter (-i, --input) is a directory, then filter for files with this suffix. If this parameter is not given, all files in the input directory is considered.\n  -o OUTPUT_PREFIX, --output-prefix OUTPUT_PREFIX\n                        Prefix for the output files\n  -f ALIGNMENT_FORMAT, --alignment-format ALIGNMENT_FORMAT\n                        Alignment format of MSA, must be a biopython AlignIO input alignment_format. See http://biopython.org/wiki/AlignIO. Default: fasta\n  -N MAX_NESTING, --max-nesting MAX_NESTING\n                        Maximum number of levels to use for nesting. Default: 5\n  -L MIN_MATCH_LENGTH, --min-match-length MIN_MATCH_LENGTH\n                        Minimum number of consecutive characters which must be identical for a match. Default: 7\n  -O OUTPUT_TYPE, --output-type OUTPUT_TYPE\n                        p: PRG, b: Binary, g: GFA, a: All. Combinations are allowed i.e., gb: GFA and Binary. Default: a\n  -F, --force           Force overwrite previous output\n  -t THREADS, --threads THREADS\n                        Number of threads. 0 will use all available. Default: 1\n  -v, --verbose         Increase output verbosity (-v for debug, -vv for trace - trace is for developers only)\n  --log LOG             Path to write log to. Default is stderr\n```\n\n#### `update`\n\n```\n$ make_prg update --help\nusage: make_prg update\n\noptions:\n  -h, --help            show this help message and exit\n  -u UPDATE_DS, --update-DS UPDATE_DS\n                        Filepath to the update data structures (a *.update_DS.zip file created from make_prg from_msa or update)\n  -o OUTPUT_PREFIX, --output-prefix OUTPUT_PREFIX\n                        Prefix for the output files\n  -d DENOVO_PATHS, --denovo-paths DENOVO_PATHS\n                        Filepath containing denovo sequences. Should point to a denovo_paths.txt file\n  -D LONG_DELETION_THRESHOLD, --deletion-threshold LONG_DELETION_THRESHOLD\n                        Ignores long deletions of the given size or longer. If long deletions should not be ignored, put a large value. Default: 10\n  -O OUTPUT_TYPE, --output-type OUTPUT_TYPE\n                        p: PRG, b: Binary, g: GFA, a: All. Combinations are allowed i.e., gb: GFA and Binary. Default: a\n  -F, --force           Force overwrite previous output\n  -t THREADS, --threads THREADS\n                        Number of threads. 0 will use all available. Default: 1\n  -v, --verbose         Increase output verbosity (-v for debug, -vv for trace - trace is for developers only)\n  --log LOG             Path to write log to. Default is stderr\n```\n\n[pandora]: https://github.com/rmcolq/pandora\n[gramtools]: https://github.com/iqbal-lab-org/gramtools/\n[docker]: https://docs.docker.com/v17.12/install/\n[quay.io]: https://quay.io/repository/iqballab/make_prg\n[singularity]: https://sylabs.io/guides/3.4/user-guide/quick_start.html#quick-installation-steps\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Code to create a PRG from a Multiple Sequence Alignment file",
    "version": "0.5.0",
    "project_urls": {
        "Documentation": "https://github.com/iqbal-lab-org/make_prg",
        "Homepage": "https://github.com/iqbal-lab-org/make_prg",
        "Repository": "https://github.com/iqbal-lab-org/make_prg"
    },
    "split_keywords": [
        "python",
        "reference-graph",
        "genome-graph",
        "bioinformatics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6f4d2fdc19f4069bff7e2ad3b6258cdd3293e34e1f1b4e56dc1b8a3f98a0304",
                "md5": "a680a5147097c6b4f805eb08a3039f1b",
                "sha256": "925252978f662c7e6918065ea4d4f2beb8956bb305505e5f6ba77a5e239c1400"
            },
            "downloads": -1,
            "filename": "make_prg-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a680a5147097c6b4f805eb08a3039f1b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<=3.11",
            "size": 15887202,
            "upload_time": "2023-07-20T10:08:58",
            "upload_time_iso_8601": "2023-07-20T10:08:58.153385Z",
            "url": "https://files.pythonhosted.org/packages/e6/f4/d2fdc19f4069bff7e2ad3b6258cdd3293e34e1f1b4e56dc1b8a3f98a0304/make_prg-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f2edcaea80f51948d5b132200a2866b6feb44a687cee0e0967feb80ebda36c7",
                "md5": "bd370c981cb910cee42381af3298d710",
                "sha256": "2cbc2cfdd426714b17126f04cf4031198839ab3c73c41ccfdcfca9ac0d950866"
            },
            "downloads": -1,
            "filename": "make_prg-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bd370c981cb910cee42381af3298d710",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<=3.11",
            "size": 15801476,
            "upload_time": "2023-07-20T10:09:01",
            "upload_time_iso_8601": "2023-07-20T10:09:01.071464Z",
            "url": "https://files.pythonhosted.org/packages/4f/2e/dcaea80f51948d5b132200a2866b6feb44a687cee0e0967feb80ebda36c7/make_prg-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-20 10:09:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iqbal-lab-org",
    "github_project": "make_prg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "make-prg"
}
        
Elapsed time: 0.38190s