-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1613 from lindenb/pl_goleft
added indexcov : finding large INDEL using the BAI index
- Loading branch information
Showing
24 changed files
with
901 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
// INDEXCOV | ||
|
||
process { | ||
if (params.tools && params.tools.split(',').contains('indexcov')) { | ||
|
||
withName: 'SAMTOOLS_REINDEX_BAM' { | ||
ext.args = { ' -F 3844 -q 30 ' } // high mapq , primary read paired properly mapped | ||
} | ||
|
||
withName: 'GOLEFT_INDEXCOV' { | ||
publishDir = [ | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/variant_calling/indexcov/" } | ||
] | ||
|
||
} | ||
|
||
} | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::samtools=1.20 | ||
- bioconda::htslib=1.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* The aim of this process is to re-index the bam file without the duplicate, supplementary, unmapped etc, for goleft/indexcov | ||
* It creates a BAM containing only a header (so indexcov can get the sample name) and a BAM index were low quality reads, supplementary etc, have been removed | ||
*/ | ||
process SAMTOOLS_REINDEX_BAM { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/samtools:1.20--h50ea8bc_0' : | ||
'biocontainers/samtools:1.20--h50ea8bc_0' }" | ||
|
||
input: | ||
tuple val(meta), path(input), path(input_index) | ||
tuple val(meta2), path(fasta) | ||
tuple val(meta3), path(fai) | ||
|
||
output: | ||
tuple val(meta), path("${meta.id}.reindex.bam"), path("${meta.id}.reindex.bam.bai"),emit: output | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def reference = fasta ? "--reference ${fasta}" : "" | ||
""" | ||
# write header only | ||
samtools \\ | ||
view \\ | ||
--header-only \\ | ||
--threads ${task.cpus} \\ | ||
-O BAM \\ | ||
-o "${meta.id}.reindex.bam" \\ | ||
${reference} \\ | ||
${input} | ||
# write BAM index only, remove unmapped, supplementary, etc... | ||
samtools \\ | ||
view \\ | ||
--uncompressed \\ | ||
--write-index \\ | ||
--threads ${task.cpus} \\ | ||
-O BAM \\ | ||
-o "/dev/null##idx##${meta.id}.reindex.bam.bai" \\ | ||
${reference} \\ | ||
${args} \\ | ||
${input} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') | ||
END_VERSIONS | ||
""" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.