pylluminator 0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. pylluminator-0.1/.github/workflows/run_test.yml +31 -0
  2. pylluminator-0.1/.gitignore +37 -0
  3. pylluminator-0.1/.readthedocs.yaml +23 -0
  4. pylluminator-0.1/LICENSE +21 -0
  5. pylluminator-0.1/PKG-INFO +210 -0
  6. pylluminator-0.1/README.rst +174 -0
  7. pylluminator-0.1/docs/annotations.rst +96 -0
  8. pylluminator-0.1/docs/api.rst +20 -0
  9. pylluminator-0.1/docs/conf.py +65 -0
  10. pylluminator-0.1/docs/images/logo.png +0 -0
  11. pylluminator-0.1/docs/images/tutorials_1_-_Read_data_and_get_betas_16_0.png +0 -0
  12. pylluminator-0.1/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_15_0.png +0 -0
  13. pylluminator-0.1/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_17_1.png +0 -0
  14. pylluminator-0.1/docs/images/tutorials_4_-_Copy_Number_Variation_9_0.png +0 -0
  15. pylluminator-0.1/docs/index.rst +11 -0
  16. pylluminator-0.1/docs/requirements.txt +3 -0
  17. pylluminator-0.1/docs/templates/custom-class-template.rst +35 -0
  18. pylluminator-0.1/docs/templates/custom-method-template.rst +59 -0
  19. pylluminator-0.1/docs/templates/custom-module-template.rst +67 -0
  20. pylluminator-0.1/docs/tutorials/1 - Read data and get betas.ipynb +754 -0
  21. pylluminator-0.1/docs/tutorials/2 - QC.ipynb +275 -0
  22. pylluminator-0.1/docs/tutorials/3 - Calculate DMP and DMR.ipynb +470 -0
  23. pylluminator-0.1/docs/tutorials/4 - Copy Number Variation.ipynb +242 -0
  24. pylluminator-0.1/docs/tutorials.rst +10 -0
  25. pylluminator-0.1/pylluminator/__init__.py +0 -0
  26. pylluminator-0.1/pylluminator/annotations.py +388 -0
  27. pylluminator-0.1/pylluminator/cnv.py +258 -0
  28. pylluminator-0.1/pylluminator/dm.py +385 -0
  29. pylluminator-0.1/pylluminator/mask.py +194 -0
  30. pylluminator-0.1/pylluminator/ml.py +86 -0
  31. pylluminator-0.1/pylluminator/quality_control.py +254 -0
  32. pylluminator-0.1/pylluminator/read_idat.py +398 -0
  33. pylluminator-0.1/pylluminator/sample_sheet.py +142 -0
  34. pylluminator-0.1/pylluminator/samples.py +1855 -0
  35. pylluminator-0.1/pylluminator/stats.py +186 -0
  36. pylluminator-0.1/pylluminator/utils.py +534 -0
  37. pylluminator-0.1/pylluminator/visualizations.py +1618 -0
  38. pylluminator-0.1/pylluminator.egg-info/PKG-INFO +210 -0
  39. pylluminator-0.1/pylluminator.egg-info/SOURCES.txt +58 -0
  40. pylluminator-0.1/pylluminator.egg-info/dependency_links.txt +1 -0
  41. pylluminator-0.1/pylluminator.egg-info/requires.txt +13 -0
  42. pylluminator-0.1/pylluminator.egg-info/top_level.txt +1 -0
  43. pylluminator-0.1/pyproject.toml +32 -0
  44. pylluminator-0.1/requirements.txt +30 -0
  45. pylluminator-0.1/setup.cfg +4 -0
  46. pylluminator-0.1/tests/__init__.py +0 -0
  47. pylluminator-0.1/tests/conftest.py +29 -0
  48. pylluminator-0.1/tests/test_annotations.py +48 -0
  49. pylluminator-0.1/tests/test_betas.py +47 -0
  50. pylluminator-0.1/tests/test_cnv.py +52 -0
  51. pylluminator-0.1/tests/test_dm.py +107 -0
  52. pylluminator-0.1/tests/test_mask.py +84 -0
  53. pylluminator-0.1/tests/test_preprocessing.py +251 -0
  54. pylluminator-0.1/tests/test_qc.py +11 -0
  55. pylluminator-0.1/tests/test_read_samples.py +242 -0
  56. pylluminator-0.1/tests/test_sample_sheet.py +31 -0
  57. pylluminator-0.1/tests/test_samples.py +101 -0
  58. pylluminator-0.1/tests/test_stats.py +19 -0
  59. pylluminator-0.1/tests/test_utils.py +112 -0
  60. pylluminator-0.1/tests/test_visualizations.py +221 -0
