Skip to content

Commit c63e7b8

Browse files
authored
Merge branch 'dev' into bcalm
2 parents 9bf6786 + 8853ed6 commit c63e7b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1586
-96
lines changed

changelog.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,42 @@
22

33
## Changes in upcoming release (`dev` branch)
44

5+
### New features
6+
7+
- Added new `recipe` system to flowcraft along with 6 starting recipes.
8+
Recipes are pre-made and curated pipelines that address specific questions.
9+
To create a recipe, the `-r <recipe_name>` can be used. To list available
10+
recipes, the `--recipe-list` and `--recipe-list-short` options were added.
11+
12+
### Components changes
13+
14+
- Added new `disableRR` param in the `spades` component that disables repeat
15+
resolution
16+
- The `abyss` and `spades` components emit GFA in a secondary channel.
17+
- The new `bandage` component can accept either FASTA from a primary channel
18+
or GFA from a secondary channel.
19+
20+
### New components
21+
22+
- Added component `abyss`.
23+
- Added component `bandage`.
24+
- Added component `unicycler`.
25+
- Added component `prokka`.
526
- Added component `bcalm`.
627

28+
### Minor/Other changes
29+
30+
- Added removal of duplicate IDs from `reads_download` component input.
31+
- Added seed parameter to `downsample_fastq` component.
32+
- Added bacmet database to `abricate` component.
33+
- Added default docker option to avoid docker permission errors.
34+
- Changed the default URL generated by inspect and report commands.
35+
36+
### Bug fixes
37+
38+
- Fixed forks with same source process name.
39+
- Fixed `inspect` issue when tasks took more than a day in duration.
40+
741
## 1.3.1
842

943
### Features
@@ -18,6 +52,7 @@ which is particularly useful in very large workflows.
1852
`mapping_patlas`.
1953

2054
### New components
55+
2156
- Added component `fast_ani`.
2257

2358
### Minor/Other changes

docs/dev/create_recipe.rst

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
Recipe creation guidelines
2+
===========================
3+
4+
Recipes are pre-made pipeline strings that may be associated with specific
5+
parameters and directives and are used to rapidly build a certain type of
6+
pipeline.
7+
8+
Instead of building a pipeline like::
9+
10+
-t "integrity_coverage fastqc_trimmomatic fastqc spades pilon"
11+
12+
The user simply can specific a recipe with that pipeline::
13+
14+
-r assembly
15+
16+
Recipe creation
17+
---------------
18+
19+
The creation of new recipes is a very simple and straightforward process.
20+
You need to create a new file in the ``flowcraft/generator/recipes`` folder
21+
with any name and create a basic class with three attributes::
22+
23+
try:
24+
from generator.recipe import Recipe
25+
except ImportError:
26+
from flowcraft.generator.recipe import Recipe
27+
28+
29+
class Innuca(Recipe):
30+
31+
def __init__(self):
32+
super().__init__()
33+
34+
# Recipe name
35+
self.name = "innuca"
36+
37+
# Recipe pipeline
38+
self.pipeline_str = <pipeline string>
39+
40+
# Recipe parameters and directives
41+
self.directives = { <directives> }
42+
43+
And that's it! Now there is a new recipe available with the ``innuca`` name and
44+
we can build this pipeline using the option ``-r innuca``.
45+
46+
Name
47+
^^^^
48+
49+
This is the name of the recipe, which is used to make a match with the recipe
50+
name provided by the user via the ``-r`` option.
51+
52+
Pipeline_str
53+
^^^^^^^^^^^^
54+
55+
The pipeline string as if provided via the ``-t`` option.
56+
57+
Directives
58+
^^^^^^^^^^
59+
60+
A dictionary containing the parameters and directives for each process in the
61+
pipeline string. **Setting this attribute is optional and components
62+
that are not specified here will assume their default values**. In general, each
63+
element in this dictionary should have the following format::
64+
65+
self.directives = {
66+
"component_name": {
67+
"params": {
68+
"paramA": "value"
69+
},
70+
"directives": {
71+
"directiveA": "value"
72+
}
73+
}
74+
}
75+
76+
This will set the provided parameters and directives to the component, but it is
77+
possible to provide only one.
78+
79+
A more concrete example of a real component and directives follows::
80+
81+
self.pipeline_str = "integrity_coverage fastqc"
82+
83+
# Set parameters and directives only for integrity_coverage
84+
# and leave fastqc with the defaults
85+
self.directives = {
86+
"integrity_coverage": {
87+
"params": {
88+
"minCoverage": 20
89+
},
90+
"directives": {
91+
"memory": "1GB"
92+
}
93+
}
94+
}
95+
96+
Duplicate components
97+
~~~~~~~~~~~~~~~~~~~~
98+
99+
In some cases, the same component may be present multiple times in the pipeline
100+
string of a recipe. In these cases, directives can be assigned to each individual
101+
component by adding a ``#<id>`` suffix to the component::
102+
103+
self.pipeline_str = "integrity_coverage ( trimmomatic spades#1 | spades#2)"
104+
105+
self.directives = {
106+
"spades#1": {
107+
"directives": {
108+
"memory": "10GB"
109+
}
110+
},
111+
"spades#2": {
112+
"directives": {
113+
"version": "3.7.0"
114+
}
115+
}
116+
}

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ A NextFlow pipeline assembler for genomics.
4444
dev/general_orientation
4545
dev/create_process
4646
dev/create_template
47+
dev/create_recipe
4748
dev/containers
4849
dev/process_dotfiles
4950
dev/pipeline_reporting
138 KB
Loading
Loading

