rna-map


Namerna-map JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/YesselmanLab/rna_map
Summaryrapid analysis of RNA mutational profiling (MaP) experiments.
upload_time2023-02-06 02:16:55
maintainer
docs_urlNone
authorJoe Yesselman
requires_python
license
keywords rna_map
VCS
bugtrack_url
requirements colorlog click cloup plotly matplotlib numpy pandas tabulate pyyaml future pytest jsonschema
Travis-CI
coveralls test coverage No coveralls.
            


# RNA MAP

[![Docker Linux Build](https://github.com/YesselmanLab/rna_map/actions/workflows/docker_linux_build.yml/badge.svg)](https://github.com/YesselmanLab/rna_map/actions/workflows/docker_linux_build.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![PYPI package](https://badge.fury.io/py/rna-map.png)](http://badge.fury.io/py/rna-map)


## How to install

```
pip install rna-map
```

### with docker 
```shell
# on linux and intel mac
docker build -t rna-map -f docker/Dockerfile .

# on mac with apple silicon / or other arm64 platforms
docker build -t rna-map --platform linux/amd64 -f docker/Dockerfile .
```

## How to use 

```
rna-map --help
Usage: rna-map [OPTIONS]

  rapid analysis of RNA mutational profiling (MaP) experiments.

Main arguments:
  These are the main arguments for the command line interface
  -fa, --fasta PATH              The fasta file containing the reference
                                 sequences  [required]
  -fq1, --fastq1 PATH            The fastq file containing the single end reads
                                 or the first pair of paired end reads
                                 [required]
  -fq2, --fastq2 TEXT            The fastq file containing the second pair of
                                 paired end reads
  --dot-bracket TEXT             The directory containing the input files
  -pf, --param-file TEXT         A yml formatted file to specify parameters, see
                                 rna_map/resources/default.yml for an example
  -pp, --param-preset TEXT       run a set of parameters for specific uses like
                                 'barcoded-libraries'

Mapping options:
  These are the options for pre processing of fastq files and alignment to
  reference sequences
  --skip-fastqc                  do not run fastqc for quality control of
                                 sequence data
  --skip-trim-galore             do not run trim galore for quality control of
                                 sequence data
  --tg-q-cutoff INTEGER          the quality cutoff for trim galore
  --bt2-alignment-args TEXT      the arguments to pass to bowtie2 for alignment
                                 seperated by commas
  --save-unaligned               the path to save unaligned reads to

Bit vector options:
  These are the options for the bit vector step
  --skip-bit-vector              do not run the bit vector step
  --summary-output-only          do not generate bit vector files or plots
                                 recommended when there are thousands of
                                 reference sequences
  --plot-sequence                plot sequence and structure is supplied under
                                 the population average plots
  --map-score-cutoff INTEGER     reject any bit vector where the mapping score
                                 for bowtie2 alignment is less than this value
  --qscore-cutoff INTEGER        quality score of read nucleotide, sets to
                                 ambigious if under this val
  --mutation-count-cutoff INTEGER
                                 maximum number of mutations allowed in a bit
                                 vector will be discarded if higher
  --percent-length-cutoff FLOAT  minium percent of the length of the reference
                                 sequence allowed in a bit vector will be
                                 discarded if lower
  --min-mut-distance INTEGER     minimum distance between mutations in a bit
                                 vector will be discarded if lower

Docker options:
  These are the options for running the command line interface in a docker
  container
  --docker                       Run the program in a docker container
  --docker-image TEXT            The docker image to use
  --docker-platform TEXT         The platform to use for the docker image

Misc options:
  These are the options for the misc stage
  --overwrite                    overwrite the output directory if it exists
  --restore-org-behavior         restore the original behavior of the rna_map
  --stricter-bv-constraints      use stricter constraints for bit vector
                                 generation, use at your own risk!
  --debug                        enable debug mode

Other options:
  --help                         Show this message and exit.

```

### running paired end reads

```shell
 rna-map -fa test/resources/case_1/test.fasta -fq1 test/resources/case_unit/test_mate1.fastq -fq2 test/resources/case_unit/test_mate2.fastq 
```

```shell
rna_map.CLI - INFO -
88888888ba   888b      88         db             88b           d88         db         88888888ba
88      "8b  8888b     88        d88b            888b         d888        d88b        88      "8b
88      ,8P  88 `8b    88       d8'`8b           88`8b       d8'88       d8'`8b       88      ,8P
88aaaaaa8P'  88  `8b   88      d8'  `8b          88 `8b     d8' 88      d8'  `8b      88aaaaaa8P'
88""""88'    88   `8b  88     d8YaaaaY8b         88  `8b   d8'  88     d8YaaaaY8b     88""""""'
88    `8b    88    `8b 88    d8""""""""8b        88   `8b d8'   88    d8""""""""8b    88
88     `8b   88     `8888   d8'        `8b       88    `888'    88   d8'        `8b   88
88      `8b  88      `888  d8'          `8b      88     `8'     88  d8'          `8b  88

rna_map.CLI - INFO - ran at commandline as:
rna_map.CLI - INFO - /Users/jyesselm/miniconda3/envs/py3/bin/rna-map -fa test/resources/case_1/test.fasta -fq1 test/resources/case_unit/test_mate1.fastq -fq2 test/resources/case_unit/test_mate2.fastq
rna_map.RUN - INFO - fasta file: test/resources/case_1/test.fasta exists
rna_map.RUN - INFO - found 1 valid reference sequences in test/resources/case_1/test.fasta
rna_map.RUN - INFO - fastq1 file: test/resources/case_unit/test_mate1.fastq exists
rna_map.RUN - INFO - fastq2 file: test/resources/case_unit/test_mate2.fastq exists
rna_map.RUN - INFO - two fastq files supplied, thus assuming paired reads
rna_map.MAPPING - INFO - bowtie2 2.4.5 detected!
rna_map.MAPPING - INFO - fastqc v0.11.9 detected!
rna_map.MAPPING - INFO - trim_galore 0.6.6 detected!
rna_map.MAPPING - INFO - cutapt 1.18 detected!
rna_map.MAPPING - INFO - building directory structure
rna_map.MAPPING - INFO - bowtie2 2.4.5 detected!
rna_map.MAPPING - INFO - fastqc v0.11.9 detected!
rna_map.MAPPING - INFO - trim_galore 0.6.6 detected!
rna_map.MAPPING - INFO - cutapt 1.18 detected!
rna_map.EXTERNAL_CMD - INFO - running fastqc
rna_map.EXTERNAL_CMD - INFO - fastqc ran without errors
rna_map.EXTERNAL_CMD - INFO - running trim_galore
rna_map.EXTERNAL_CMD - INFO - trim_galore ran without errors
rna_map.EXTERNAL_CMD - INFO - running bowtie2-build
rna_map.EXTERNAL_CMD - INFO - bowtie2-build ran without errors
rna_map.EXTERNAL_CMD - INFO - running bowtie2 alignment
rna_map.EXTERNAL_CMD - INFO - bowtie2 alignment ran without errors
rna_map.EXTERNAL_CMD - INFO - results for bowtie alignment:
25 reads; of these:
  25 (100.00%) were paired; of these:
    1 (4.00%) aligned concordantly 0 times
    24 (96.00%) aligned concordantly exactly 1 time
    0 (0.00%) aligned concordantly >1 times
96.00% overall alignment rate
rna_map.MAPPING - INFO - finished mapping!
rna_map.BIT_VECTOR - INFO - starting bitvector generation
rna_map.BIT_VECTOR - INFO - REMOVED READS:
| name          |   low_mapq |
|---------------|------------|
| mttr-6-alt-h3 |          0 |

rna_map.BIT_VECTOR - INFO - MUTATION SUMMARY:
| name          |   reads |   aligned |   no_mut |   1_mut |   2_mut |   3_mut |   3plus_mut |   sn |
|---------------|---------|-----------|----------|---------|---------|---------|-------------|------|
| mttr-6-alt-h3 |      24 |       100 |       50 |   33.33 |    12.5 |    4.17 |           0 | 4.91 |
```



### running with docker 
`--docker` flag will run the docker image. if you have run docker build first
```shell
rna-map -fa test/resources/case_1/test.fasta -fq1 test/resources/case_unit/test_mate1.fastq -fq2 test/resources/case_unit/test_mate2.fastq --docker
```

## TODO
- [ ] 
- [ ] Add mac build to github actions





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/YesselmanLab/rna_map",
    "name": "rna-map",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "rna_map",
    "author": "Joe Yesselman",
    "author_email": "jyesselm@unl.edu",
    "download_url": "https://files.pythonhosted.org/packages/3f/2c/5fd3aefe6ba5e4ef15ea5d1a9e00bdd709650fdf994bf629b33666f8fb46/rna_map-0.3.0.tar.gz",
    "platform": null,
    "description": "\n\n\n# RNA MAP\n\n[![Docker Linux Build](https://github.com/YesselmanLab/rna_map/actions/workflows/docker_linux_build.yml/badge.svg)](https://github.com/YesselmanLab/rna_map/actions/workflows/docker_linux_build.yml)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)\n[![PYPI package](https://badge.fury.io/py/rna-map.png)](http://badge.fury.io/py/rna-map)\n\n\n## How to install\n\n```\npip install rna-map\n```\n\n### with docker \n```shell\n# on linux and intel mac\ndocker build -t rna-map -f docker/Dockerfile .\n\n# on mac with apple silicon / or other arm64 platforms\ndocker build -t rna-map --platform linux/amd64 -f docker/Dockerfile .\n```\n\n## How to use \n\n```\nrna-map --help\nUsage: rna-map [OPTIONS]\n\n  rapid analysis of RNA mutational profiling (MaP) experiments.\n\nMain arguments:\n  These are the main arguments for the command line interface\n  -fa, --fasta PATH              The fasta file containing the reference\n                                 sequences  [required]\n  -fq1, --fastq1 PATH            The fastq file containing the single end reads\n                                 or the first pair of paired end reads\n                                 [required]\n  -fq2, --fastq2 TEXT            The fastq file containing the second pair of\n                                 paired end reads\n  --dot-bracket TEXT             The directory containing the input files\n  -pf, --param-file TEXT         A yml formatted file to specify parameters, see\n                                 rna_map/resources/default.yml for an example\n  -pp, --param-preset TEXT       run a set of parameters for specific uses like\n                                 'barcoded-libraries'\n\nMapping options:\n  These are the options for pre processing of fastq files and alignment to\n  reference sequences\n  --skip-fastqc                  do not run fastqc for quality control of\n                                 sequence data\n  --skip-trim-galore             do not run trim galore for quality control of\n                                 sequence data\n  --tg-q-cutoff INTEGER          the quality cutoff for trim galore\n  --bt2-alignment-args TEXT      the arguments to pass to bowtie2 for alignment\n                                 seperated by commas\n  --save-unaligned               the path to save unaligned reads to\n\nBit vector options:\n  These are the options for the bit vector step\n  --skip-bit-vector              do not run the bit vector step\n  --summary-output-only          do not generate bit vector files or plots\n                                 recommended when there are thousands of\n                                 reference sequences\n  --plot-sequence                plot sequence and structure is supplied under\n                                 the population average plots\n  --map-score-cutoff INTEGER     reject any bit vector where the mapping score\n                                 for bowtie2 alignment is less than this value\n  --qscore-cutoff INTEGER        quality score of read nucleotide, sets to\n                                 ambigious if under this val\n  --mutation-count-cutoff INTEGER\n                                 maximum number of mutations allowed in a bit\n                                 vector will be discarded if higher\n  --percent-length-cutoff FLOAT  minium percent of the length of the reference\n                                 sequence allowed in a bit vector will be\n                                 discarded if lower\n  --min-mut-distance INTEGER     minimum distance between mutations in a bit\n                                 vector will be discarded if lower\n\nDocker options:\n  These are the options for running the command line interface in a docker\n  container\n  --docker                       Run the program in a docker container\n  --docker-image TEXT            The docker image to use\n  --docker-platform TEXT         The platform to use for the docker image\n\nMisc options:\n  These are the options for the misc stage\n  --overwrite                    overwrite the output directory if it exists\n  --restore-org-behavior         restore the original behavior of the rna_map\n  --stricter-bv-constraints      use stricter constraints for bit vector\n                                 generation, use at your own risk!\n  --debug                        enable debug mode\n\nOther options:\n  --help                         Show this message and exit.\n\n```\n\n### running paired end reads\n\n```shell\n rna-map -fa test/resources/case_1/test.fasta -fq1 test/resources/case_unit/test_mate1.fastq -fq2 test/resources/case_unit/test_mate2.fastq \n```\n\n```shell\nrna_map.CLI - INFO -\n88888888ba   888b      88         db             88b           d88         db         88888888ba\n88      \"8b  8888b     88        d88b            888b         d888        d88b        88      \"8b\n88      ,8P  88 `8b    88       d8'`8b           88`8b       d8'88       d8'`8b       88      ,8P\n88aaaaaa8P'  88  `8b   88      d8'  `8b          88 `8b     d8' 88      d8'  `8b      88aaaaaa8P'\n88\"\"\"\"88'    88   `8b  88     d8YaaaaY8b         88  `8b   d8'  88     d8YaaaaY8b     88\"\"\"\"\"\"'\n88    `8b    88    `8b 88    d8\"\"\"\"\"\"\"\"8b        88   `8b d8'   88    d8\"\"\"\"\"\"\"\"8b    88\n88     `8b   88     `8888   d8'        `8b       88    `888'    88   d8'        `8b   88\n88      `8b  88      `888  d8'          `8b      88     `8'     88  d8'          `8b  88\n\nrna_map.CLI - INFO - ran at commandline as:\nrna_map.CLI - INFO - /Users/jyesselm/miniconda3/envs/py3/bin/rna-map -fa test/resources/case_1/test.fasta -fq1 test/resources/case_unit/test_mate1.fastq -fq2 test/resources/case_unit/test_mate2.fastq\nrna_map.RUN - INFO - fasta file: test/resources/case_1/test.fasta exists\nrna_map.RUN - INFO - found 1 valid reference sequences in test/resources/case_1/test.fasta\nrna_map.RUN - INFO - fastq1 file: test/resources/case_unit/test_mate1.fastq exists\nrna_map.RUN - INFO - fastq2 file: test/resources/case_unit/test_mate2.fastq exists\nrna_map.RUN - INFO - two fastq files supplied, thus assuming paired reads\nrna_map.MAPPING - INFO - bowtie2 2.4.5 detected!\nrna_map.MAPPING - INFO - fastqc v0.11.9 detected!\nrna_map.MAPPING - INFO - trim_galore 0.6.6 detected!\nrna_map.MAPPING - INFO - cutapt 1.18 detected!\nrna_map.MAPPING - INFO - building directory structure\nrna_map.MAPPING - INFO - bowtie2 2.4.5 detected!\nrna_map.MAPPING - INFO - fastqc v0.11.9 detected!\nrna_map.MAPPING - INFO - trim_galore 0.6.6 detected!\nrna_map.MAPPING - INFO - cutapt 1.18 detected!\nrna_map.EXTERNAL_CMD - INFO - running fastqc\nrna_map.EXTERNAL_CMD - INFO - fastqc ran without errors\nrna_map.EXTERNAL_CMD - INFO - running trim_galore\nrna_map.EXTERNAL_CMD - INFO - trim_galore ran without errors\nrna_map.EXTERNAL_CMD - INFO - running bowtie2-build\nrna_map.EXTERNAL_CMD - INFO - bowtie2-build ran without errors\nrna_map.EXTERNAL_CMD - INFO - running bowtie2 alignment\nrna_map.EXTERNAL_CMD - INFO - bowtie2 alignment ran without errors\nrna_map.EXTERNAL_CMD - INFO - results for bowtie alignment:\n25 reads; of these:\n  25 (100.00%) were paired; of these:\n    1 (4.00%) aligned concordantly 0 times\n    24 (96.00%) aligned concordantly exactly 1 time\n    0 (0.00%) aligned concordantly >1 times\n96.00% overall alignment rate\nrna_map.MAPPING - INFO - finished mapping!\nrna_map.BIT_VECTOR - INFO - starting bitvector generation\nrna_map.BIT_VECTOR - INFO - REMOVED READS:\n| name          |   low_mapq |\n|---------------|------------|\n| mttr-6-alt-h3 |          0 |\n\nrna_map.BIT_VECTOR - INFO - MUTATION SUMMARY:\n| name          |   reads |   aligned |   no_mut |   1_mut |   2_mut |   3_mut |   3plus_mut |   sn |\n|---------------|---------|-----------|----------|---------|---------|---------|-------------|------|\n| mttr-6-alt-h3 |      24 |       100 |       50 |   33.33 |    12.5 |    4.17 |           0 | 4.91 |\n```\n\n\n\n### running with docker \n`--docker` flag will run the docker image. if you have run docker build first\n```shell\nrna-map -fa test/resources/case_1/test.fasta -fq1 test/resources/case_unit/test_mate1.fastq -fq2 test/resources/case_unit/test_mate2.fastq --docker\n```\n\n## TODO\n- [ ] \n- [ ] Add mac build to github actions\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "rapid analysis of RNA mutational profiling (MaP) experiments.",
    "version": "0.3.0",
    "split_keywords": [
        "rna_map"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ca7d67ca03d88e6cc29efd7ac9c8db96711ece6bd333ee4ff8b9c82253e34f1",
                "md5": "40cf523fa47de6a327914cbfa2e2c232",
                "sha256": "b47edc91b7081a7e0e1a51e3313590cbe3858ac2a0c8432499dd6fbf3dae169d"
            },
            "downloads": -1,
            "filename": "rna_map-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40cf523fa47de6a327914cbfa2e2c232",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14145815,
            "upload_time": "2023-02-06T02:16:52",
            "upload_time_iso_8601": "2023-02-06T02:16:52.968418Z",
            "url": "https://files.pythonhosted.org/packages/7c/a7/d67ca03d88e6cc29efd7ac9c8db96711ece6bd333ee4ff8b9c82253e34f1/rna_map-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f2c5fd3aefe6ba5e4ef15ea5d1a9e00bdd709650fdf994bf629b33666f8fb46",
                "md5": "7af9faae47f2bf4bc2252361b81b20d8",
                "sha256": "0a92b5182ac0a865106bd568314f16eba2773e5d9cc69b413e8b4c6e7b81f99e"
            },
            "downloads": -1,
            "filename": "rna_map-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7af9faae47f2bf4bc2252361b81b20d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14144206,
            "upload_time": "2023-02-06T02:16:55",
            "upload_time_iso_8601": "2023-02-06T02:16:55.720884Z",
            "url": "https://files.pythonhosted.org/packages/3f/2c/5fd3aefe6ba5e4ef15ea5d1a9e00bdd709650fdf994bf629b33666f8fb46/rna_map-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-06 02:16:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "YesselmanLab",
    "github_project": "rna_map",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "colorlog",
            "specs": []
        },
        {
            "name": "click",
            "specs": []
        },
        {
            "name": "cloup",
            "specs": []
        },
        {
            "name": "plotly",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "tabulate",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "future",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "jsonschema",
            "specs": []
        }
    ],
    "lcname": "rna-map"
}
        
Elapsed time: 0.03842s