Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
/.nextflow
/work
.nextflow.log*
*.img
inference_mudata.h5mu
per_element_output.tsv
per_guide_output.tsv
nf-*-reports.tsv
/pipeline_outputs
/pipeline_dashboard
/results
pipeline-service-key.json
debug_dashboard.ipynb
.vscode/
GCP_user_notebook.ipynb
.params_2026-01-29_13-02-48.json
.params_2026-02-03_23-14-20.json
.params_2026-02-03_23-14-49.json
GCP_user_notebook.ipynb
*.pyc
__pycache__/
.nextflow*
work/
data/
results/
.DS_Store
sample_metadata
testing/
testing*
*.pyc
null/
.lineage/
nf-core-perturbseq.code-workspace
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nextflow.telemetry.enabled": true
}
144 changes: 102 additions & 42 deletions assets/email_template.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,113 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="description" content="nf-core/perturbseq: A nf-core template based adaptation of https://github.com/pinellolab/CRISPR_Pipeline">
<title>nf-core/perturbseq Pipeline Report</title>
</head>
<body>
<div style="font-family: Helvetica, Arial, sans-serif; padding: 30px; max-width: 800px; margin: 0 auto;">
<meta
name="description"
content="nf-core/perturbseq: A nf-core template based adaptation of https://github.com/pinellolab/CRISPR_Pipeline"
/>
<title>nf-core/perturbseq Pipeline Report</title>
</head>
<body>
<div style="font-family: Helvetica, Arial, sans-serif; padding: 30px; max-width: 800px; margin: 0 auto">
<img src="cid:nfcorepipelinelogo" />

<img src="cid:nfcorepipelinelogo">
<h1>nf-core/perturbseq ${version}</h1>
<h2>Run Name: $runName</h2>

<h1>nf-core/perturbseq ${version}</h1>
<h2>Run Name: $runName</h2>

<% if (!success){
out << """
<div style="color: #a94442; background-color: #f2dede; border-color: #ebccd1; padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px;">
<h4 style="margin-top:0; color: inherit;">nf-core/perturbseq execution completed unsuccessfully!</h4>
<% if (!success){ out << """
<div
style="
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
"
>
<h4 style="margin-top: 0; color: inherit">nf-core/perturbseq execution completed unsuccessfully!</h4>
<p>The exit status of the task that caused the workflow execution to fail was: <code>$exitStatus</code>.</p>
<p>The full error message was:</p>
<pre style="white-space: pre-wrap; overflow: visible; margin-bottom: 0;">${errorReport}</pre>
</div>
"""
} else {
out << """
<div style="color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px;">
<pre style="white-space: pre-wrap; overflow: visible; margin-bottom: 0">${errorReport}</pre>
</div>
""" } else { out << """
<div
style="
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
"
>
nf-core/perturbseq execution completed successfully!
</div>
"""
}
%>
</div>
""" } %>

<p>The workflow was completed at <strong>$dateComplete</strong> (duration: <strong>$duration</strong>)</p>
<p>The command used to launch the workflow was as follows:</p>
<pre style="white-space: pre-wrap; overflow: visible; background-color: #ededed; padding: 15px; border-radius: 4px; margin-bottom:30px;">$commandLine</pre>
<p>The workflow was completed at <strong>$dateComplete</strong> (duration: <strong>$duration</strong>)</p>
<p>The command used to launch the workflow was as follows:</p>
<pre
style="
white-space: pre-wrap;
overflow: visible;
background-color: #ededed;
padding: 15px;
border-radius: 4px;
margin-bottom: 30px;
"
>
$commandLine</pre
>

