Skip to content

Commit

Permalink
Fix more style problems
Browse files Browse the repository at this point in the history
  • Loading branch information
nictru committed Mar 18, 2024
1 parent 964fbd7 commit fd19ac3
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 40 deletions.
8 changes: 4 additions & 4 deletions modules/local/combine_tables/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ process COMBINE_TABLES {
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-2076f4a3fb468a04063c9e6b7747a630abb457f6:fccb0c41a243c639e11dd1be7b74f563e624fcca-0':
'biocontainers/mulled-v2-2076f4a3fb468a04063c9e6b7747a630abb457f6:fccb0c41a243c639e11dd1be7b74f563e624fcca-0' }"

input:
tuple val(meta), path(files)
val(method)

output:
tuple val(meta), path("${prefix}.${extension}"), emit: combined
path "versions.yml" , emit: versions

script:
prefix = task.ext.prefix ?: "${meta.id}"
extension = task.ext.extension ?: "tsv"
Expand All @@ -28,4 +28,4 @@ process COMBINE_TABLES {
numpy: \$(python -c "import numpy; print(numpy.__version__)")
END_VERSIONS
"""
}
}
2 changes: 1 addition & 1 deletion modules/local/counts/calculate_tpm.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ process CALCULATE_TPM {
numpy: \$(python -c "import numpy; print(numpy.__version__)")
END_VERSIONS
"""
}
}
2 changes: 1 addition & 1 deletion modules/local/counts/combine.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ process COMBINE_COUNTS {
pandas: \$(python -c "import pandas; print(pandas.__version__)")
END_VERSIONS
"""
}
}
2 changes: 1 addition & 1 deletion modules/local/counts/filter_genes.nf
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ process FILTER_GENES {
pandas: \$(python -c "import pandas; print(pandas.__version__)")
END_VERSIONS
"""
}
}
2 changes: 1 addition & 1 deletion modules/local/counts/prepare_design.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ process PREPARE_DESIGN {
pandas: \$(python -c "import pandas; print(pandas.__version__)")
END_VERSIONS
"""
}
}
6 changes: 3 additions & 3 deletions modules/local/dynamite/dynamite.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ process DYNAMITE {
val(ifolds)
val(alpha)
val(randomize)

output:
tuple val(meta), path("${meta.id}_dynamite/Regression_Coefficients_Entire_Data_Set_classification.txt")

script:
"""
DYNAMITE.R \\
Expand All @@ -29,4 +29,4 @@ process DYNAMITE {
--randomise=$randomize \\
--cores=$task.cpus
"""
}
}
2 changes: 1 addition & 1 deletion modules/local/dynamite/preprocess.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ process PREPROCESS {
pandas: \$(python -c "import pandas; print(pandas.__version__)")
END_VERSIONS
"""
}
}
2 changes: 1 addition & 1 deletion modules/local/gtftools/length/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ process GTFTOOLS_LENGTH {

stub:
def args = task.ext.args ?: ''

// TODO nf-core: A stub section should mimic the execution of the original module as best as possible
// Have a look at the following examples:
// Simple example: https://github.com/nf-core/modules/blob/818474a292b4860ae8ff88e149fbcda68814114d/modules/nf-core/bcftools/annotate/main.nf#L47-L63
Expand Down
2 changes: 1 addition & 1 deletion modules/local/ranking/combine_rankings.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ process COMBINE_RANKINGS {
numpy: \$(python -c "import numpy; print(numpy.__version__)")
END_VERSIONS
"""
}
}
2 changes: 1 addition & 1 deletion modules/local/ranking/ranking.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ process RANKING {
numpy: \$(python -c "import numpy; print(numpy.__version__)")
END_VERSIONS
"""
}
}
10 changes: 5 additions & 5 deletions modules/local/ranking/tf_tg_score.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ process TF_TG_SCORE {
script:
"""
tf_tg_score.py \\
--differential ${differential} \\
--affinities ${affinities} \\
--regression_coefficients ${regression_coefficients} \\
--output ${meta.id}.score.tsv
--differential ${differential} \\
--affinities ${affinities} \\
--regression_coefficients ${regression_coefficients} \\
--output ${meta.id}.score.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
pandas: \$(python -c "import pandas; print(pandas.__version__)")
END_VERSIONS
"""
}
}
4 changes: 2 additions & 2 deletions modules/local/stare/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process STARE {

conda "bioconda::stare-abc"
container "biocontainers/stare-abc:1.0.4--haf6292c_1"

input:
tuple val(meta), path(candidate_regions)
path(fasta)
Expand All @@ -28,4 +28,4 @@ process STARE {
STARE: \$( STARE.sh --version )
END_VERSIONS
"""
}
}
2 changes: 1 addition & 1 deletion subworkflows/local/counts.nf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ workflow COUNTS {

DESEQ2_DIFFERENTIAL(
Channel.value(["condition"]).combine(contrasts)
.map{ variable, reference, target ->
.map{ variable, reference, target ->
[[id: reference + ":" + target,
contrast: reference + ":" + target,
condition1: reference,
Expand Down
7 changes: 3 additions & 4 deletions subworkflows/local/dynamite.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ workflow DYNAMITE {

ch_versions = Channel.empty()

ch_combined = ch_differential.map{ meta, differential ->
ch_combined = ch_differential.map{ meta, differential ->
[meta.condition1, meta.condition2, meta, differential]}
.combine(ch_affinity_ratio.map{ meta, affinity_ratio ->
.combine(ch_affinity_ratio.map{ meta, affinity_ratio ->
[meta.condition1, meta.condition2, meta, affinity_ratio]}, by: [0,1])
.map{ condition1, condition2, meta_differential, differential, meta_affinity, affinity_ratio ->
[meta_affinity, differential, affinity_ratio]}

PREPROCESS(ch_combined)

RUN_DYNAMITE(PREPROCESS.out.output, ofolds, ifolds, alpha, randomize)
Expand All @@ -39,4 +39,3 @@ workflow DYNAMITE {

versions = ch_versions // channel: [ versions.yml ]
}

9 changes: 4 additions & 5 deletions subworkflows/local/footprinting.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ workflow FOOTPRINTING {

ch_versions = Channel.empty()

ch_footprint_split = ch_peaks.branch{
meta, peaks ->
ch_footprint_split = ch_peaks.branch{
meta, peaks ->
footprinting: meta.footprinting
as_is: !meta.footprinting
}

BEDTOOLS_MERGE( ch_footprint_split.footprinting )

ch_include_original_split = BEDTOOLS_MERGE.out.bed
.branch{
meta, bed ->
.branch{
meta, bed ->
include: meta.include_original
subtract: !meta.include_original
}
Expand All @@ -43,4 +43,3 @@ workflow FOOTPRINTING {

versions = ch_versions // channel: [ versions.yml ]
}

6 changes: 3 additions & 3 deletions subworkflows/local/peaks.nf
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ workflow PEAKS {
.map { meta, affinities -> [meta.condition, meta.assay, affinities] }
.groupTuple(by: [0, 1])
.map { condition, assay, affinities -> [[id: condition + "_" + assay,
condition: condition,
assay: assay], affinities] },
condition: condition,
assay: assay], affinities] },
"mean"
)

Expand All @@ -95,7 +95,7 @@ workflow PEAKS {
condition1: condition1, condition2: condition2,
assay: assay1],
[affinities1, affinities2]] }

AFFINITY_RATIO(ch_contrast_affinities, "ratio")
AFFINITY_SUM(ch_contrast_affinities, "sum")

Expand Down
7 changes: 3 additions & 4 deletions subworkflows/local/ranking.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workflow RANKING {

ch_versions = Channel.empty()

ch_combined = ch_differential.map{meta, differential ->
ch_combined = ch_differential.map{meta, differential ->
[meta.condition1, meta.condition2, differential]}
.combine(ch_affinities.map{meta, affinities ->
[meta.condition1, meta.condition2, meta.assay, affinities]}, by: [0, 1])
Expand All @@ -33,8 +33,8 @@ workflow RANKING {
)

ch_versions = ch_versions.mix(TF_TG_SCORE.out.versions,
CREATE_RANKING.out.versions,
COMBINE_RANKINGS.out.versions
CREATE_RANKING.out.versions,
COMBINE_RANKINGS.out.versions
)


Expand All @@ -45,4 +45,3 @@ workflow RANKING {

versions = ch_versions // channel: [ versions.yml ]
}

2 changes: 1 addition & 1 deletion workflows/tfactivity.nf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ workflow TFACTIVITY {

ch_conditions = ch_samplesheet.map { meta, peak_file -> meta.condition }
.toSortedList().flatten().unique()

ch_contrasts = ch_conditions.combine(ch_conditions)
.filter { condition1, condition2 -> condition1 < condition2 }

Expand Down

0 comments on commit fd19ac3

Please sign in to comment.