Configure corto for WES k8s execution
- Update main.nf: hardcode Harbor container image, add workflow block, use PVC mount path defaults, remove stageInMode copy and legacy params - Update nextflow.config: add k8s profile with container, add process resource limits, update manifest to point to Gitea - Update params.json: use s3:// prefixed paths for WES, remove container_corto, containerOptions, and project_name params
This commit is contained in:
28
main.nf
28
main.nf
@@ -1,19 +1,21 @@
|
|||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
nextflow.enable.dsl=2
|
nextflow.enable.dsl=2
|
||||||
|
|
||||||
|
// Parameters
|
||||||
|
params.TPM = '/omic/eureka/corto/20002_1289_female_patient_0_TPM.csv'
|
||||||
|
params.regulon = '/omic/eureka/corto/regulon.rda'
|
||||||
|
params.outdir = '/omic/eureka/corto/output'
|
||||||
|
|
||||||
process CORTO {
|
process CORTO {
|
||||||
container "${params.container_corto}"
|
container 'harbor.cluster.omic.ai/omic/digital-patients/corto:latest'
|
||||||
containerOptions "${params.containerOptions}"
|
publishDir params.outdir, mode: 'copy'
|
||||||
publishDir "${params.outdir}/${params.project_name}", mode: 'copy'
|
|
||||||
debug true
|
debug true
|
||||||
// maxForks 1
|
|
||||||
stageInMode 'copy'
|
|
||||||
|
|
||||||
input:
|
input:
|
||||||
path TPM
|
path TPM
|
||||||
path regulon
|
path regulon
|
||||||
// path TPM_ref
|
|
||||||
|
|
||||||
// Define output channels
|
|
||||||
output:
|
output:
|
||||||
path "*_metabolome.csv", emit: csv_metabol
|
path "*_metabolome.csv", emit: csv_metabol
|
||||||
|
|
||||||
@@ -24,21 +26,17 @@ process CORTO {
|
|||||||
library(data.table)
|
library(data.table)
|
||||||
|
|
||||||
TPM <- as.matrix(fread("$TPM"),rownames=1)
|
TPM <- as.matrix(fread("$TPM"),rownames=1)
|
||||||
#TPM_ref <- as.matrix(fread("TPM_ref"),rownames=1) #dollar sign is missing
|
|
||||||
|
|
||||||
#try normalization; dont use
|
|
||||||
#TPM <- scale(TPM)
|
|
||||||
#TPM_log2 = log2(TPM + 1)
|
|
||||||
|
|
||||||
load("$regulon")
|
load("$regulon")
|
||||||
|
|
||||||
predicted<-mra(TPM, regulon=regulon)
|
predicted<-mra(TPM, regulon=regulon)
|
||||||
|
|
||||||
#use this if we want to compare patients and reference TPM, data formet output is not csv -> work on data saving if needed
|
|
||||||
#predicted<-mra(TPM, path TPM_ref, regulon=regulon)
|
|
||||||
|
|
||||||
name = strsplit(strsplit("$TPM", split = "/")[[1]][length(strsplit("$TPM", split = "/")[[1]])], split = "_TPM.csv")[[1]][1]
|
name = strsplit(strsplit("$TPM", split = "/")[[1]][length(strsplit("$TPM", split = "/")[[1]])], split = "_TPM.csv")[[1]][1]
|
||||||
name = paste(name, "_metabolome.csv", sep="")
|
name = paste(name, "_metabolome.csv", sep="")
|
||||||
write.csv(predicted, name)
|
write.csv(predicted, name)
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workflow {
|
||||||
|
CORTO(Channel.of(file(params.TPM)), Channel.of(file(params.regulon)))
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,15 +1,34 @@
|
|||||||
manifest {
|
manifest {
|
||||||
name = 'corto'
|
name = 'corto'
|
||||||
author = 'omic'
|
author = 'omic'
|
||||||
recurseSubmodules = true
|
homePage = 'https://trs-gitea.cluster.omic.ai/omic/corto'
|
||||||
homePage = 'https://gitlab.com/omic/next/registry/tools/corto'
|
description = 'CORTO - Correlation Tool for gene regulatory network analysis'
|
||||||
description = ''
|
mainScript = 'main.nf'
|
||||||
mainScript = 'main.nf'
|
version = '1.0.0'
|
||||||
nextflowVersion = '!>=21.04.3'
|
defaultBranch = 'master'
|
||||||
defaultBranch = 'master'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
docker {
|
params {
|
||||||
enabled = true
|
TPM = null
|
||||||
temp = 'auto'
|
regulon = null
|
||||||
|
outdir = null
|
||||||
|
}
|
||||||
|
|
||||||
|
profiles {
|
||||||
|
standard {
|
||||||
|
docker {
|
||||||
|
enabled = true
|
||||||
|
temp = 'auto'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k8s {
|
||||||
|
process {
|
||||||
|
container = 'harbor.cluster.omic.ai/omic/digital-patients/corto:latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
cpus = 1
|
||||||
|
memory = '4 GB'
|
||||||
}
|
}
|
||||||
|
|||||||
64
params.json
64
params.json
@@ -3,13 +3,12 @@
|
|||||||
"TPM": {
|
"TPM": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"description": "Path to TPM (Transcripts Per Million) CSV file",
|
"description": "Path to TPM (Transcripts Per Million) CSV file",
|
||||||
"default": "/data/olamide/corto/corto_metabolite_prediction/20002_1289_female_patient_0_TPM.csv",
|
"default": "s3://omic/eureka/corto/20002_1289_female_patient_0_TPM.csv",
|
||||||
"required": true,
|
"required": true,
|
||||||
"pipeline_io": "input",
|
"pipeline_io": "input",
|
||||||
"var_name": "params.TPM",
|
"var_name": "params.TPM",
|
||||||
"examples": [
|
"examples": [
|
||||||
"/data/olamide/corto/corto_metabolite_prediction/20002_1289_female_patient_0_TPM.csv",
|
"s3://omic/eureka/corto/20002_1289_female_patient_0_TPM.csv"
|
||||||
"/path/to/your/sample_TPM.csv"
|
|
||||||
],
|
],
|
||||||
"pattern": ".*\\.csv$",
|
"pattern": ".*\\.csv$",
|
||||||
"enum": [],
|
"enum": [],
|
||||||
@@ -19,13 +18,12 @@
|
|||||||
"regulon": {
|
"regulon": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"description": "Path to regulon RDA file",
|
"description": "Path to regulon RDA file",
|
||||||
"default": "/data/olamide/corto/corto_metabolite_prediction/regulon.rda",
|
"default": "s3://omic/eureka/corto/regulon.rda",
|
||||||
"required": true,
|
"required": true,
|
||||||
"pipeline_io": "input",
|
"pipeline_io": "input",
|
||||||
"var_name": "params.regulon",
|
"var_name": "params.regulon",
|
||||||
"examples": [
|
"examples": [
|
||||||
"/data/olamide/corto/corto_metabolite_prediction/regulon.rda",
|
"s3://omic/eureka/corto/regulon.rda"
|
||||||
"/path/to/your/custom_regulon.rda"
|
|
||||||
],
|
],
|
||||||
"pattern": ".*\\.rda$",
|
"pattern": ".*\\.rda$",
|
||||||
"enum": [],
|
"enum": [],
|
||||||
@@ -35,67 +33,17 @@
|
|||||||
"outdir": {
|
"outdir": {
|
||||||
"type": "folder",
|
"type": "folder",
|
||||||
"description": "Directory for CORTO analysis results",
|
"description": "Directory for CORTO analysis results",
|
||||||
"default": "/mnt/OmicNAS/private/old/gabe/corto/outputs",
|
"default": "s3://omic/eureka/corto/output",
|
||||||
"required": true,
|
"required": true,
|
||||||
"pipeline_io": "output",
|
"pipeline_io": "output",
|
||||||
"var_name": "params.outdir",
|
"var_name": "params.outdir",
|
||||||
"examples": [
|
"examples": [
|
||||||
"/mnt/OmicNAS/private/old/gabe/corto/outputs",
|
"s3://omic/eureka/corto/output"
|
||||||
"/path/to/custom/output"
|
|
||||||
],
|
],
|
||||||
"pattern": ".*",
|
"pattern": ".*",
|
||||||
"enum": [],
|
"enum": [],
|
||||||
"validation": {},
|
"validation": {},
|
||||||
"notes": "Directory where metabolome prediction results will be stored"
|
"notes": "Directory where metabolome prediction results will be stored"
|
||||||
},
|
|
||||||
"project_name": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Project name for output directory organization",
|
|
||||||
"default": "test",
|
|
||||||
"required": false,
|
|
||||||
"pipeline_io": "parameter",
|
|
||||||
"var_name": "params.project_name",
|
|
||||||
"examples": [
|
|
||||||
"test",
|
|
||||||
"patient_analysis",
|
|
||||||
"metabolite_prediction_run1"
|
|
||||||
],
|
|
||||||
"pattern": "^[A-Za-z0-9_-]+$",
|
|
||||||
"enum": [],
|
|
||||||
"validation": {},
|
|
||||||
"notes": "Name used to create a subdirectory within the output directory"
|
|
||||||
},
|
|
||||||
"container_corto": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Docker container for CORTO",
|
|
||||||
"default": "corto:latest",
|
|
||||||
"required": false,
|
|
||||||
"pipeline_io": "parameter",
|
|
||||||
"var_name": "params.container_corto",
|
|
||||||
"examples": [
|
|
||||||
"corto:latest",
|
|
||||||
"yourregistry/corto:v1.0"
|
|
||||||
],
|
|
||||||
"pattern": ".*",
|
|
||||||
"enum": [],
|
|
||||||
"validation": {},
|
|
||||||
"notes": "Docker container image to use for the CORTO analysis"
|
|
||||||
},
|
|
||||||
"containerOptions": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Docker container options",
|
|
||||||
"default": "--gpus all --rm -v /mnt:/mnt",
|
|
||||||
"required": false,
|
|
||||||
"pipeline_io": "parameter",
|
|
||||||
"var_name": "params.containerOptions",
|
|
||||||
"examples": [
|
|
||||||
"--gpus all --rm -v /mnt:/mnt",
|
|
||||||
"--rm -v /custom/path:/mnt"
|
|
||||||
],
|
|
||||||
"pattern": ".*",
|
|
||||||
"enum": [],
|
|
||||||
"validation": {},
|
|
||||||
"notes": "Options to pass to the Docker container runtime"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user