François-Xavier Stubbe
08/21/2025, 12:54 PMMahesh Binzer-Panchal
08/21/2025, 1:00 PMShiyi Yin
08/21/2025, 6:29 PMtotal_reads
.join(spikein, remainder: false)
.tap { total_reads_spikein } | \
CAL_SCALEFACTOR | \
set { ratio }
ratio
.join(bam_tuple) | \
MAKE_BIGWIGS
process MAKE_BIGWIGS{
conda "$baseDir/config/macs3.yml"
publishDir "$launchDir/blahablah/"
input:
tuple val(SAMPLE), val(scaleFactor), path(BAM), path(BAI)
output:
path("*.bw")
script:
// https://deeptools.readthedocs.io/en/latest/content/feature/effectiveGenomeSize.html
def GRCh38_size = 2913022398
"""
bamCoverage -b $BAM -o ${SAMPLE}_RPKM.bw -p 5 --effectiveGenomeSize $GRCh38_size --normalizeUsing RPKM
bamCoverage -b $BAM -o ${SAMPLE}_SpikeIn.bw -p 5 --normalizeUsing None --scaleFactor $scaleFactor
"""
}