Skip to content

Commit 4cd65a1

Browse files
authored
Merge pull request #2 from cokelaer/main
Fix on path to input files and update requirements
2 parents fb6d17a + de43b7c commit 4cd65a1

File tree

8 files changed

+45
-25
lines changed

8 files changed

+45
-25
lines changed

.github/workflows/apptainer.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99
pull_request:
1010
branches-ignore: []
1111
schedule:
12-
- cron: '0 0 * * SUN'
12+
- cron: '0 0 15 * *'
1313

1414
jobs:
1515
build-linux:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
max-parallel: 5
1919
matrix:
20-
python: [3.7, 3.8, 3.9]
20+
python: [ 3.8, 3.9, '3.10']
2121
fail-fast: false
2222

2323

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99
pull_request:
1010
branches-ignore: []
1111
schedule:
12-
- cron: '0 0 * * SUN'
12+
- cron: '0 0 15 * *'
1313

1414
jobs:
1515
build-linux:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
max-parallel: 5
1919
matrix:
20-
python: [3.7, 3.8, 3.9]
20+
python: [3.8, 3.9, '3.10']
2121
fail-fast: false
2222

2323

README.rst

+23-7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
.. image:: https://github.com/sequana/nanomerge/actions/workflows/main.yml/badge.svg
1010
:target: https://github.com/sequana/nanomerge/actions/workflows
1111

12+
.. image:: https://coveralls.io/repos/github/sequana/nanomerge/badge.svg?branch=main
13+
  :target: https://coveralls.io/github/sequana/nanomerge?branch=main
14+
15+
16+
.. image:: http://joss.theoj.org/papers/10.21105/joss.00352/status.svg
17+
:target: http://joss.theoj.org/papers/10.21105/joss.00352
18+
:alt: JOSS (journal of open source software) DOI
19+
20+
.. image:: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C3.10-blue.svg
21+
:target: https://pypi.python.org/pypi/sequana
22+
:alt: Python 3.8 | 3.9 | 3.10
23+
1224

1325

1426

@@ -28,9 +40,11 @@ You can install the packages using pip::
2840

2941
pip install sequana_nanomerge --upgrade
3042

31-
An optional requirements is pycoQC, which can be install with conda/mamba using e.g.:
43+
An optional requirements is pycoQC, which can be install with conda/mamba using e.g.::
44+
45+
conda install pycoQC
3246

33-
conda install pycoQC.
47+
you will also need graphviz installed.
3448

3549
Usage
3650
~~~~~
@@ -49,9 +63,9 @@ otherwise all fastq files are in DATAPATH/::
4963
sequana_nanomerge --input-directory DATAPATH --samplesheet samplesheet.csv
5064
--summary summary.txt --input-pattern '*fastq.gz'
5165

52-
The --summary is optional and takes as input the output of albacore demultiplexing. usually a file called sequencing_summary.txt
66+
The --summary is optional and takes as input the output of albacore/guppy demultiplexing. usually a file called sequencing_summary.txt
5367

54-
Note that the different between the two is the extra `*/` before the `*.fastq.gz` pattern since barcoded files are in individual subdirectories..
68+
Note that the different between the two is the extra `*/` before the `*.fastq.gz` pattern since barcoded files are in individual subdirectories.
5569

5670
In both bases, the command creates a directory with the pipeline and configuration file. You will then need to execute the pipeline::
5771

@@ -65,19 +79,19 @@ retrieve the pipeline itself and its configuration files and then execute the pi
6579

6680
Or use `sequanix <https://sequana.readthedocs.io/en/master/sequanix.html>`_ interface.
6781

68-
COncerning the sample sheet, whther your data is barcoded or not, it should be a CSV file ::
82+
Concerning the sample sheet, whether your data is barcoded or not, it should be a CSV file ::
6983

7084
barcode,project,sample
7185
barcode01,main,A
7286
barcode02,main,B
7387
barcode03,main,C
7488

75-
For a non-barcoded run, you must provide a file where the barcode column can be set (empty) or just removed::
89+
For a non-barcoded run, you must provide a file where the barcode column can be set (empty)::
7690

7791
barcode,project,sample
7892
,main,A
7993

80-
or::
94+
or just removed::
8195

8296
project,sample
8397
main,A
@@ -109,6 +123,7 @@ Requirements
109123
This pipelines requires the following executable(s), which is optional:
110124

111125
- pycoQC
126+
- dot
112127

