Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
amunoz
structuralvariants_poc
Commits
3d7f911f
Commit
3d7f911f
authored
Jun 16, 2022
by
lrodrig1
Browse files
remove samtools index+merge subworkflows in Nextflow
parent
ad399cc9
Changes
5
Hide whitespace changes
Inline
Side-by-side
structuralvariants/nextflow/main.nf
View file @
3d7f911f
...
...
@@ -78,8 +78,8 @@ include { SUB_TRIMMED_FASTQ } from './subworkflows/trimmed_fastq'
include { SUB_BWA_MEM } from './subworkflows/bwa_mem'
include { SUB_SAMTOOLS_VIEW_SAM2BAM } from './subworkflows/samtools_view_sam2bam'
include { SUB_SAMTOOLS_SORT } from './subworkflows/samtools_sort'
include {
SUB_
SAMTOOLS_MERGE } from './
subworkflow
s/samtools_merge'
include {
SUB_
SAMTOOLS_INDEX } from './
subworkflow
s/samtools_index'
include { SAMTOOLS_MERGE } from './
module
s/samtools_merge'
include { SAMTOOLS_INDEX } from './
module
s/samtools_index'
include { SUB_PICARD_MARKDUPLICATES } from './subworkflows/picard_markduplicates'
include { SUB_BAM_FILTERING } from './subworkflows/bam_filtering'
include { SUB_CNV_MANTA } from './subworkflows/cnv_manta'
...
...
@@ -88,7 +88,7 @@ include { SUB_CNV_EXOMEDEPTH } from './subworkflows/cnv_exomedepth'
include { SUB_CNV_CODEX } from './subworkflows/cnv_codex'
include { SUB_FINAL_FILTERING } from './subworkflows/final_filtering'
workflow{
workflow
{
if( params.generate_bwa_indexes ) {
output_bwa_index = SUB_BWA_INDEX(reference_fasta)
indexFiles = output_bwa_index.indexs.combine(output_bwa_index.fai).collect()
...
...
@@ -100,52 +100,65 @@ workflow{
SUB_TRIMMED_FASTQ(fastq)
SUB_BWA_MEM(SUB_TRIMMED_FASTQ.out.reads, indexFiles)
SUB_BWA_MEM(
SUB_TRIMMED_FASTQ.out.reads,
indexFiles
)
SUB_SAMTOOLS_VIEW_SAM2BAM(
SUB_BWA_MEM.out.
output_
paired,
SUB_BWA_MEM.out.
output_
unpairedR1,
SUB_BWA_MEM.out.
output_
unpairedR2
SUB_BWA_MEM.out.paired,
SUB_BWA_MEM.out.unpairedR1,
SUB_BWA_MEM.out.unpairedR2
)
SUB_SAMTOOLS_SORT(
SUB_SAMTOOLS_VIEW_SAM2BAM.out.
reads
,
SUB_SAMTOOLS_VIEW_SAM2BAM.out.
paired
,
SUB_SAMTOOLS_VIEW_SAM2BAM.out.unpairedR1,
SUB_SAMTOOLS_VIEW_SAM2BAM.out.unpairedR2
)
SUB_
SAMTOOLS_MERGE(
SAMTOOLS_MERGE(
SUB_SAMTOOLS_SORT.out.paired,
SUB_SAMTOOLS_SORT.out.unpairedR1,
SUB_SAMTOOLS_SORT.out.unpairedR2
)
SUB_SAMTOOLS_INDEX(
SUB_SAMTOOLS_MERGE.out.output
SAMTOOLS_INDEX(
SAMTOOLS_MERGE.out.output
)
SUB_PICARD_MARKDUPLICATES(
SUB_SAMTOOLS_INDEX.out.output
)
SUB_BAM_FILTERING(
SUB_PICARD_MARKDUPLICATES.out.alignments
)
SUB_CNV_MANTA (
SUB_BAM_FILTERING.out,
samples,
indexFiles,
bed
)
SUB_CNV_GRIDSS (
SUB_BAM_FILTERING.out,
samples,
indexFiles
)
SUB_CNV_EXOMEDEPTH (
SUB_BAM_FILTERING.out,
samples,
indexFiles
)
SUB_CNV_CODEX(
SUB_BAM_FILTERING.out,
samples,
bed
)
SUB_PICARD_MARKDUPLICATES( SUB_SAMTOOLS_INDEX.out.output )
SUB_BAM_FILTERING( SUB_PICARD_MARKDUPLICATES.out.alignments )
// SUB_CNV_MANTA (
// SUB_BAM_FILTERING.out,
// samples,
// indexFiles,
// bed
// )
// SUB_CNV_GRIDSS (
// SUB_BAM_FILTERING.out,
// samples,
// indexFiles
// )
// SUB_CNV_EXOMEDEPTH (
// SUB_BAM_FILTERING.out,
// samples,
// indexFiles
// )
// SUB_CNV_CODEX (
// SUB_BAM_FILTERING.out,
// samples,
// bed
// )
// SUB_FINAL_FILTERING ( final_filtering )
SUB_FINAL_FILTERING(final_filtering)
}
structuralvariants/nextflow/modules/samtools_index.nf
View file @
3d7f911f
process SAMTOOLS_INDEX {
tag "samtools index"
tag
{
"samtools index"
}
container 'quay.io/biocontainers/samtools:1.5--2'
input:
path input
output:
tuple path(input), path("*.sorted*.bai")
tuple path(input), path("*.sorted*.bai")
, emit: output
script:
"""
samtools index -b $input
"""
}
\ No newline at end of file
}
structuralvariants/nextflow/modules/samtools_merge.nf
View file @
3d7f911f
process SAMTOOLS_MERGE {
tag "samtools merge"
tag
{
"samtools merge"
}
container 'quay.io/biocontainers/samtools:1.5--2'
input:
path paired
path unpairedR1
path unpairedR2
output:
path "${paired.simpleName}.sorted.bam", emit: output
_samtools_merge
path "${paired.simpleName}.sorted.bam", emit: output
script:
def threadsArgument = params.threads_samtools ? "--threads $params.threads_samtools" : ""
"""
samtools merge -f $threadsArgument ${paired.simpleName}.sorted.bam $paired $unpairedR1 $unpairedR2
"""
}
\ No newline at end of file
}
structuralvariants/nextflow/subworkflows/samtools_index.nf
deleted
100755 → 0
View file @
ad399cc9
/*
* Include for samtools_index
*/
include {
SAMTOOLS_INDEX
} from "../modules/samtools_index"
/*
* Subworkflow samtools_index
*/
workflow SUB_SAMTOOLS_INDEX {
take:
input
main:
SAMTOOLS_INDEX(input)
emit:
output = SAMTOOLS_INDEX.out
}
\ No newline at end of file
structuralvariants/nextflow/subworkflows/samtools_merge.nf
deleted
100755 → 0
View file @
ad399cc9
/*
* Include for samtools_merge
*/
include {
SAMTOOLS_MERGE
} from "../modules/samtools_merge"
/*
* Subworkflow samtools_merge
*/
workflow SUB_SAMTOOLS_MERGE {
take:
paired
unpaired_R1
unpaired_R2
main:
SAMTOOLS_MERGE(paired,
unpaired_R1,
unpaired_R2)
emit:
output = SAMTOOLS_MERGE.out
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment