Skip to content

Commit

Permalink
chore: Merge branch 'main' of https://github.com/CCBR/CHAMPAGNE
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Nov 16, 2023
2 parents d68231d + 5763627 commit fe05d3b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Per sample fingerprint plots instead of per replicate
- Input normalized profile plots
- Protein-coding-only versions of plots
- Ensure sample IDs are sorted (#150)

## CHAMPAGNE 0.2.1

Expand Down
5 changes: 3 additions & 2 deletions modules/local/deeptools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ process BIGWIG_SUM {
path("bigWigSum.npz"), emit: array

script:
// sort files on basenames, otherwise uses full file path
"""
multiBigwigSummary bins \\
-b ${bigwigs.join(' ')} \\
-b ${bigwigs.sort({ a, b -> a.baseName <=> b.baseName }).join(' ')} \\
--smartLabels \\
-o bigWigSum.npz
"""
Expand Down Expand Up @@ -257,7 +258,7 @@ process COMPUTE_MATRIX {
"""
echo "$mattype" > file.txt
computeMatrix ${cmd} \\
-S ${bigwigs.sort().join(' ')} \\
-S ${bigwigs.sort({ a, b -> a.baseName <=> b.baseName }).join(' ')} \\
-R ${bed} \\
-p ${task.cpus} \\
-o ${meta.id}.${bed.baseName}.${mattype}.mat.gz \\
Expand Down
6 changes: 3 additions & 3 deletions subworkflows/local/deeptools/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ workflow DEEPTOOLS {
.set { bigwigs }

bigwigs
.map{ meta, bigwig -> bigwig } // sort files on basenames, otherwise uses full file path
.toSortedList( { a, b -> a.baseName <=> b.baseName } ) | BIGWIG_SUM
.map{ meta, bigwig -> bigwig }
.collect() | BIGWIG_SUM
bw_array = BIGWIG_SUM.out.array
bw_array.combine(Channel.of('heatmap', 'scatterplot')) | PLOT_CORRELATION
bw_array | PLOT_PCA
Expand Down Expand Up @@ -63,7 +63,7 @@ workflow DEEPTOOLS {
ch_all_bigwigs = Channel.value([ id: 'inputnorm' ])
.combine(bigwigs_norm)
.mix(bigwigs_raw)
.groupTuple()
.groupTuple() // sort files on basenames, otherwise uses full file path
.combine(beds)
.combine(Channel.of('metagene','TSS'))
COMPUTE_MATRIX(ch_all_bigwigs)
Expand Down

0 comments on commit fe05d3b

Please sign in to comment.