Skip to content

Commit

Permalink
CLI betas, Methpype full tutorial (#7)
Browse files Browse the repository at this point in the history
* exporting beta values for methQC to use

* exporting beta values for methQC to use

* consolidate_scores function

* consolidate function now part of pipeline --betas

* consolidate part of pipeline

* added 27k manifest

note: structure of this 27k manifest was missing Strand (F/R) and Infinium_Design_Type (I or II). added columns; left blank.

* added 27K ArrayType

* bug fixes: ArrayTYpe to ArrayType and m_factor to m_value

* CLI tweaks

* Update README.md

* Feature/create sample sheet (#4)

* added function to create sample sheet, optional argument in run_pipeline

* improved create_sample_sheet

- don't rename builtin variables like `dict`
- doesn't require GSM_ID to work
- better logger info

* added flag to allow process to work without a samplesheet.

* make_sample_sheet flag

* create_sample_sheet bug fixes

* pipeline processing bugs fixed

* added readthedocs embed and classifiers

* Update setup.py

* Full tutorial (#6)

* tutorial and figures

* added links in references

* Update index.rst

* Update index.rst

* tutorial revisions

* had to redo footnotes, github doesn't support default markdown footnotes

* more revisions, focusing ease of use

* updated links

* 27k test was wrong

* Update test_array.py

* Update test_array.py

* Update test_array.py

* Update config.yml
  • Loading branch information
Marc Maxmeister committed Jul 23, 2019
1 parent 6f19258 commit 4c4f5d5
Show file tree
Hide file tree
Showing 24 changed files with 695 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
name: Running tests and test coverage
command: |
# pipenv run python setup.py test
pipenv install coveralls # for coveralls.io -- this can be in pipefile [dev] instead.
# set COVERALLS_REPO_TOKEN=<...> in ENVIRONMENT variables in circleci
pipenv install coveralls # for coveralls.io -- this can be in Pipfile [dev] instead.
pipenv run coverage run setup.py test
pipenv run coverage report
pipenv run coverage html
# set COVERALLS_REPO_TOKEN=<...> in ENVIRONMENT variables in circleci
sudo pipenv run coveralls # pushes report to coveralls.io
pipenv run coverage html
pipenv run coveralls # -- pushes report to coveralls.io
- store_artifacts:
path: htmlcov # specific folder name where coverage always stores HTML reports
destination: methpype
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
`methpype` is a python package for processing Illumina methylation array data.
View on [ReadTheDocs.](https://life-epigenetics-methpype-dev.readthedocs-hosted.com/en/latest/)
View on [ReadTheDocs.](https://life-epigenetics-methpype.readthedocs-hosted.com/en/latest/)

[![Readthedocs](https://readthedocs.com/projects/life-epigenetics-methpype-dev/badge/?version=latest)](https://life-epigenetics-methpype-dev.readthedocs-hosted.com/en/latest/) [![image](https://img.shields.io/pypi/l/pipenv.svg)](https://python.org/pypi/pipenv)
[![Readthedocs](https://readthedocs.com/projects/life-epigenetics-methpype/badge/?version=latest)](https://life-epigenetics-methpype.readthedocs-hosted.com/en/latest/) [![image](https://img.shields.io/pypi/l/pipenv.svg)](https://python.org/pypi/pipenv)
Linux/OSX
[![CircleCI](https://circleci.com/gh/LifeEGX/methpype-dev.svg?style=shield&circle-token=28f0bca658e0752a3096432063f2c2ef260d3a84)](https://circleci.com/gh/LifeEGX/methpype-dev) Windows [![Build status](https://ci.appveyor.com/api/projects/status/7vdji73odyc2cate/branch/master?svg=true)](https://ci.appveyor.com/project/life_epigenetics/methpype/branch/master)
[![CircleCI](https://circleci.com/gh/LifeEGX/methpype.svg?style=shield&circle-token=28f0bca658e0752a3096432063f2c2ef260d3a84)](https://circleci.com/gh/LifeEGX/methpype) Windows [![Build status](https://ci.appveyor.com/api/projects/status/7vdji73odyc2cate/branch/master?svg=true)](https://ci.appveyor.com/project/life_epigenetics/methpype/branch/master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9e4e03c5cbf54c8aa16dd2cf1a440e2f)](https://www.codacy.com?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=LifeEGX/methpype&amp;utm_campaign=Badge_Grade)
[![Coverage Status](https://coveralls.io/repos/github/LifeEGX/methpype/badge.svg?t=mwigt8)](https://coveralls.io/github/LifeEGX/methpype)

Expand Down
662 changes: 662 additions & 0 deletions docs/methpype_tutorial.md

Large diffs are not rendered by default.

Binary file added docs/tutorial_figs/fig1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig10.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig11.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig12.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig13.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig14.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig15.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig17.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig18.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig6.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig7.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial_figs/fig9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ Getting Started
:maxdepth: 2
:caption: Contents:

docs/methpype_tutorial.md
docs/source/methpype
docs/source/methpype.arrays
docs/source/methpype.preprocess
docs/source/methpype.samples
docs/source/methpype.utils
docs/source/modules

Indices and tables
Expand Down
20 changes: 18 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,25 @@

setup(
name='methpype',
version='1.0.2',
version='1.0.3',
description='Python-based Illumina methylation array preprocessing software',
long_description='Python-based Illumina methylation array preprocessing software',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Medical Science Apps.',
'Framework :: Jupyter',
'Intended Audience :: Science/Research',
'Intended Audience :: Financial and Insurance Industry',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
],
keywords='methylation dna data processing epigenetics illumina',
url='https://github.com/LifeEGX/methpype',
license='MIT',
author='Life Epigenetics',
Expand Down
21 changes: 7 additions & 14 deletions tests/models/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def test_inits_correctly(self):
class TestArrayType():
def test_enum_has_correct_values(self):
assert ArrayType.CUSTOM.value == 'custom'
assert ArrayType.ILLUMINA_27K.value == '27k'
assert ArrayType.ILLUMINA_450K.value == '450k'
assert ArrayType.ILLUMINA_EPIC.value == 'epic'
assert ArrayType.ILLUMINA_EPIC_PLUS.value == 'epic+'
Expand All @@ -32,21 +33,13 @@ def test_out_of_range_probe_counts_throws(self, capsys):
captured = capsys.readouterr()
assert captured.out == 'Unknown array type\n'

def test_27k_probe_counts_lower_bound_throws(self, capsys):
with pytest.raises(ValueError):
results = ArrayType.from_probe_count(54000)
assert results is None

captured = capsys.readouterr()
assert captured.out == 'Unsupported array type: Illumina Human Methylation 27k\n'
def test_27k_probe_counts_lower_bound(self):
array_type = ArrayType.from_probe_count(54000)
assert array_type == ArrayType.ILLUMINA_27K

def test_27k_probe_counts_upper_bound_throws(self, capsys):
with pytest.raises(ValueError):
results = ArrayType.from_probe_count(56000)
assert results is None

captured = capsys.readouterr()
assert captured.out == 'Unsupported array type: Illumina Human Methylation 27k\n'
def test_27k_probe_counts_upper_bound(self):
array_type = ArrayType.from_probe_count(56000)
assert array_type == ArrayType.ILLUMINA_27K

def test_450k_probe_counts_lower_bound(self):
array_type = ArrayType.from_probe_count(622000)
Expand Down

0 comments on commit 4c4f5d5

Please sign in to comment.