-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added indexcov : finding large INDEL using the BAI index #1613
base: dev
Are you sure you want to change the base?
Changes from 19 commits
6c70f3e
c8b922b
add7b5f
2b0ab52
5db7e39
5b02760
ada5543
c8920bd
892da3d
09371b6
cf2c697
cdd529d
04086cd
6bf0440
6f0db0b
8d69004
0aa03a4
1224f98
4740af8
d1cfad7
264c948
1c3cabd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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/" } | ||
] | ||
|
||
} | ||
|
||
} | ||
|
||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: samtools_view | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
lindenb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
dependencies: | ||
- bioconda::samtools=1.20 | ||
- bioconda::htslib=1.20 |
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this line in the current dev section?