<h3>Pipeline Configuration:</h3>
<table style="width:100%; max-width:100%; border-spacing: 0; border-collapse: collapse; border:0; margin-bottom: 30px;">
<tbody style="border-bottom: 1px solid #ddd;">
<% out << summary.collect{ k,v -> "<tr><th style='text-align:left; padding: 8px 0; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd;'>$k</th><td style='text-align:left; padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd;'><pre style='white-space: pre-wrap; overflow: visible;'>$v</pre></td></tr>" }.join("\n") %>
</tbody>
</table>
<h3>Pipeline Configuration:</h3>
<table
style="
width: 100%;
max-width: 100%;
border-spacing: 0;
border-collapse: collapse;
border: 0;
margin-bottom: 30px;
"
>
<tbody style="border-bottom: 1px solid #ddd">
<% out << summary.collect{ k,v -> "
<tr>
<th
style="
text-align: left;
padding: 8px 0;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #ddd;
"
>
$k
</th>
<td
style="
text-align: left;
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #ddd;
"
>
<pre style="white-space: pre-wrap; overflow: visible">$v</pre>
</td>
</tr>
" }.join("\n") %>
</tbody>
</table>

<p>nf-core/perturbseq</p>
<p><a href="https://github.com/nf-core/perturbseq">https://github.com/nf-core/perturbseq</a></p>

</div>

</body>
<p>nf-core/perturbseq</p>
<p><a href="https://github.com/nf-core/perturbseq">https://github.com/nf-core/perturbseq</a></p>
</div>
</body>
</html>
3 changes: 0 additions & 3 deletions assets/samplesheet.csv

This file was deleted.

4 changes: 2 additions & 2 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
"meta": ["measurement_sets"]
},
"sequencing_run": {
"type": "string",
"type": ["string", "integer"],
"meta": ["sequencing_run"]
},
"lane": {
"type": "string",
"type": ["string", "integer"],
"meta": ["lane"]
},
"flowcell_id": {
Expand Down
79 changes: 62 additions & 17 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ include { PERTURBSEQ } from './workflows/perturbseq'
include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_perturbseq_pipeline'
include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_perturbseq_pipeline'
include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_perturbseq_pipeline'
include { PREPAREREFERENCERESOURCES } from './subworkflows/local/preparereferenceresources'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GENOME PARAMETER VALUES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

// TODO nf-core: Remove this line if you don't need a FASTA file
// This is an example of how to use getGenomeAttribute() to fetch parameters
// from igenomes.config using `--genome`
params.fasta = getGenomeAttribute('fasta')
params.reference_fasta = params.reference_fasta ?: getGenomeAttribute('fasta')
params.reference_gtf = params.reference_gtf ?: getGenomeAttribute('gtf')

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -44,6 +43,10 @@ workflow NFCORE_PERTURBSEQ {

take:
samplesheet // channel: samplesheet read in from --input
transcriptome_index
transcriptome_t2g
reference_gtf
reference_versions

main:

Expand All @@ -52,6 +55,10 @@ workflow NFCORE_PERTURBSEQ {
//
PERTURBSEQ (
samplesheet,
transcriptome_index,
transcriptome_t2g,
reference_gtf,
reference_versions,
params.multiqc_config,
params.multiqc_logo,
params.multiqc_methods_description,
Expand All @@ -78,29 +85,67 @@ workflow {
params.monochrome_logs,
args,
params.outdir,
params.input,
params.help,
params.help_full,
params.show_hidden
)

def ch_input = file(params.input, checkIfExists: true)
def ch_samplesheet = channel
.fromPath(ch_input)
.splitCsv(header: true)
.map { row ->
def meta = [
id: "sample_${row.file_modality}_${row.measurement_sets}",
measurement_sets: row.measurement_sets,
modality: (row.file_modality ?: '').toLowerCase(),
seqspec: row.seqspec,
barcode_onlist: row.barcode_onlist,
guide_design: row.guide_design,
barcode_hashtag_map: row.barcode_hashtag_map,
]
def reads = [file(row.R1_path, checkIfExists: true)]
if (row.R2_path) {
reads += file(row.R2_path, checkIfExists: true)
}
[meta, reads]
}

def ch_rna_workflow = channel.value('standard')
def ch_reference_fasta = params.reference_fasta
? channel.value(file(params.reference_fasta, checkIfExists: true))
: channel.empty()
def ch_reference_gtf = params.reference_gtf
? channel.value(file(params.reference_gtf, checkIfExists: true))
: channel.empty()

def ReferenceResources = PREPAREREFERENCERESOURCES(
ch_reference_fasta,
ch_reference_gtf,
ch_rna_workflow
)

//
// WORKFLOW: Run main workflow
//
NFCORE_PERTURBSEQ (
PIPELINE_INITIALISATION.out.samplesheet
)
//
// SUBWORKFLOW: Run completion tasks
//
PIPELINE_COMPLETION (
params.email,
params.email_on_fail,
params.plaintext_email,
params.outdir,
params.monochrome_logs,
NFCORE_PERTURBSEQ.out.multiqc_report
ch_samplesheet,
ReferenceResources.out.transcriptome_index,
ReferenceResources.out.transcriptome_t2g,
ReferenceResources.out.reference_gtf,
ReferenceResources.out.versions
)
// //
// // SUBWORKFLOW: Run completion tasks
// //
// PIPELINE_COMPLETION (
// params.email,
// params.email_on_fail,
// params.plaintext_email,
// params.outdir,
// params.monochrome_logs,
// NFCORE_PERTURBSEQ.out.multiqc_report
// )
}

/*
Expand Down
Loading