Files
digital-patients/main_corto.nf
Olamide Isreal 88627edc25 Configure pipeline for WES execution on k8s cluster
- Add main.nf as WES entry point with PVC-based paths
- Update nextflow.config with k8s/k8s_gpu profiles (eureka-pvc)
- Update params.json defaults to /omic/eureka/digital-patients/ paths
- Remove stageInMode 'copy' from corto and vcf2prot for k8s compat
- Add reassemble.nf for one-time chunk reassembly on PVC
2026-03-26 17:58:28 +01:00

46 lines
1.1 KiB
Plaintext

nextflow.enable.dsl=2
process CORTO {
memory 1.GB
container "${params.container_corto}"
containerOptions "${params.containerOptions}"
publishDir "${params.outdir}/${params.project_name}", mode: 'copy'
// debug true
// maxForks 1
input:
path TPM
path regulon
// path TPM_ref
// Define output channels
output:
path "*_metabolome.csv", emit: csv_metabol
script:
"""
#!/usr/bin/Rscript
library(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)
"""
}