- 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
43 lines
971 B
Plaintext
Executable File
43 lines
971 B
Plaintext
Executable File
#!/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 'harbor.cluster.omic.ai/omic/digital-patients/corto:latest'
|
|
publishDir params.outdir, mode: 'copy'
|
|
debug true
|
|
|
|
input:
|
|
path TPM
|
|
path regulon
|
|
|
|
output:
|
|
path "*_metabolome.csv", emit: csv_metabol
|
|
|
|
script:
|
|
"""
|
|
#!/usr/bin/Rscript
|
|
library(corto)
|
|
library(data.table)
|
|
|
|
TPM <- as.matrix(fread("$TPM"),rownames=1)
|
|
|
|
load("$regulon")
|
|
|
|
predicted<-mra(TPM, 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)))
|
|
}
|