Skip to content

Commit

Permalink
small fixes to allow main_coda.nf to run
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlang committed Jul 26, 2024
1 parent bf70167 commit e3fde5b
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 12 deletions.
7 changes: 4 additions & 3 deletions assets/tools_samplesheet.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pathway_name,diff_method,args_diff,enr_diff_method,args_enr_diff,cor_method,args_cor,enr_cor_method,args_enr_cor,sel_method,args_sel
diff_prop,propd, --adjacency true --permutation 100 --fixseed true, , ,,, , ,,
filtered_pcor,propd, --adjacency true --permutation 100 --fixseed true, , ,propr, --permutation 10 --adjacency true --cutoff_min 0.005 --cutoff_max 0.5 --cutoff_interval 0.01 --metric pcor.bshrink, , , filtervar,
diff_prop,propd,--group_col fase --adjacency true --cutoff_min 0.05 --cutoff_max 0.95 --cutoff_interval 0.05 --permutation 100 --fixseed true, , ,,, , ,,
diff_prop_noperm,propd,--group_col fase --adjacency true --cutoff_min 0.05 --cutoff_max 0.95 --cutoff_interval 0.05 --permutation 0 --fixseed true, , ,,, , ,,
filtered_pcor,propd,--group_col fase --adjacency true --cutoff_min 0.05 --cutoff_max 0.95 --cutoff_interval 0.05 --permutation 100 --fixseed true, , ,propr, --permutation 10 --adjacency true --cutoff_min 0.005 --cutoff_max 0.5 --cutoff_interval 0.01 --metric pcor.bshrink, , , filtervar,
prop,, , , ,propr, --cutoff_min 0.05 --cutoff_max 0.95 --cutoff_interval 0.05 --fixseed true --metric rho --permutation 100 --adjacency true, , , ,
diff_grea,propd,--group_col fase --adjacency true --permutation 10,grea, --permutation 10, , , , ,,
diff_grea,propd,--group_col fase --adjacency true --cutoff_min 0.05 --cutoff_max 0.95 --cutoff_interval 0.05 --permutation 10 --fixseed true,grea, --permutation 10, , , , ,,
deseq2,deseq2,,gsea,,,,,,,
50 changes: 50 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,54 @@ process {
enabled: false
]
}

withName: "PROPR"{
ext.args = { "${meta.args_cor}" == "null" ? '' : "${meta.args_cor}" }
publishDir = [
path: { "${params.outdir}/correlation_analysis/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: "PROPD"{
ext.args = { "${meta.args_diff}" == "null" ? '' : "${meta.args_diff}" }
publishDir = [
path: { "${params.outdir}/differential_analysis/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: "FILTERVAR"{
ext.args = { "${meta.args_cor}" == "null" ? '' : "${meta.args_cor}" }
publishDir = [
path: { "${params.outdir}/variable_selection/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: "GREA_DIFF"{
ext.args = { "${meta.args_enr_diff}" == "null" ? '' : "${meta.args_enr_diff}" }
publishDir = [
path: { "${params.outdir}/enrichment_differential/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: "GREA_COR"{
ext.args = { "${meta.args_enr_cor}" == "null" ? '' : "${meta.args_enr_cor}" }
publishDir = [
path: { "${params.outdir}/enrichment_correlation/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: "MYGENE" {
ext.args = { [
"--columname ${params.features_id_col}",
].join(' ').trim() }
}
}
6 changes: 3 additions & 3 deletions main_coda.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// include { PROPR_PROPD } from '../../../modules/nf-core/propr/propd/main'
// include { PROPR_GREA } from '../../../modules/nf-core/propr/grea/main'
// include { MYGENE } from '../../../modules/nf-core/mygene/main'
include { EXPERIMENTAL } from './subworkflows/experimental/main.nf'
include { EXPERIMENTAL } from './subworkflows/local/experimental/main.nf'
include { fromSamplesheet } from 'plugin/nf-validation'


// These are local files from my Bachelor Thesis project, I am creating the ch_samples_and_matrix
// manually for testing but it should be be provided by the processing section of nf-core/differentialabundance
Counts_ch = Channel.fromPath("../YMC/counts_sin0.csv")
Counts_ch = Channel.fromPath(params.matrix)

Sample_ch = Channel.fromPath("../YMC/samplesheet_RCvsOX.csv")
Sample_ch = Channel.fromPath(params.input)
.map{ it -> [[id: 'YMC'], it]}

ch_samples_and_matrix = Sample_ch.combine(Counts_ch)
Expand Down
10 changes: 10 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@
"default": "counts",
"description": "Type of abundance measure used, platform-dependent",
"fa_icon": "fas fa-keyboard"
},
"tools": {
"type": "string",
"format": "file-path",
"exists": true,
"mimetype": "text/csv",
"schema": "assets/schema_tools.json",
"pattern": "^\\S+\\.(csv|tsv|yaml)$",
"description": "Path to comma-separated file containing samplesheet",
"help_text": "This file defines possible combinations of tools, which are to be run by the pipeline"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/correlation/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// include nf-core modules
include {PROPR_PROPR as PROPR} from "../../modules/nf-core/propr/propr/main.nf"
include {PROPR_PROPR as PROPR} from "../../../modules/nf-core/propr/propr/main.nf"


workflow CORRELATION {
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/differential/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// include modules
include {PROPR_PROPD as PROPD} from "../../modules/nf-core/propr/propd/main.nf"
include {PROPR_PROPD as PROPD} from "../../../modules/nf-core/propr/propd/main.nf"


workflow DIFFERENTIAL {
Expand Down
6 changes: 3 additions & 3 deletions subworkflows/local/enrichment/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include modules

include { PROPR_GREA as GREA_DIFF } from "../../modules/nf-core/propr/grea/main.nf"
include { PROPR_GREA as GREA_COR } from "../../modules/nf-core/propr/grea/main.nf"
include { MYGENE } from "../../modules/nf-core/mygene/main.nf"
include { PROPR_GREA as GREA_DIFF } from "../../../modules/nf-core/propr/grea/main.nf"
include { PROPR_GREA as GREA_COR } from "../../../modules/nf-core/propr/grea/main.nf"
include { MYGENE } from "../../../modules/nf-core/mygene/main.nf"


workflow ENRICHMENT {
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/variable_selection/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// include modules
include { FILTERVAR } from "../../modules/local/filtervar/main.nf"
include { FILTERVAR } from "../../../modules/local/filtervar/main.nf"

workflow VARIABLE_SELECTION {
take:
Expand Down

0 comments on commit e3fde5b

Please sign in to comment.