113128
.. image:: https://raw.githubusercontent.com/sequana/nanomerge/main/sequana_pipelines/nanomerge/dag.png
114129

@@ -132,6 +147,7 @@ Changelog
132147
========= ====================================================================
133148
Version Description
134149
========= ====================================================================
150+
1.0.1 Fix the pyco file paths, update requirements and doc
135151
1.0.0 Stable release ready for production
136152
0.0.1 **First release.**
137153
========= ====================================================================

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
sequana_pipetools>=0.8.1
2+
sequana

sequana_pipelines/nanomerge/config.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
# ============================================================================
99

1010
# Keep input_readtag empty for nanopore
11-
#input_directory: '/home/cokelaer/TEMP/fastq_pass/barcode21'
12-
input_directory: '/home/cokelaer/TEMP/fastq_pass/'
11+
input_directory:
1312
input_readtag:
1413
input_pattern: '*/*.fastq.gz'
15-
summary: /home/cokelaer/TEMP/fastq_pass/sequencing_summary_AOI637_ef78de7c_aef0cc4b.txt
16-
#samplesheet: "samplesheet1.csv"
14+
summary:
1715
samplesheet: "samplesheet.csv"
1816

1917
################################################################################

sequana_pipelines/nanomerge/nanomerge.rules

+13-9
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,15 @@ else:
7373

7474

7575
if config["summary"]:
76-
qc_file = "pyco/pyco.html"
76+
qc_file = ["pyco/pyco.html"]
7777
else:
78-
qc_file = ""
78+
qc_file = []
7979

8080
# ========================================================================= pipeline starts here
81-
expected_fastqs = expand("./{project}/{sample}.fastq.gz", zip, project=samples.df['project'], sample=samples.df['sample']),
81+
expected_fastqs = expand("./{project}/{sample}.fastq.gz", zip, project=samples.df['project'],
82+
sample=samples.df['sample'])
83+
84+
8285
rule pipeline:
8386
input:
8487
expected_fastqs,
@@ -100,22 +103,22 @@ if config["summary"]:
100103
input:
101104
config['summary']
102105
output:
103-
temp(qc_file)
106+
"pyco/pyco.html"
104107
log:
105-
temp(qc_file)
108+
"pyco/pyco.log"
106109
container:
107110
config["apptainers"]["pycoqc"]
108111
shell:
109112
"""
110113
pycoQC --summary_file {input} -o {output} > {log} 2>&1
111114
"""
112115

116+
113117
rule merge:
114118
input:
115119
get_input_merge
116120
output:
117121
"./{project}/{sample}.fastq.gz"
118-
119122
shell:
120123
"""
121124
cat {input} > {output}
@@ -134,7 +137,7 @@ rule rulegraph:
134137

135138
rule html_report:
136139
input:
137-
list(expected_fastqs) + [qc_file]
140+
list(expected_fastqs) + qc_file
138141
output:
139142
"summary.html"
140143
run:
@@ -144,11 +147,11 @@ rule html_report:
144147
data = {"name": "nanomerge",
145148
"rulegraph": ".sequana/rulegraph.svg",
146149
"pipeline_version": nanomerge.version}
147-
manager.teardown(extra_files_to_remove=["pyco/pyco.log", qc_file])
150+
manager.teardown(extra_files_to_remove=["pyco/pyco.log", "pyco/pyco.html"])
148151

149152
dirs = ",".join([f'<a href="{x}/">{x}</a>' for x in samples.get_projects()])
150153
if config['summary']:
151-
with open(qc_file, "r") as fout:
154+
with open("pyco/pyco.html", "r") as fout:
152155
pycodata = fout.read()
153156
pycodata = '<div class="columns">' + pycodata.split('<div class="columns">')[-1].replace("</div>\n</body>\n</html>","")
154157

@@ -163,6 +166,7 @@ onsuccess:
163166

164167
print("Once done, please clean up the directory using\n'make clean'")
165168
shell("chmod -R g+w .")
169+
shell("rm -rf pyco rulegraph")
166170

167171
onerror:
168172
from sequana_pipetools.errors import PipeError
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pycoQC
2+
dot

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
_MAJOR = 1
1313
_MINOR = 0
14-
_MICRO = 0
14+
_MICRO = 1
1515
version = f"{_MAJOR}.{_MINOR}.{_MICRO}"
1616
release = f"{_MAJOR}.{_MINOR}"
1717

0 commit comments

Comments
 (0)