@@ -0,0 +1,31 @@
1
+ name: Run Unit Test via Pytest
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ python-version: ["3.12"]
11
+
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - name: Set up Python ${{ matrix.python-version }}
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+ - name: Install dependencies
19
+ run: |
20
+ python -m pip install --upgrade pip
21
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
22
+ - name: Test with pytest
23
+ run: |
24
+ coverage run -m pytest -v -s
25
+ - name: Generate Coverage Report
26
+ run: |
27
+ coverage xml
28
+ - name: Upload coverage reports to Codecov
29
+ uses: codecov/codecov-action@v5
30
+ with:
31
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,37 @@
1
+ # development
2
+ .idea
3
+ __pycache__
4
+ drafts/
5
+ stub.py
6
+ data/
7
+ .ipynb_checkpoints/
8
+ .gitattributes
9
+ build
10
+ notebooks/
11
+
12
+ # tests
13
+ .coverage
14
+ coverage.xml
15
+ htmlcov
16
+ tests/*.png
17
+
18
+ # tutorial files that are not ipynb (saved models)
19
+ docs/tutorials/*
20
+ !docs/tutorials/*.ipynb
21
+
22
+ # data
23
+ *.gz
24
+
25
+ # documentations
26
+ _build/
27
+ generated/
28
+ _autosummary/
29
+
30
+ # packaging
31
+ *.egg
32
+ eggs/
33
+ .eggs
34
+ *.egg-info/
35
+ wheels/
36
+ dist/
37
+ build/
@@ -0,0 +1,23 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.12"
13
+
14
+ # Build documentation in the docs/ directory with Sphinx
15
+ sphinx:
16
+ configuration: docs/conf.py
17
+
18
+ python:
19
+ install:
20
+ - requirements: docs/requirements.txt # to install sphinx, nbsphinx..
21
+ - requirements: requirements.txt # package requirements (needed to build the python notebooks)
22
+ - method: pip
23
+ path: . # install the package locally
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 eliopato
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,210 @@
1
+ Metadata-Version: 2.4
2
+ Name: pylluminator
3
+ Version: 0.1
4
+ Summary: Tool to preprocess, analyze and visualize DNA methylation data from Illumina micro-arrays
5
+ Author-email: Elio <elio.fanchon@univ-amu.fr>
6
+ Maintainer-email: Elio <elio.fanchon@univ-amu.fr>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://pylluminator.readthedocs.io/
9
+ Project-URL: Documentation, https://pylluminator.readthedocs.io/
10
+ Project-URL: Repository, https://github.com/eliopato/pylluminator
11
+ Project-URL: Issues, https://github.com/eliopato/pylluminator/issues
12
+ Keywords: dna-methylation,epigenetics,illumina,bioinformatics,microarray,methylation,DMR
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
19
+ Requires-Python: >=3.12
20
+ Description-Content-Type: text/x-rst
21
+ License-File: LICENSE
22
+ Requires-Dist: pandas
23
+ Requires-Dist: numpy
24
+ Requires-Dist: scikit-learn
25
+ Requires-Dist: statsmodels
26
+ Requires-Dist: scipy
27
+ Requires-Dist: pyranges1
28
+ Requires-Dist: linear_segment
29
+ Requires-Dist: patsy
30
+ Requires-Dist: ailist
31
+ Requires-Dist: notebook
32
+ Requires-Dist: matplotlib
33
+ Requires-Dist: seaborn
34
+ Requires-Dist: inmoose
35
+ Dynamic: license-file
36
+
37
+ |logo| Welcome to pylluminator
38
+ ==============================
39
+
40
+ .. image:: https://img.shields.io/github/last-commit/eliopato/pylluminator.svg
41
+ :target: https://github.com/eliopato/pylluminator/commits/master
42
+ :alt: Last commit
43
+
44
+ .. image:: https://img.shields.io/github/actions/workflow/status/eliopato/pylluminator/run_test.yml?branch=main
45
+ :target: https://github.com/eliopato/pylluminator/actions
46
+ :alt: Test Status
47
+
48
+ .. image:: https://img.shields.io/codecov/c/github/eliopato/pylluminator
49
+ :target: https://codecov.io/gh/eliopato/pylluminator
50
+ :alt: Code coverage
51
+
52
+ .. image:: https://readthedocs.org/projects/pylluminator/badge/?version=latest
53
+ :target: https://pylluminator.readthedocs.io/en/latest/
54
+ :alt: Documentation Status
55
+
56
+ .. image:: https://img.shields.io/badge/License-MIT-blue.svg
57
+ :target: ./LICENSE
58
+ :alt: MIT License
59
+
60
+ Pylluminator is a Python package designed to provide an efficient workflow for processing and analyzing DNA
61
+ methylation data, mirroring the functionalities of the popular R package `SeSAMe <https://bioconductor.org/packages/release/bioc/html/sesame.html>`_.
62
+
63
+ It supports the following Illumina's Infinium array versions :
64
+
65
+ * human : 27k, 450k, MSA, EPIC, EPIC+, EPICv2
66
+ * mouse : MM285
67
+ * mammalian: Mammal40
68
+
69
+ .. |logo| image:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/logo.png
70
+ :width: 100px
71
+
72
+ .. note::
73
+
74
+ **This project is under active development.**
75
+
76
+
77
+ Main functionalities
78
+ --------------------
79
+
80
+ * idat files parsing
81
+
82
+ * data preprocessing
83
+
84
+ * background correction
85
+ * normalization
86
+ * dye bias correction
87
+ * pOOBAH
88
+ * batch effect correction with ComBat
89
+
90
+ * data analysis and visualisation
91
+
92
+ * beta values (density, PCA, MDS, dendrogram...)
93
+ * DMP and DMR, accounting for replicates / random effects
94
+ * CNV
95
+
96
+ * quality control
97
+
98
+ Visualization examples:
99
+
100
+ .. list-table::
101
+
102
+ * - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_1_-_Read_data_and_get_betas_16_0.png
103
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_1_-_Read_data_and_get_betas_16_0.png
104
+
105
+ Fig 1. Beta values
106
+
107
+ - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_15_0.png
108
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_15_0.png
109
+
110
+ Fig 2. Differentially methylated regions (DMRs)
111
+
112
+ * - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_17_1.png
113
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_17_1.png
114
+
115
+ Fig 3. Gene visualization
116
+
117
+ - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_4_-_Copy_Number_Variation_9_0.png
118
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_4_-_Copy_Number_Variation_9_0.png
119
+
120
+ Fig 4. Copy number variations (CNVs)
121
+
122
+
123
+ Installation
124
+ ------------
125
+
126
+ With pip
127
+ ~~~~~~~~
128
+
129
+ You can install Pylluminator directly with:
130
+
131
+ .. code-block:: shell
132
+
133
+ pip install pylluminator
134
+
135
+ From source
136
+ ~~~~~~~~~~~
137
+
138
+ We recommend using a virtual environment with Python 3.12 to build pylluminator from source. Here is an example using Conda.
139
+
140
+ Setup the virtual environment (optional)
141
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142
+
143
+ If you don't have Conda installed yet, here are the instructions depending on your OS : `Windows <https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html>`_ | `Linux <https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html>`_ | `MacOS <https://docs.conda.io/projects/conda/en/latest/user-guide/install/macos.html>`_.
144
+ After installing it, make sure you have Pip installed by running the following command in the terminal:
145
+
146
+ .. code-block:: shell
147
+
148
+ conda install anaconda::pip
149
+
150
+ Now you can create a Conda environment named "pylluminator" and activate it. You can change the name to your liking ;)
151
+
152
+ .. code-block:: shell
153
+
154
+ conda create -n pylluminator python=3.12
155
+ conda activate pylluminator
156
+
157
+
158
+ Install pylluminator
159
+ ^^^^^^^^^^^^^^^^^^^^^
160
+
161
+ You can download the latest source from github, or clone the repository with this command:
162
+
163
+ .. code-block:: shell
164
+
165
+ git clone https://github.com/eliopato/pylluminator.git
166
+
167
+ Your are now ready to install the dependencies and the package :
168
+
169
+ .. code-block:: shell
170
+
171
+ cd pylluminator
172
+ pip install .
173
+
174
+
175
+ Usage
176
+ -----
177
+
178
+ Refer to https://pylluminator.readthedocs.io/ for step-by-step tutorials and detailed documentation.
179
+
180
+ Contributing
181
+ ------------
182
+ We welcome contributions! If you'd like to help improve the package, please follow these steps:
183
+
184
+ 1. Fork the repository.
185
+ 2. Create a new branch for your feature or bugfix.
186
+ 3. Make your changes and test them.
187
+ 4. Submit a pull request describing your changes.
188
+
189
+ Bug reports / new features suggestion
190
+ -------------------------------------
191
+
192
+ If you encounter any bugs, have questions, or feel like the package is missing a very important feature, please open an issue on the `GitHub Issues <https://github.com/eliopato/pylluminator/issues>`_ page.
193
+
194
+ When opening an issue, please provide as much detail as possible, including:
195
+
196
+ - Steps to reproduce the issue
197
+ - The version of the package you are using
198
+ - Any relevant code snippets or error messages
199
+
200
+ License
201
+ -------
202
+
203
+ This project is licensed under the MIT License - see the `LICENSE <./LICENSE>`_ file for details.
204
+
205
+ Acknowledgements
206
+ ----------------
207
+
208
+ This package is strongly inspired from `SeSAMe <https://bioconductor.org/packages/release/bioc/html/sesame.html>`_ and
209
+ includes code from `methylprep <https://github.com/FoxoTech/methylprep>`_ for .idat files parsing.
210
+
@@ -0,0 +1,174 @@
1
+ |logo| Welcome to pylluminator
2
+ ==============================
3
+
4
+ .. image:: https://img.shields.io/github/last-commit/eliopato/pylluminator.svg
5
+ :target: https://github.com/eliopato/pylluminator/commits/master
6
+ :alt: Last commit
7
+
8
+ .. image:: https://img.shields.io/github/actions/workflow/status/eliopato/pylluminator/run_test.yml?branch=main
9
+ :target: https://github.com/eliopato/pylluminator/actions
10
+ :alt: Test Status
11
+
12
+ .. image:: https://img.shields.io/codecov/c/github/eliopato/pylluminator
13
+ :target: https://codecov.io/gh/eliopato/pylluminator
14
+ :alt: Code coverage
15
+
16
+ .. image:: https://readthedocs.org/projects/pylluminator/badge/?version=latest
17
+ :target: https://pylluminator.readthedocs.io/en/latest/
18
+ :alt: Documentation Status
19
+
20
+ .. image:: https://img.shields.io/badge/License-MIT-blue.svg
21
+ :target: ./LICENSE
22
+ :alt: MIT License
23
+
24
+ Pylluminator is a Python package designed to provide an efficient workflow for processing and analyzing DNA
25
+ methylation data, mirroring the functionalities of the popular R package `SeSAMe <https://bioconductor.org/packages/release/bioc/html/sesame.html>`_.
26
+
27
+ It supports the following Illumina's Infinium array versions :
28
+
29
+ * human : 27k, 450k, MSA, EPIC, EPIC+, EPICv2
30
+ * mouse : MM285
31
+ * mammalian: Mammal40
32
+
33
+ .. |logo| image:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/logo.png
34
+ :width: 100px
35
+
36
+ .. note::
37
+
38
+ **This project is under active development.**
39
+
40
+
41
+ Main functionalities
42
+ --------------------
43
+
44
+ * idat files parsing
45
+
46
+ * data preprocessing
47
+
48
+ * background correction
49
+ * normalization
50
+ * dye bias correction
51
+ * pOOBAH
52
+ * batch effect correction with ComBat
53
+
54
+ * data analysis and visualisation
55
+
56
+ * beta values (density, PCA, MDS, dendrogram...)
57
+ * DMP and DMR, accounting for replicates / random effects
58
+ * CNV
59
+
60
+ * quality control
61
+
62
+ Visualization examples:
63
+
64
+ .. list-table::
65
+
66
+ * - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_1_-_Read_data_and_get_betas_16_0.png
67
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_1_-_Read_data_and_get_betas_16_0.png
68
+
69
+ Fig 1. Beta values
70
+
71
+ - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_15_0.png
72
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_15_0.png
73
+
74
+ Fig 2. Differentially methylated regions (DMRs)
75
+
76
+ * - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_17_1.png
77
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_3_-_Calculate_DMP_and_DMR_17_1.png
78
+
79
+ Fig 3. Gene visualization
80
+
81
+ - .. figure:: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_4_-_Copy_Number_Variation_9_0.png
82
+ :target: https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/tutorials_4_-_Copy_Number_Variation_9_0.png
83
+
84
+ Fig 4. Copy number variations (CNVs)
85
+
86
+
87
+ Installation
88
+ ------------
89
+
90
+ With pip
91
+ ~~~~~~~~
92
+
93
+ You can install Pylluminator directly with:
94
+
95
+ .. code-block:: shell
96
+
97
+ pip install pylluminator
98
+
99
+ From source
100
+ ~~~~~~~~~~~
101
+
102
+ We recommend using a virtual environment with Python 3.12 to build pylluminator from source. Here is an example using Conda.
103
+
104
+ Setup the virtual environment (optional)
105
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
+
107
+ If you don't have Conda installed yet, here are the instructions depending on your OS : `Windows <https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html>`_ | `Linux <https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html>`_ | `MacOS <https://docs.conda.io/projects/conda/en/latest/user-guide/install/macos.html>`_.
108
+ After installing it, make sure you have Pip installed by running the following command in the terminal:
109
+
110
+ .. code-block:: shell
111
+
112
+ conda install anaconda::pip
113
+
114
+ Now you can create a Conda environment named "pylluminator" and activate it. You can change the name to your liking ;)
115
+
116
+ .. code-block:: shell
117
+
118
+ conda create -n pylluminator python=3.12
119
+ conda activate pylluminator
120
+
121
+
122
+ Install pylluminator
123
+ ^^^^^^^^^^^^^^^^^^^^^
124
+
125
+ You can download the latest source from github, or clone the repository with this command:
126
+
127
+ .. code-block:: shell
128
+
129
+ git clone https://github.com/eliopato/pylluminator.git
130
+
131
+ Your are now ready to install the dependencies and the package :
132
+
133
+ .. code-block:: shell
134
+
135
+ cd pylluminator
136
+ pip install .
137
+
138
+
139
+ Usage
140
+ -----
141
+
142
+ Refer to https://pylluminator.readthedocs.io/ for step-by-step tutorials and detailed documentation.
143
+
144
+ Contributing
145
+ ------------
146
+ We welcome contributions! If you'd like to help improve the package, please follow these steps:
147
+
148
+ 1. Fork the repository.
149
+ 2. Create a new branch for your feature or bugfix.
150
+ 3. Make your changes and test them.
151
+ 4. Submit a pull request describing your changes.
152
+
153
+ Bug reports / new features suggestion
154
+ -------------------------------------
155
+
156
+ If you encounter any bugs, have questions, or feel like the package is missing a very important feature, please open an issue on the `GitHub Issues <https://github.com/eliopato/pylluminator/issues>`_ page.
157
+
158
+ When opening an issue, please provide as much detail as possible, including:
159
+
160
+ - Steps to reproduce the issue
161
+ - The version of the package you are using
162
+ - Any relevant code snippets or error messages
163
+
164
+ License
165
+ -------
166
+
167
+ This project is licensed under the MIT License - see the `LICENSE <./LICENSE>`_ file for details.
168
+
169
+ Acknowledgements
170
+ ----------------
171
+
172
+ This package is strongly inspired from `SeSAMe <https://bioconductor.org/packages/release/bioc/html/sesame.html>`_ and
173
+ includes code from `methylprep <https://github.com/FoxoTech/methylprep>`_ for .idat files parsing.
174
+
@@ -0,0 +1,96 @@
1
+ Annotations
2
+ ===========
3
+
4
+ Manifests and other annotation files are built from the `SeSAMe package <https://zwdzwd.github.io/InfiniumAnnotation>`_ and illumina (cf `illumina docs <https://support.illumina.com.cn/downloads/infinium-methylationepic-v2-0-product-files.html>`_)
5
+
6
+ They are stored and versioned in the `pylluminator-data GitHub repository <https://github.com/eliopato/pylluminator-data/raw/main/>`_
7
+
8
+ Manifest
9
+ --------
10
+
11
+ Description of the columns of the `probe_infos.csv` file. If you want to use a custom manifest, you will need to provide this information.
12
+
13
+ ``illumina_id`` : ID that matches probe IDs in .idat files
14
+
15
+ ``probe_id`` : probe ID used in annotation files :
16
+
17
+ * First letters : Either ``cg`` (CpG), ``ch`` (CpH), ``mu`` (multi-unique), ``rp`` (repetitive element), ``rs`` (SNP probes), ``ctl`` (control), ``nb`` (somatic mutations found in cancer)
18
+ * Last 4 characters : top or bottom strand (``T/B``), converted or opposite strand (``C/O``), Infinium probe type (``1/2``), and the number of synthesis for representation of the probe on the array (``1,2,3,…,n``).
19
+
20
+ ``type`` : probe type, Infinium-I or Infinium-II
21
+
22
+ ``probe_type`` : ``cg`` (CpG), ``ch`` (CpH), ``mu`` (multi-unique), ``rp`` (repetitive element), ``rs`` (SNP probes), ``ctl`` (control), ``nb`` (somatic mutations found in cancer)
23
+
24
+ ``channel``: color channel, green (methylated) or red (unmethylated)
25
+
26
+ ``address_[A/B]``: Chip/tango address for A-allele and B-allele. For Infinium type I, allele A is Unmethylated, allele B is Methylated. For type II, address B is not set as there is only one probe. Addresses match the Illumina IDs found in IDat files.
27
+
28
+ ``start``: the start position of the probe sequence
29
+
30
+ ``end``: the end position of the probe sequence. Usually the start position +1 because probes typically span a single CpG site.
31
+
32
+ ``chromosome``: chromosome number/letter
33
+
34
+ ``mask_info``: name of the masks for this probe. Multiple masks are separated by semicolons. (details below)
35
+
36
+ ``genes``: genes encoded by this sequence. Multiple gene names are separated by semicolons.
37
+
38
+ ``transcript_types``: The types of transcripts linked to the probe's genomic location. These indicate whether the region corresponds to protein_coding, nonsense_mediated_decay, retained_intron, or other annotations. Multiple transcript types are separated by semicolons.
39
+
40
+ Masks
41
+ -----
42
+
43
+ Common masks
44
+ ~~~~~~~~~~~~~
45
+
46
+ ``M_mapping``: unmapped probes, or probes having too low mapping quality (alignment score under 35, either probe for Infinium-I) or Infinium-I probe allele A and B mapped to different locations
47
+
48
+ ``M_nonuniq``: mapped probes but with mapping quality smaller than 10, either probe for Infinium-I
49
+
50
+ ``M_uncorr_titration``: CpGs with titration correlation under 0.9. Functioning probes should have very high correlation with titrated methylation fraction.
51
+
52
+ Human masks (general and population-specific)
53
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54
+
55
+ ``M_commonSNP5_5pt``: mapped probes having at least a common SNP with MAF>=5% within 5bp from 3'-extension
56
+
57
+ ``M_commonSNP5_1pt``: mapped probes having at least a common SNP with MAF>=1% within 5bp from 3'-extension
58
+
59
+ ``M_1baseSwitchSNPcommon_1pt``: mapped Infinium-I probes with SNP (MAF>=1%) hitting the extension base and changing the color channel
60
+
61
+ ``M_2extBase_SNPcommon_1pt``: mapped Infinium-II probes with SNP (MAF>=1%) hitting the extension base.
62
+
63
+ ``M_SNP_EAS_1pt``: EAS population-specific mask (MAF>=1%).
64
+
65
+ ``M_1baseSwitchSNP_EAS_1pt``: EAS population-specific mask (MAF>=1%).
66
+
67
+ ``M_2extBase_SNP_EAS_1pt``: EAS population-specific mask (MAF>=1%).
68
+
69
+ ... more populations, e.g., ``EAS``, ``EUR``, ``AFR``, ``AMR``, ``SAS``.
70
+
71
+ Mouse masks (general and strain-specific)
72
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73
+
74
+ ``M_PWK_PhJ``: mapped probes having at least a PWK_PhJ strain-specific SNP within 5bp from 3'-extension
75
+
76
+ ``M_1baseSwitchPWK_PhJ``: mapped Infinium-I probes with PWK_PhJ strain-specific SNP hitting the extension base and changing the color channel
77
+
78
+ ``M_2extBase_PWK_PhJ``: mapped Infinium-II probes with PWK_PhJ strain-specific SNP hitting the extension base.
79
+
80
+ ... more strains, e.g., ``AKR_J``, ``A_J``, ``NOD_ShiLtJ``, ``MOLF_EiJ``, ``129P2_OlaHsd`` ...
81
+
82
+ Genome information
83
+ ------------------
84
+
85
+ ``genome_info/gap_info.csv``: contains information on gaps in the genomic sequence. These gaps represent regions
86
+ that are not sequenced or that are known to be problematic in the data, such as areas that may have low coverage or difficult-to-sequence regions.
87
+
88
+ ``genome_info/seq_length.csv``: keys are chromosome identifiers (e.g., 1, 2, ... X, etc.), and values are the corresponding sequence lengths (in base pairs).
89
+
90
+ ``genome_info/transcripts_list.csv``: high-level overview of the transcripts and their boundaries (start and end positions).
91
+
92
+ ``genome_info/transcripts_exons.csv``: information at the level of individual exons within each transcript (type, gene name, gene id...).
93
+ Details on `transcript_types` values can be found in `GRCh37 database <https://grch37.ensembl.org/info/genome/genebuild/biotypes.html>`_
94
+
95
+ ``genome_info/chromosome_regions.csv``: Names, addresses and Giemsa stain pattern of all chromosomes' regions.
96
+
@@ -0,0 +1,20 @@
1
+ API
2
+ ===
3
+
4
+ .. autosummary::
5
+ :toctree: _autosummary
6
+ :template: custom-module-template.rst
7
+ :recursive:
8
+
9
+ pylluminator.annotations
10
+ pylluminator.cnv
11
+ pylluminator.dm
12
+ pylluminator.mask
13
+ pylluminator.quality_control
14
+ pylluminator.read_idat
15
+ pylluminator.sample_sheet
16
+ pylluminator.samples
17
+ pylluminator.stats
18
+ pylluminator.utils
19
+ pylluminator.visualizations
20
+
@@ -0,0 +1,65 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # This file only contains a selection of the most common options. For a full
4
+ # list see the documentation:
5
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
+
7
+ # -- Path setup --------------------------------------------------------------
8
+
9
+ # If extensions (or modules to document with autodoc) are in another directory,
10
+ # add these directories to sys.path here. If the directory is relative to the
11
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
12
+
13
+ # -- Project information -----------------------------------------------------
14
+
15
+ project = "pylluminator"
16
+ copyright = "2025"
17
+ author = "MMG"
18
+
19
+ # -- General configuration ---------------------------------------------------
20
+
21
+ extensions = [
22
+ "sphinx.ext.duration",
23
+ "sphinx.ext.doctest",
24
+ "sphinx.ext.autodoc",
25
+ "sphinx.ext.autosummary",
26
+ "sphinx.ext.intersphinx",
27
+ "nbsphinx"
28
+ ]
29
+
30
+ intersphinx_mapping = {
31
+ "rtd": ("https://docs.readthedocs.com/platform/stable/", None),
32
+ "python": ("https://docs.python.org/3/", None),
33
+ "sphinx": ("https://www.sphinx-doc.org/en/master/", None),
34
+ "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
35
+ "pyranges": ("https://pyranges1.readthedocs.io/en/latest/", None),
36
+ "numpy": ("https://numpy.org/doc/stable/", None)
37
+ }
38
+ intersphinx_disabled_domains = ["std"]
39
+
40
+ templates_path = ["templates"]
41
+
42
+ autosummary_generate = True # Enable autosummary to generate pages
43
+ autodoc_default_flags = ['members'] # Automatically document class members
44
+
45
+ # -- Options for EPUB output
46
+ epub_show_urls = "footnote"
47
+
48
+ # List of patterns, relative to source directory, that match files and
49
+ # directories to ignore when looking for source files.
50
+ # This pattern also affects html_static_path and html_extra_path.
51
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
52
+
53
+ # -- Options for HTML output -------------------------------------------------
54
+
55
+ # The theme to use for HTML and HTML Help pages. See the documentation for
56
+ # a list of builtin themes.
57
+ #
58
+ html_theme = "sphinx_rtd_theme"
59
+
60
+ # Add any paths that contain custom static files (such as style sheets) here,
61
+ # relative to this directory. They are copied after the builtin static files,
62
+ # so a file named "default.css" will overwrite the builtin "default.css".
63
+ html_static_path = []
64
+
65
+ html_logo = " https://raw.githubusercontent.com/eliopato/pylluminator/refs/heads/main/docs/images/logo.png"
Binary file