Skip to content
Snippets Groups Projects
Verified Commit fa0b5e5e authored by Mia Croiset's avatar Mia Croiset
Browse files

correct subworkflow filter pcr dup

parent e92a4085
No related branches found
No related tags found
No related merge requests found
...@@ -350,6 +350,7 @@ profiles { ...@@ -350,6 +350,7 @@ profiles {
} }
docker { docker {
docker.enabled = true docker.enabled = true
docker.registry = 'quay.io'
docker.userEmulation = true docker.userEmulation = true
singularity.enabled = false singularity.enabled = false
podman.enabled = false podman.enabled = false
......
...@@ -8,11 +8,7 @@ include { BUILD_MATRIX_COOL_ALT } from '../../modules/local/hicstuff/build_matri ...@@ -8,11 +8,7 @@ include { BUILD_MATRIX_COOL_ALT } from '../../modules/local/hicstuff/build_matri
include { FILTER_EVENT } from '../../modules/local/hicstuff/filter_event' include { FILTER_EVENT } from '../../modules/local/hicstuff/filter_event'
include { DISTANCE_LAW } from '../../modules/local/hicstuff/distance_law' include { DISTANCE_LAW } from '../../modules/local/hicstuff/distance_law'
include { FILTER_PCR } from '../../modules/local/hicstuff/filter_pcr' include { FILTER_PCR } from '../../modules/local/hicstuff/filter_pcr'
include { SAMTOOLS_SORT } from '../../modules/nf-core/custom/samtools/sort/main' include { FILTER_PCR_DUP } from './filter_pcr_dup'
include { SAMTOOLS_SORT_N } from '../../modules/nf-core/custom/samtools_n/sort/main'
include { FILTER_PAIR } from '../../modules/local/filterbam/main'
include { SAMTOOLS_INDEX } from '../../modules/nf-core/custom/samtools/index/main'
include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/custom/picard/markduplicates/main'
// Paired-end to Single-end // Paired-end to Single-end
def pairToSingle(row, mates) { def pairToSingle(row, mates) {
...@@ -65,32 +61,12 @@ workflow HICSTUFF_SUB { ...@@ -65,32 +61,12 @@ workflow HICSTUFF_SUB {
error "Error: filter_pcr and filter_pcr_picard can't both be true at the same time! Set one of them false in the config file" error "Error: filter_pcr and filter_pcr_picard can't both be true at the same time! Set one of them false in the config file"
} }
else if (params.filter_pcr_picard){ else if (params.filter_pcr_picard){
SAMTOOLS_SORT( FILTER_PCR_DUP(
BOWTIE2_ALIGNMENT.out.bam BOWTIE2_ALIGNMENT.out.bam,
fasta,
index
) )
FILTER_PCR_DUP.out.bam.set{ new_ch_bam }
PICARD_MARKDUPLICATES(
SAMTOOLS_SORT.out.bam,
fasta.collect(),
index.collect()
)
SAMTOOLS_SORT_N(
PICARD_MARKDUPLICATES.out.bam
)
SAMTOOLS_SORT_N.out.bam.set{ ch_bam }
FILTER_PAIR(
ch_bam.combine(ch_bam)
.map {
meta1, bam1, meta2, bam2 ->
meta1.id == meta2.id && meta1.chunk == meta2.chunk && meta1.mates == "R1" && meta2.mates == "R2" ? [ meta1, bam1, meta2, bam2 ] : null
})
FILTER_PAIR.out.bam.set{ new_ch_bam }
} }
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment