Skip to content

Commit

Permalink
new: added nextflow workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Stracquadanio committed Feb 23, 2024
1 parent b2a60f4 commit ab03bcf
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ logs/
.DS_Store
*.pyc
.vscode
.nextflow*
14 changes: 12 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
include { Hello } from './modules/hello'
include { MAKE_TRANSFORMATION_PROTOCOL; MAKE_SPOTTING_PROTOCOL } from './modules/protocol_compiler'

workflow {
channel.fromPath("${params.inputFile}") | Hello

MAKE_TRANSFORMATION_PROTOCOL(
tuple(file("$params.transformation_config"), file("$params.transformation_data")),
file("$params.protocol_template_dir")
)

MAKE_SPOTTING_PROTOCOL(
tuple(file("$params.spotting_config"), file("$params.spotting_data")),
file("$params.protocol_template_dir")
)

}
32 changes: 24 additions & 8 deletions modules/protocol_compiler/main.nf
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
process MAKE_TRANSFORMATION_PROTOCOL {

publishDir "${params.resultsDir}", pattern: "results.txt", mode: 'copy'
publishDir "${params.resultsDir}", pattern: "transformation_protocol.py", mode: 'copy'

input:
path data
tuple path(config), path(csv)
path(template_dir)

output:
path 'results.txt'
path 'transformation_protocol.py'

script:
"""
cat ${data} > results.txt
protocol-compiler.py -d ${template_dir} -o transformation_protocol.py \
transformation-template.py ${config} ${csv}
"""

stub:
"""
touch transformation_protocol.py
"""

}

process MAKE_SPOTTING_PROTOCOL {

publishDir "${params.resultsDir}", pattern: "results.txt", mode: 'copy'
publishDir "${params.resultsDir}", pattern: "spotting_protocol.py", mode: 'copy'

input:
path data
tuple path(config), path(csv)
path(template_dir)

output:
path 'results.txt'
path 'spotting_protocol.py'

script:
"""
protocol-compiler.py -d ${template_dir} -o spotting_protocol.py \
spotting-template.py ${config} ${csv}
"""

stub:
"""
cat ${data} > results.txt
touch spotting_protocol.py
"""

}
3 changes: 3 additions & 0 deletions modules/protocol_compiler/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
opentrons
jinja2
docopt
16 changes: 14 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@
includeConfig 'conf/base.config'
includeConfig 'conf/modules.config'


/*
====================================================================
| WORKFLOW INPUT PARAMETERS
====================================================================
*/
params {
inputFile = "./testdata/mydata.txt"
/* */
protocol_template_dir = "${baseDir}/assets/protocols"

/* */
transformation_config = "${baseDir}/assets/testdata/transformation-parameters.json"
transformation_data = "${baseDir}/assets/testdata/transformation-data.csv"

/* */
spotting_config = "${baseDir}/assets/testdata/spotting-parameters.json"
spotting_data = "${baseDir}/assets/testdata/spotting-data.csv"

/* */
resultsDir = "./results/"
}

process.container = 'ghcr.io/stracquadaniolab/opentrons:latest'
78 changes: 39 additions & 39 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,52 @@ End-to-end eznyme screening platform for argB.
## Configuration

**Experiment parameters**
- transformations_n: number of transformations to be spotted (default: 24)
- dna_volume: volume of DNA in µL (default: 2)
- cc_volume: volume of competent cells in µL (default: 20)
- soc_volume: volume of SOC media in µL (default: 178)
- competent_cells_well: name of the well containing competent cells (defualt: "H12")
- init_temp: thermocycler inital temperature before heat-shock transformation (default: 4)
- init_time: thermocycler inital time before heat-shock transformation (default: 20)
- heat_temp: thermocycler heat temperature during heat-shock transformation (default: 42)
- heat_time: thermocycler heat temperature during heat-shock transformation (default: 1)
- cool_temp: thermocycler cooling temperature after heat-shock transformation (default: 4)
- cool_time: thermocycler cooling temperature after heat-shock transformation (default: 2)
- inc_temp: thermocycler incubation temperature after heat-shock transformation (default: 37)
- inc_time: thermocycler incubation temperature agter heat-shock transformation (default: 60)
- spot_volume: spot volume for agar plate in µL (default: 5)
- `transformations_n`: number of transformations to be spotted (default: 24)
- `dna_volume`: volume of DNA in µL (default: 2)
- `cc_volume`: volume of competent cells in µL (default: 20)
- `soc_volume`: volume of SOC media in µL (default: 178)
- `competent_cells_well`: name of the well containing competent cells (defualt: "H12")
- `init_temp`: thermocycler inital temperature before heat-shock transformation (default: 4)
- `init_time`: thermocycler inital time before heat-shock transformation (default: 20)
- `heat_temp`: thermocycler heat temperature during heat-shock transformation (default: 42)
- `heat_time`: thermocycler heat temperature during heat-shock transformation (default: 1)
- `cool_temp`: thermocycler cooling temperature after heat-shock transformation (default: 4)
- `cool_time`: thermocycler cooling temperature after heat-shock transformation (default: 2)
- `inc_temp`: thermocycler incubation temperature after heat-shock transformation (default: 37)
- `inc_time`: thermocycler incubation temperature agter heat-shock transformation (default: 60)
- `spot_volume`: spot volume for agar plate in µL (default: 5)

