sequana-lora 1.0.0__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 (32) hide show
  1. sequana_lora-1.0.0/LICENSE +29 -0
  2. sequana_lora-1.0.0/PKG-INFO +177 -0
  3. sequana_lora-1.0.0/README.rst +147 -0
  4. sequana_lora-1.0.0/pyproject.toml +72 -0
  5. sequana_lora-1.0.0/sequana_pipelines/lora/__init__.py +12 -0
  6. sequana_lora-1.0.0/sequana_pipelines/lora/config.yaml +485 -0
  7. sequana_lora-1.0.0/sequana_pipelines/lora/dag.png +0 -0
  8. sequana_lora-1.0.0/sequana_pipelines/lora/dag.svg +235 -0
  9. sequana_lora-1.0.0/sequana_pipelines/lora/info.py +1487 -0
  10. sequana_lora-1.0.0/sequana_pipelines/lora/lora.rules +109 -0
  11. sequana_lora-1.0.0/sequana_pipelines/lora/main.py +441 -0
  12. sequana_lora-1.0.0/sequana_pipelines/lora/multiqc_config.yaml +101 -0
  13. sequana_lora-1.0.0/sequana_pipelines/lora/requirements.json +32 -0
  14. sequana_lora-1.0.0/sequana_pipelines/lora/rules/assembler.smk +370 -0
  15. sequana_lora-1.0.0/sequana_pipelines/lora/rules/ccs.smk +143 -0
  16. sequana_lora-1.0.0/sequana_pipelines/lora/rules/common.smk +148 -0
  17. sequana_lora-1.0.0/sequana_pipelines/lora/rules/polish.smk +150 -0
  18. sequana_lora-1.0.0/sequana_pipelines/lora/rules/qc.smk +296 -0
  19. sequana_lora-1.0.0/sequana_pipelines/lora/schema.yaml +537 -0
  20. sequana_lora-1.0.0/sequana_pipelines/lora/src/__init__.py +0 -0
  21. sequana_lora-1.0.0/sequana_pipelines/lora/src/enums.py +43 -0
  22. sequana_lora-1.0.0/sequana_pipelines/lora/src/exceptions.py +2 -0
  23. sequana_lora-1.0.0/sequana_pipelines/lora/src/report.py +235 -0
  24. sequana_lora-1.0.0/sequana_pipelines/lora/src/templates/__init__.py +0 -0
  25. sequana_lora-1.0.0/sequana_pipelines/lora/src/templates/lora.css +7 -0
  26. sequana_lora-1.0.0/sequana_pipelines/lora/src/templates/lora.html +170 -0
  27. sequana_lora-1.0.0/sequana_pipelines/lora/src/templates/lora.js +33 -0
  28. sequana_lora-1.0.0/sequana_pipelines/lora/src/templates/summary.css +13 -0
  29. sequana_lora-1.0.0/sequana_pipelines/lora/src/templates/summary.html +98 -0
  30. sequana_lora-1.0.0/sequana_pipelines/lora/src/templates/summary.js +20 -0
  31. sequana_lora-1.0.0/sequana_pipelines/lora/src/utils.py +126 -0
  32. sequana_lora-1.0.0/sequana_pipelines/lora/tools.txt +15 -0
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2016-2019, Sequana Development Team
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,177 @@
1
+ Metadata-Version: 2.3
2
+ Name: sequana-lora
3
+ Version: 1.0.0
4
+ Summary: Run assembler (Canu, Flye, Hifiasm) on a set of long read files
5
+ License: BSD-3
6
+ Keywords: pacbio,nanopore,snakemake,sequana,assembly
7
+ Author: Sequana Team
8
+ Author-email: thomas.cokelaer@pasteur.fr
9
+ Requires-Python: >=3.9,<4.0
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: Intended Audience :: End Users/Desktop
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: BSD License
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
22
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
23
+ Requires-Dist: Jinja2 (>=3.1.2)
24
+ Requires-Dist: click (>=8.1.7)
25
+ Requires-Dist: click-completion (>=0.5.2)
26
+ Requires-Dist: pandas (>=2.0.0)
27
+ Requires-Dist: sequana-pipetools (>=1.2.0)
28
+ Description-Content-Type: text/x-rst
29
+
30
+ This is is the **lora** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ project
31
+
32
+ :Overview: Run assembler (Canu, flye, hifiasm) on a set of long read files
33
+ :Input: A set of BAM files from Pacbio sequencers, or FastQ files for Nanopore sequencers.
34
+ :Output: HTML reports with assemblies for each sample.
35
+ :Status: prod
36
+ :Citation: Cokelaer et al, (2017), ‘Sequana’: a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI doi:10.21105/joss.00352
37
+
38
+
39
+ Installation
40
+ ~~~~~~~~~~~~
41
+
42
+ Install Lora with pip command::
43
+
44
+ pip install sequana-lora
45
+
46
+ To update your installed version, type::
47
+
48
+ pip install sequana-lora --upgrade
49
+
50
+ Usage
51
+ ~~~~~
52
+
53
+ ::
54
+
55
+ sequana_lora --help
56
+ sequana_lora --input-directory DATAPATH --assembler flye
57
+
58
+ This creates a directory with the pipeline and configuration file. You will then need
59
+ to execute the pipeline::
60
+
61
+ cd lora
62
+ sh lora.sh # for a local run
63
+
64
+ This launch a snakemake pipeline. If you are familiar with snakemake, you can
65
+ retrieve the pipeline itself and its configuration files and then execute the pipeline yourself with specific parameters::
66
+
67
+ snakemake -s lora.rules --cores 4 --stats stats.txt
68
+
69
+ Or use `sequanix <https://sequana.readthedocs.io/en/master/sequanix.html>`_ interface.
70
+
71
+ Example 1 Pacbio subreads
72
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
73
+
74
+ ::
75
+
76
+ sequana_lora --input-directory . --pacbio
77
+ cd lora
78
+
79
+ **Do you need to build CCS ?**
80
+
81
+ Look at the config file and the CCS section. Check that the parameters are as expected.
82
+ If you wish to build so-called HiFi reads, set the min-passes to 10 and min-rq to 0.99.
83
+
84
+ **do you have a blast DB**
85
+
86
+ You may also edit the config file to set blast to true (you must handle the blast databases yourself)
87
+
88
+ **Do you need an annotation from your contigs?**
89
+
90
+ Set prokka to True (for bacterial annotation)
91
+
92
+ **Want to check the core genome?**
93
+
94
+ You may set busco to true to detect the core genome (you must provide a path to a valid lineage).
95
+
96
+
97
+ Requirements
98
+ ~~~~~~~~~~~~
99
+
100
+ This pipelines requires the following executable(s):
101
+
102
+ - canu
103
+ - hifiasm
104
+ - flye
105
+ - blastn
106
+ - busco
107
+ - bwa
108
+ - ccs
109
+ - circlator
110
+ - checkm
111
+ - medaka
112
+ - minimap2
113
+ - pbindex
114
+ - polypolish
115
+ - prokka
116
+ - samtools
117
+ - sequana
118
+
119
+
120
+ .. image:: https://raw.githubusercontent.com/sequana/lora/master/sequana_pipelines/lora/dag.png
121
+
122
+
123
+ Details
124
+ ~~~~~~~~~
125
+
126
+ This pipeline runs **lora** in parallel on the input fastq files (paired or not).
127
+ A brief sequana summary report is also produced.
128
+
129
+ In practice, you may start from BAM files generated by Pacbio sequencers or
130
+ Fastq files, or CCS files. CCS files can be built by the pipeline. Then, an
131
+ assembler is used to build the draft assemblies (Canu, hifiasm, etc). From the
132
+ draft, circularisation may be applied to generate circularised genome (useful
133
+ for bacterial genomes). Finally, each contig is blasted and quality checks are
134
+ performed using Busco, quast, etc.
135
+
136
+
137
+ Rules and configuration details
138
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
139
+
140
+ Here is the `latest documented configuration file <https://raw.githubusercontent.com/sequana/sequana_lora/master/sequana_pipelines/lora/config.yaml>`_
141
+ to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.
142
+
143
+ Changelog
144
+ ~~~~~~~~~
145
+
146
+ ========= ====================================================================
147
+ Version Description
148
+ ========= ====================================================================
149
+ 1.0.0 * uniformised extension with other pipelines. fix regression on
150
+ schema file
151
+ * update sequana container to v0.16.5
152
+ * add unicyler apptainer
153
+ * add checkm module to help users chosing correct marker and name.
154
+ * replaces --pacbio and --nanopore with --data-type. pacbio is now
155
+ decompose into 3 sub-categories: pacbio-raw, pacbio-hifi and pacbio-corr
156
+ * add bandage if assembly graph is available
157
+ * fixed hifiasm container to use newest version
158
+ * improved report html
159
+ * make genome-size compulsary
160
+ * add fastp as preprocessing tool
161
+ * remove presets in favor of click options
162
+ * CCS defaults to hifi. pacbio presets in config set to pacbio-hifi
163
+ * blast removes from default. users must set blast DB themselves.
164
+ * busco lineage downloaded from the web.
165
+ * CANU preset changes: pacbio-->pacbio-hifi
166
+ * CANU-correction preset changes: pacbio-->pacbio-hifi
167
+ * FLYE preset changes: pacbio-raw-->pacbio-hifi
168
+ 0.3.0 * Use click instead of argparse
169
+ * added multiqc / checkm / unicycler
170
+ 0.2.0 * add apptainers in most rules
171
+ * remove utils.smk to move rulegraph inside main pipeline
172
+ * rename lora.smk into lora.rules for consistency with other
173
+ pipelines
174
+ * add checkm in the pipeline and HTML report
175
+ 0.1.0 **First release.**
176
+ ========= ====================================================================
177
+
@@ -0,0 +1,147 @@
1
+ This is is the **lora** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ project
2
+
3
+ :Overview: Run assembler (Canu, flye, hifiasm) on a set of long read files
4
+ :Input: A set of BAM files from Pacbio sequencers, or FastQ files for Nanopore sequencers.
5
+ :Output: HTML reports with assemblies for each sample.
6
+ :Status: prod
7
+ :Citation: Cokelaer et al, (2017), ‘Sequana’: a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI doi:10.21105/joss.00352
8
+
9
+
10
+ Installation
11
+ ~~~~~~~~~~~~
12
+
13
+ Install Lora with pip command::
14
+
15
+ pip install sequana-lora
16
+
17
+ To update your installed version, type::
18
+
19
+ pip install sequana-lora --upgrade
20
+
21
+ Usage
22
+ ~~~~~
23
+
24
+ ::
25
+
26
+ sequana_lora --help
27
+ sequana_lora --input-directory DATAPATH --assembler flye
28
+
29
+ This creates a directory with the pipeline and configuration file. You will then need
30
+ to execute the pipeline::
31
+
32
+ cd lora
33
+ sh lora.sh # for a local run
34
+
35
+ This launch a snakemake pipeline. If you are familiar with snakemake, you can
36
+ retrieve the pipeline itself and its configuration files and then execute the pipeline yourself with specific parameters::
37
+
38
+ snakemake -s lora.rules --cores 4 --stats stats.txt
39
+
40
+ Or use `sequanix <https://sequana.readthedocs.io/en/master/sequanix.html>`_ interface.
41
+
42
+ Example 1 Pacbio subreads
43
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
+
45
+ ::
46
+
47
+ sequana_lora --input-directory . --pacbio
48
+ cd lora
49
+
50
+ **Do you need to build CCS ?**
51
+
52
+ Look at the config file and the CCS section. Check that the parameters are as expected.
53
+ If you wish to build so-called HiFi reads, set the min-passes to 10 and min-rq to 0.99.
54
+
55
+ **do you have a blast DB**
56
+
57
+ You may also edit the config file to set blast to true (you must handle the blast databases yourself)
58
+
59
+ **Do you need an annotation from your contigs?**
60
+
61
+ Set prokka to True (for bacterial annotation)
62
+
63
+ **Want to check the core genome?**
64
+
65
+ You may set busco to true to detect the core genome (you must provide a path to a valid lineage).
66
+
67
+
68
+ Requirements
69
+ ~~~~~~~~~~~~
70
+
71
+ This pipelines requires the following executable(s):
72
+
73
+ - canu
74
+ - hifiasm
75
+ - flye
76
+ - blastn
77
+ - busco
78
+ - bwa
79
+ - ccs
80
+ - circlator
81
+ - checkm
82
+ - medaka
83
+ - minimap2
84
+ - pbindex
85
+ - polypolish
86
+ - prokka
87
+ - samtools
88
+ - sequana
89
+
90
+
91
+ .. image:: https://raw.githubusercontent.com/sequana/lora/master/sequana_pipelines/lora/dag.png
92
+
93
+
94
+ Details
95
+ ~~~~~~~~~
96
+
97
+ This pipeline runs **lora** in parallel on the input fastq files (paired or not).
98
+ A brief sequana summary report is also produced.
99
+
100
+ In practice, you may start from BAM files generated by Pacbio sequencers or
101
+ Fastq files, or CCS files. CCS files can be built by the pipeline. Then, an
102
+ assembler is used to build the draft assemblies (Canu, hifiasm, etc). From the
103
+ draft, circularisation may be applied to generate circularised genome (useful
104
+ for bacterial genomes). Finally, each contig is blasted and quality checks are
105
+ performed using Busco, quast, etc.
106
+
107
+
108
+ Rules and configuration details
109
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
+
111
+ Here is the `latest documented configuration file <https://raw.githubusercontent.com/sequana/sequana_lora/master/sequana_pipelines/lora/config.yaml>`_
112
+ to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.
113
+
114
+ Changelog
115
+ ~~~~~~~~~
116
+
117
+ ========= ====================================================================
118
+ Version Description
119
+ ========= ====================================================================
120
+ 1.0.0 * uniformised extension with other pipelines. fix regression on
121
+ schema file
122
+ * update sequana container to v0.16.5
123
+ * add unicyler apptainer
124
+ * add checkm module to help users chosing correct marker and name.
125
+ * replaces --pacbio and --nanopore with --data-type. pacbio is now
126
+ decompose into 3 sub-categories: pacbio-raw, pacbio-hifi and pacbio-corr
127
+ * add bandage if assembly graph is available
128
+ * fixed hifiasm container to use newest version
129
+ * improved report html
130
+ * make genome-size compulsary
131
+ * add fastp as preprocessing tool
132
+ * remove presets in favor of click options
133
+ * CCS defaults to hifi. pacbio presets in config set to pacbio-hifi
134
+ * blast removes from default. users must set blast DB themselves.
135
+ * busco lineage downloaded from the web.
136
+ * CANU preset changes: pacbio-->pacbio-hifi
137
+ * CANU-correction preset changes: pacbio-->pacbio-hifi
138
+ * FLYE preset changes: pacbio-raw-->pacbio-hifi
139
+ 0.3.0 * Use click instead of argparse
140
+ * added multiqc / checkm / unicycler
141
+ 0.2.0 * add apptainers in most rules
142
+ * remove utils.smk to move rulegraph inside main pipeline
143
+ * rename lora.smk into lora.rules for consistency with other
144
+ pipelines
145
+ * add checkm in the pipeline and HTML report
146
+ 0.1.0 **First release.**
147
+ ========= ====================================================================
@@ -0,0 +1,72 @@
1
+ [build-system]
2
+ requires = ["poetry-core>=2.0"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [project]
6
+ name = "sequana-lora"
7
+ version = "1.0.0"
8
+ description = "Run assembler (Canu, Flye, Hifiasm) on a set of long read files"
9
+ authors =[{name="Sequana Team", email="thomas.cokelaer@pasteur.fr"}]
10
+ license = "BSD-3"
11
+ repository = "https://github.com/sequana/lora"
12
+ readme = "README.rst"
13
+ keywords = ["pacbio", "nanopore", "snakemake", "sequana", "assembly"]
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Intended Audience :: Education",
17
+ "Intended Audience :: End Users/Desktop",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Science/Research",
20
+ "License :: OSI Approved :: BSD License",
21
+ "Operating System :: POSIX :: Linux",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Topic :: Software Development :: Libraries :: Python Modules",
26
+ "Topic :: Scientific/Engineering :: Bio-Informatics",
27
+ "Topic :: Scientific/Engineering :: Information Analysis",
28
+ ]
29
+ requires-python = ">=3.9,<4.0"
30
+ dependencies = [
31
+ "sequana-pipetools >=1.2.0",
32
+ "pandas >= 2.0.0",
33
+ "Jinja2 >=3.1.2",
34
+ "click-completion >=0.5.2",
35
+ "click >=8.1.7"
36
+ ]
37
+
38
+ [tool.poetry]
39
+ packages = [
40
+ { include = "sequana_pipelines" }
41
+ ]
42
+
43
+ [project.scripts]
44
+ sequana_lora = "sequana_pipelines.lora.main:main"
45
+
46
+ [tool.poetry.group.dev.dependencies]
47
+ ruff = "^0.0.264"
48
+ pytest = "^7.0.1"
49
+ black = "^23.3.0"
50
+ ipython = "^8.0.1"
51
+ pytest-mock = "^3.7.0"
52
+ pytest-asyncio = "^0.18.1"
53
+ snakefmt = "^0.8.4"
54
+
55
+ [tool.ruff]
56
+ select = [
57
+ "E", # pycodestyle errors
58
+ "W", # pycodestyle warnings
59
+ "F", # pyflakes
60
+ "I", # isort
61
+ "C", # flake8-comprehensions
62
+ "B", # flake8-bugbear
63
+ ]
64
+ ignore = [
65
+ "E501", # line too long, handled by black
66
+ "B008", # do not perform function calls in argument defaults
67
+ "C901", # too complex
68
+ ]
69
+ line-length = 120
70
+
71
+ [tool.pytest.ini_options]
72
+ asyncio_mode = "strict"
@@ -0,0 +1,12 @@
1
+ import importlib.metadata as metadata
2
+
3
+
4
+ def get_package_version(package_name):
5
+ try:
6
+ version = metadata.version(package_name)
7
+ return version
8
+ except metadata.PackageNotFoundError:
9
+ return f"{package_name} not found"
10
+
11
+
12
+ version = get_package_version("sequana-lora")