docs/user/basic_usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ Local visualization
393393
:::::::::::::::::::
394394

395395
The FlowCraft report JSON file can also be visualized locally by drag and dropping
396-
it into the FlowCraft web application page, currently hosted at http://192.92.149.169/reports
396+
it into the FlowCraft web application page, currently hosted at http://www.flowcraft.live/reports
397397

398398
Offline visualization
399399
:::::::::::::::::::::

docs/user/components/downsample_fastq.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Parameters
2323
- ``genomeSize``: Genome size estimate for the samples. It is used to
2424
estimate the coverage.
2525
- ``depth``: The target depth to which the reads should be subsampled.
26+
- ``seed``: The seed number for seqtk. By default it is 100.
2627

2728
Published results
2829
-----------------

docs/user/components/mash_screen.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
mash_screen
2-
==============
2+
===========
33

44
Purpose
55
-------
66

77
This component performes mash screen to find plasmids
8-
contained in high throughoput sequencing data, using as inputs read files
8+
contained in high throughout sequencing data, using as inputs read files
99
(FastQ files). Then, the resulting file can
1010
be imported into `pATLAS <http://www.patlas.site/>`_.
1111
This component searches for containment of a given sequence in read sequencing

docs/user/components/prokka.rst

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,54 @@
11
prokka
22
======
33

4-
**Building...**
4+
5+
Purpose
6+
-------
7+
8+
This component performs annotations using the annotations available in
9+
`prokka <https://github.com/tseemann/prokka>`_.
10+
11+
12+
Input/Output type
13+
-----------------
14+
15+
- Input type: ``fasta``
16+
- Output type: ``None``
17+
18+
.. note::
19+
- Although the component doesn't have an output channel it writes the results into the ``publishDir``.
20+
21+
22+
Parameters
23+
----------
24+
25+
- ``centre``: sets the center to which the sequencing center id.
26+
Default: 'UMMI'.
27+
28+
- ``kingdom``: Selects the annotation mode between Archaea, Bacteria,
29+
Mitochondria, Viruses. Default: Bacteria).
30+
31+
- ``genus``: Allows user to select a genus name. Default: 'Genus' (same
32+
as prokka). This also adds the use of the --usegenus flag to prokka.
33+
34+
35+
Published results
36+
-----------------
37+
38+
- ``results/annotation/prokka_<pid>/<sample_id>``: All the outputs from prokka
39+
will be available in these directories.
40+
41+
42+
Published reports
43+
-----------------
44+
45+
None.
46+
47+
48+
Default directives
49+
------------------
50+
51+
- ``prokka``:
52+
- ``cpus``: 2
53+
- ``container``: ummidock/prokka
54+
- ``version``: 1.12

docs/user/pipeline_reports.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Pipeline reports
99
.. include:: reports/fastqc.rst
1010
.. include:: reports/fastqc_trimmomatic.rst
1111
.. include:: reports/integrity_coverage.rst
12+
.. include:: reports/mash_dist.rst
1213
.. include:: reports/mlst.rst
1314
.. include:: reports/patho_typing.rst
1415
.. include:: reports/pilon.rst
@@ -18,6 +19,7 @@ Pipeline reports
1819
.. include:: reports/process_spades.rst
1920
.. include:: reports/process_viral_assembly.rst
2021
.. include:: reports/seq_typing.rst
22+
.. include:: reports/sistr.rst
2123
.. include:: reports/trimmomatic.rst
2224
.. include:: reports/true_coverage.rst
2325

0 commit comments

Comments
 (0)