**Hardware and labware names and location**
- dna_plate_loadname: name of the plate containing DNA to be transformed (default: "armadillo_96_wellplate_200ul_pcr_full_skirt")
- dna_plate_slot: 2
- reservoir_loadname: name of the reservoir containing SOC media and competent cells
- reservoir_slot: 3
- transformation_plate_loadname: name of the plate where transformation occurs (default: "armadillo_96_wellplate_200ul_pcr_full_skirt")
- agar_plate_loadname: name of the agar plate (default: "nunc_singlewell_plate_90ml_4x6_grid")
- agar_def_json: name of the json file with the custom agar plate definition (default: "nunc_singlewell_plate_90ml_4x6_grid")
- agar_max_wells_n: maximum number of wells on the agar plate (default: 24)
- agar_slot: location of the agar plates given as a list (default: [1])
- p20_tiprack_loadname: name of the p20 tiprack (default: "opentrons_96_tiprack_20ul")
- p20_tiprack_slot: location of the p20 tiprack (Default: 6)
- p20_name: name of the p20 pipette (default: "p20_single_gen2")
- p20_mount: location of the p20 pipette mount (default: "right")
- p300_tiprack_loadname: name of the p300 tiprack (default: "opentrons_96_tiprack_300ul")
- p300_tiprack_slot: location of the p300 tiprack (Default: 9)
- p300_name: name of the p300 pipette (default: "p300_multi_gen2")
- p300_mount: location of the p300 pipette mount (default: "left")
- `dna_plate_loadname`: name of the plate containing DNA to be transformed (default: "armadillo_96_wellplate_200ul_pcr_full_skirt")
- `dna_plate_slot`: 2
- `reservoir_loadname`: name of the reservoir containing SOC media and competent cells
- `reservoir_slot`: 3
- `transformation_plate_loadname`: name of the plate where transformation occurs (default: "armadillo_96_wellplate_200ul_pcr_full_skirt")
- `agar_plate_loadname`: name of the agar plate (default: "nunc_singlewell_plate_90ml_4x6_grid")
- `agar_def_json`: name of the json file with the custom agar plate definition (default: "nunc_singlewell_plate_90ml_4x6_grid")
- `agar_max_wells_n`: maximum number of wells on the agar plate (default: 24)
- `agar_slot`: location of the agar plates given as a list (default: [1])
- `p20_tiprack_loadname`: name of the p20 tiprack (default: "opentrons_96_tiprack_20ul")
- `p20_tiprack_slot`: location of the p20 tiprack (Default: 6)
- `p20_name`: name of the p20 pipette (default: "p20_single_gen2")
- `p20_mount`: location of the p20 pipette mount (default: "right")
- `p300_tiprack_loadname`: name of the p300 tiprack (default: "opentrons_96_tiprack_300ul")
- `p300_tiprack_slot`: location of the p300 tiprack (Default: 9)
- `p300_name`: name of the p300 pipette (default: "p300_multi_gen2")
- `p300_mount`: location of the p300 pipette mount (default: "left")


**Liquid handling settings**
- dispense_rate: dispense rate of the pipette while spotting in µL/sec (default: 60)
- aspirate_rate: spirate rate of the pipette while spotting in µL/sec (default: 60)
- dispense_height: height at which the piepette dispenses above the bottom of the plate in mm (default: 10.2)
- `dispense_rate`: dispense rate of the pipette while spotting in µL/sec (default: 60)
- `aspirate_rate`: spirate rate of the pipette while spotting in µL/sec (default: 60)
- `dispense_height`: height at which the piepette dispenses above the bottom of the plate in mm (default: 10.2)

**Optional**
- test_dispense_height: test for the dispense height above the agar plate (default: true)
- test_dispense_height:
- agar_incubation: agar plate incubation in place on the temperature module (default: false)
- temp_mod_slot: (default: 4)
- agar_incubation_temp: set the incubation temperature for the temperature module in celsius (default: 37)
- `test_dispense_height`: test for the dispense height above the agar plate (default: true)
- `test_dispense_height`:
- `agar_incubation`: agar plate incubation in place on the temperature module (default: false)
- `temp_mod_slot`: (default: 4)
- `agar_incubation_temp`: set the incubation temperature for the temperature module in celsius (default: 37)


### Opentrons OT2 deck
Expand Down

0 comments on commit ab03bcf

Please sign in to comment.