Skip to content

Commit

Permalink
add to sentieon
Browse files Browse the repository at this point in the history
  • Loading branch information
ramprasadn committed Nov 8, 2024
1 parent b1c74b1 commit 4ada05b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions conf/modules/align_sentieon.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ process {
ext.prefix = { "${meta.id}_merged.bam" }
}

withName: '.*ALIGN:ALIGN_SENTIEON:EXTRACT_ALIGNMENTS' {
ext.prefix = { "${meta.id}_merged_extracted" }
ext.args2 = { params.restrict_to_contigs }
}

withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_DEDUP' {
ext.args4 = { $params.rmdup ? "--rmdup" : '' }
ext.prefix = { "${meta.id}_dedup.bam" }
Expand Down
19 changes: 15 additions & 4 deletions subworkflows/local/alignment/align_sentieon.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
// A subworkflow to annotate structural variants.
//

include { SENTIEON_BWAMEM } from '../../../modules/nf-core/sentieon/bwamem/main'
include { SENTIEON_DATAMETRICS } from '../../../modules/nf-core/sentieon/datametrics/main'
include { SENTIEON_DEDUP } from '../../../modules/nf-core/sentieon/dedup/main'
include { SENTIEON_READWRITER } from '../../../modules/nf-core/sentieon/readwriter/main'
include { SENTIEON_BWAMEM } from '../../../modules/nf-core/sentieon/bwamem/main'
include { SENTIEON_DATAMETRICS } from '../../../modules/nf-core/sentieon/datametrics/main'
include { SENTIEON_DEDUP } from '../../../modules/nf-core/sentieon/dedup/main'
include { SENTIEON_READWRITER } from '../../../modules/nf-core/sentieon/readwriter/main'
include { SAMTOOLS_VIEW as EXTRACT_ALIGNMENTS } from '../../../modules/nf-core/samtools/view/main'
include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_EXTRACT } from '../../../modules/nf-core/samtools/index/main'

workflow ALIGN_SENTIEON {
take:
ch_reads_input // channel: [mandatory] [ val(meta), path(reads_input) ]
Expand Down Expand Up @@ -36,6 +39,14 @@ workflow ALIGN_SENTIEON {
SENTIEON_READWRITER ( merge_bams_in.multiple, ch_genome_fasta, ch_genome_fai )
ch_bam_bai = merge_bams_in.single.mix(SENTIEON_READWRITER.out.output_index)

// GET ALIGNMENT FROM PRIMARY CONTIGS
if (params.extract_alignments) {
EXTRACT_ALIGNMENTS( ch_bam_bai, ch_genome_fasta, [])
ch_bam_bai = EXTRACT_ALIGNMENTS.out.bam
SAMTOOLS_INDEX_EXTRACT ( EXTRACT_ALIGNMENTS.out.bam )
ch_bam_bai = EXTRACT_ALIGNMENTS.out.bam.join(SAMTOOLS_INDEX_EXTRACT.out.bai, failOnMismatch:true, failOnDuplicate:true)
}

SENTIEON_DATAMETRICS ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, false )

SENTIEON_DEDUP ( ch_bam_bai, ch_genome_fasta, ch_genome_fai )
Expand Down

0 comments on commit 4ada05b

Please sign in to comment.