- 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
46 lines
1.1 KiB
Plaintext
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)
|
|
"""
|
|
}
|