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
|
||||
|
||||
// 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 {
|
||||
container "${params.container_corto}"
|
||||
containerOptions "${params.containerOptions}"
|
||||
publishDir "${params.outdir}/${params.project_name}", mode: 'copy'
|
||||
container 'harbor.cluster.omic.ai/omic/digital-patients/corto:latest'
|
||||
publishDir params.outdir, mode: 'copy'
|
||||
debug true
|
||||
// maxForks 1
|
||||
stageInMode 'copy'
|
||||
|
||||
input:
|
||||
path TPM
|
||||
path regulon
|
||||
// path TPM_ref
|
||||
|
||||
// Define output channels
|
||||
output:
|
||||
path "*_metabolome.csv", emit: csv_metabol
|
||||
|
||||
@@ -24,21 +26,17 @@ process CORTO {
|
||||
library(data.table)
|
||||
|
||||
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")
|
||||
|
||||
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 = paste(name, "_metabolome.csv", sep="")
|
||||
write.csv(predicted, name)
|
||||
"""
|
||||
}
|
||||
|
||||
workflow {
|
||||
CORTO(Channel.of(file(params.TPM)), Channel.of(file(params.regulon)))
|
||||
}
|
||||
|
||||
@@ -1,15 +1,34 @@
|
||||
manifest {
|
||||
name = 'corto'
|
||||
author = 'omic'
|
||||
recurseSubmodules = true
|
||||
homePage = 'https://gitlab.com/omic/next/registry/tools/corto'
|
||||
description = ''
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=21.04.3'
|
||||
defaultBranch = 'master'
|
||||
name = 'corto'
|
||||
author = 'omic'
|
||||
homePage = 'https://trs-gitea.cluster.omic.ai/omic/corto'
|
||||
description = 'CORTO - Correlation Tool for gene regulatory network analysis'
|
||||
mainScript = 'main.nf'
|
||||
version = '1.0.0'
|
||||
defaultBranch = 'master'
|
||||
}
|
||||
|
||||
docker {
|
||||
enabled = true
|
||||
temp = 'auto'
|
||||
params {
|
||||
TPM = null
|
||||
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": {
|
||||
"type": "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,
|
||||
"pipeline_io": "input",
|
||||
"var_name": "params.TPM",
|
||||
"examples": [
|
||||
"/data/olamide/corto/corto_metabolite_prediction/20002_1289_female_patient_0_TPM.csv",
|
||||
"/path/to/your/sample_TPM.csv"
|
||||
"s3://omic/eureka/corto/20002_1289_female_patient_0_TPM.csv"
|
||||
],
|
||||
"pattern": ".*\\.csv$",
|
||||
"enum": [],
|
||||
@@ -19,13 +18,12 @@
|
||||
"regulon": {
|
||||
"type": "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,
|
||||
"pipeline_io": "input",
|
||||
"var_name": "params.regulon",
|
||||
"examples": [
|
||||
"/data/olamide/corto/corto_metabolite_prediction/regulon.rda",
|
||||
"/path/to/your/custom_regulon.rda"
|
||||
"s3://omic/eureka/corto/regulon.rda"
|
||||
],
|
||||
"pattern": ".*\\.rda$",
|
||||
"enum": [],
|
||||
@@ -35,67 +33,17 @@
|
||||
"outdir": {
|
||||
"type": "folder",
|
||||
"description": "Directory for CORTO analysis results",
|
||||
"default": "/mnt/OmicNAS/private/old/gabe/corto/outputs",
|
||||
"default": "s3://omic/eureka/corto/output",
|
||||
"required": true,
|
||||
"pipeline_io": "output",
|
||||
"var_name": "params.outdir",
|
||||
"examples": [
|
||||
"/mnt/OmicNAS/private/old/gabe/corto/outputs",
|
||||
"/path/to/custom/output"
|
||||
"s3://omic/eureka/corto/output"
|
||||
],
|
||||
"pattern": ".*",
|
||||
"enum": [],
|
||||
"validation": {},
|
||||
"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