DavidsonGroup / flexiplex

The Flexible Demultiplexer
https://davidsongroup.github.io/flexiplex/
MIT License
26 stars 2 forks source link

Add ATAC barcode to defaults #49

Open nadiadavidson opened 6 days ago

nadiadavidson commented 6 days ago
          Hi Nadia,

Thanks for the response!

Good to know, then I'll be going ahead with this setup. Regarding the barcodes, currently I have it as a switch statement in the nextflow module configuration. Not sure if you're familiar with nf-core modules and how their configuration looks like, but it will look like the following:

// FLEXIPLEX
process {
    withName: '.*RUN_FLEXIPLEX:FLEXIPLEX_DISCOVERY' {
        ext.args = {
            def barcodeArg = ""
            switch (params.barcode_format) {
                case "10x_atac":
                    barcodeArg = '-x "ACCGAGATCTACAC" -b "????????????????" -x "CGCGTCTGTCGTCGGCAGCGTCAGATGTGTATAAGAGACAG" -f 8'
                    break
                case "10x3v2":
                    barcodeArg = "-d 10x3v2"
                    break
            }
            barcodeArg.trim()
        }
    }
}

In this way it should be really easy for me to add any type of barcoding strategy to the pipeline while not needing to specify each time all the different flanking regions as separate parameters.

Thanks again and I'll keep you updated if we have it implemented somewhere. Meanwhile, feel free to close this :)

Cheers, Luuk

Originally posted by @ljwharbers in https://github.com/DavidsonGroup/flexiplex/issues/48#issuecomment-2485612916