-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from caraiz2001/dev-ratio
Coda workflow. Files that are unique to the coda workflow have been added to the corresponding folders (conf, modules, subworkflows...). Files that are present in the pipeline have been added as ***_coda to avoid overwriting the original ones (modules_coda.config, nextflow_coda.config, main_coda.nf... etc).
- Loading branch information
Showing
61 changed files
with
3,901 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"title": "nf-core/differentialabundance - params.tools schema", | ||
"description": "Schema for the file provided with params.tools", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"pathway_name": { | ||
"type": "string", | ||
"meta": ["pathway_name"] | ||
}, | ||
"diff_method": { | ||
"type": "string", | ||
"errorMessage": "choose propd, DESeq2 or none", | ||
"meta": ["diff_method"] | ||
}, | ||
"args_diff": { | ||
"type": "string", | ||
"meta": ["args_diff"] | ||
}, | ||
"enr_diff_method": { | ||
"type": "string", | ||
"meta": ["enr_diff_method"], | ||
"errorMessage": "choose grea, gsea or none" | ||
}, | ||
"args_enr_diff": { | ||
"type": "string", | ||
"meta": ["args_enr_diff"] | ||
}, | ||
"cor_method": { | ||
"type": "string", | ||
"meta": ["cor_method"], | ||
"errorMessage": "choose correlation,proportionality, partial correlation or none" | ||
}, | ||
"args_cor": { | ||
"type": "string", | ||
"meta": ["args_cor"] | ||
}, | ||
"enr_cor_method": { | ||
"type": "string", | ||
"meta": ["enr_cor_method"], | ||
"errorMessage": "choose grea or none" | ||
}, | ||
"args_enr_cor": { | ||
"type": "string", | ||
"meta": ["args_enr_cor"] | ||
}, | ||
"sel_method": { | ||
"type": "string", | ||
"meta": ["sel_method"], | ||
"errorMessage": "choose filtervar or none" | ||
}, | ||
"args_sel": { | ||
"type": "string", | ||
"meta": ["args_sel"] | ||
} | ||
}, | ||
"required": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
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, | ||
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, , , , ,, | ||
deseq2,deseq2,,gsea,,,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
params { | ||
config_profile_name = 'CRG profile' | ||
config_profile_description = 'Configuration to run on CRG cluster' | ||
|
||
max_cpus = 64 | ||
max_memory = 100.GB | ||
max_time = 48.h | ||
} | ||
|
||
|
||
process { | ||
executor = 'crg' | ||
//maxRetries = params.max_retries | ||
//errorStrategy = params.err_start | ||
|
||
withLabel:process_low { | ||
queue = 'cn-el7,short-centos79' | ||
cpus = { check_max( 2 , 'cpus' ) } | ||
memory = { check_max( 12.GB * task.attempt, 'memory' ) } | ||
time = { check_max( 4.h * task.attempt, 'time' ) } | ||
} | ||
withLabel:process_medium{ | ||
queue = 'cn-el7,short-centos79' | ||
cpus = { check_max( 6 , 'cpus' ) } | ||
memory = { check_max( 36.GB * task.attempt, 'memory' ) } | ||
time = { check_max( 8.h * task.attempt, 'time' ) } | ||
} | ||
withLabel:process_high { | ||
queue = 'cn-el7,long-centos79' | ||
cpus = { check_max( 12 , 'cpus' ) } | ||
memory = { check_max( 56.GB * task.attempt, 'memory' ) } | ||
time = { check_max( 12.h * task.attempt, 'time' ) } | ||
|
||
} | ||
} | ||
|
||
|
||
singularity { | ||
enabled = true | ||
cacheDir = 'singularity_cache' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
process { | ||
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 } | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// include { PROPR_PROPR } from '../../../modules/nf-core/propr/propr/main' | ||
// 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 { 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") | ||
|
||
Sample_ch = Channel.fromPath("../YMC/samplesheet_RCvsOX.csv") | ||
.map{ it -> [[id: 'YMC'], it]} | ||
|
||
ch_samples_and_matrix = Sample_ch.combine(Counts_ch) | ||
|
||
// Convert the samplesheet.csv in a channel with the proper format | ||
ch_tools = Channel.fromSamplesheet('tools') | ||
|
||
|
||
// TO DO: This should be modified to run one path per default, not all | ||
if (params.pathway == "all") { | ||
ch_tools | ||
.set{ ch_tools_single } | ||
} else { | ||
ch_tools | ||
.filter{ | ||
it[0]["pathway_name"] == params.pathway // TO DO: change pathway to path also in the tools_samplesheet file | ||
} | ||
//.view() | ||
.set{ ch_tools_single } | ||
} | ||
ch_tools_single.view() | ||
|
||
workflow { | ||
EXPERIMENTAL(ch_samples_and_matrix, ch_tools_single) | ||
EXPERIMENTAL.out.output.view() | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
process FILTERVAR { | ||
tag "$meta.id" | ||
label 'process_single' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/r-propr:5.0.3': | ||
'quay.io/biocontainers/r-propr:5.0.3' }" | ||
|
||
input: | ||
tuple val(meta), path(count), path(adj_matrix) | ||
|
||
output: | ||
tuple val(meta), path("*.count_filtered.tsv"), emit: count | ||
path "*.R_sessionInfo.log", emit: session_info | ||
path "versions.yml", emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
template 'filtervar.R' | ||
} |
Oops, something went wrong.