Commit 0c28fa15 authored by David Ladd's avatar David Ladd
Browse files

Merge branch 'dev' into dev_dladd

parents 9f96a19f 298a119f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ params {
            suffix        = ".awk"
            publish_dir   = ""
            command       = "'/^[^#]/{print}'"
            command2      = "| head -2 | sed 's/\\t/,/g' - | sed 's/.*/\\L&/g' -"
            command2      = " > int1.txt && head -2 int1.txt > int2.txt && sed 's/\\t/,/g' int2.txt > int3.txt && sed 's/.*/\\L&/g' int3.txt "
            publish_files = false
        }
        "awk_dt_frag" {
+1 −1
Original line number Diff line number Diff line
@@ -33,6 +33,6 @@ process AWK {
    def ext   = options.ext ? "${options.ext}" : "txt"
    """
    awk $options.args $options.command $input $options.command2 > ${prefix}.awk.${ext}
    echo \$(awk --version 2>&1) | sed 's/^.*version //;' > ${software}.version.txt
    awk -W version | head -n 1 | egrep -o "([0-9]{1,}\\.)+[0-9]{1,}" > ${software}.version.txt
    """
}
+1 −1
Original line number Diff line number Diff line
@@ -30,6 +30,6 @@ process AWK_SCRIPT {
    def prefix   = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
    """
    awk $options.args -f $script $input > ${prefix}.awk.txt
    echo \$(awk --version 2>&1) | sed 's/^.*version //;' > ${software}.version.txt
    awk -W version | head -n 1 | egrep -o "([0-9]{1,}\\.)+[0-9]{1,}" > ${software}.version.txt
    """
}
+4 −1
Original line number Diff line number Diff line
@@ -397,7 +397,10 @@ workflow CUTANDRUN {
     *          of reads aligned to the spike-in genome
     */
    ch_samtools_bam
        .map { row -> [ row[0].id, params.normalisation_c / (row[0].find{ it.key == "bt2_total_aligned_spikein" }?.value.toInteger()) ] }
        .map { row ->
            def denominator = row[0].find{ it.key == "bt2_total_aligned_spikein" }?.value.toInteger()
            [ row[0].id, params.normalisation_c / (denominator != 0 ? denominator : 1) ]
        }
        .set { ch_scale_factor }
    // EXAMPLE CHANNEL STRUCT: [id, scale_factor]
    //ch_scale_factor | view