Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ChIPster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xavier Grand
ChIPster
Commits
4a115a8a
Verified
Commit
4a115a8a
authored
4 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
add gatk3 to DSL2
parent
7a17de40
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/nf_modules/gatk3/main.nf
+113
-0
113 additions, 0 deletions
src/nf_modules/gatk3/main.nf
src/nf_modules/picard/main.nf
+19
-2
19 additions, 2 deletions
src/nf_modules/picard/main.nf
src/nf_modules/samtools/main.nf
+19
-0
19 additions, 0 deletions
src/nf_modules/samtools/main.nf
with
151 additions
and
2 deletions
src/nf_modules/gatk3/main.nf
0 → 100644
+
113
−
0
View file @
4a115a8a
version
=
"3.8.0"
container_url
=
"lbmc/gatk:${version}"
process
variant_calling
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
bam
),
path
(
bai
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
"*.vcf"
,
emit:
vcf
script:
"""
gatk3 -T HaplotypeCaller \
-nct ${task.cpus} \
-R ${fasta} \
-I ${bam} \
-o ${file_id}.vcf
"""
}
process
filter_snp
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
variants
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*_snp.vcf"
),
emit:
vcf
script:
"""
gatk3 -T SelectVariants \
-nct ${task.cpus} \
-R ${fasta} \
-V ${variants} \
-selectType SNP \
-o ${file_id}_snp.vcf
"""
}
process
filter_indels
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
variants
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*_indel.vcf"
),
emit:
vcf
script:
"""
gatk3 -T SelectVariants \
-nct ${task.cpus} \
-R ${fasta} \
-V ${variants} \
-selectType INDEL \
-o ${file_id}_indel.vcf
"""
}
high_confidence_snp_filter
=
"(QD < 2.0) || (FS > 60.0) || (MQ < 40.0) || (MQRankSum < -12.5) || (ReadPosRankSum < -8.0) || (SOR > 4.0)"
process
high_confidence_snp
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
variants
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*_snp.vcf"
),
emit:
vcf
script:
"""
gatk3 -T VariantFiltration \
-nct ${task.cpus} \
-R ${fasta} \
-V ${variants} \
--filterExpression "${high_confidence_snp_filter}" \
--filterName "basic_snp_filter" \
-o ${file_id}_filtered_snp.vcf
"""
}
high_confidence_indel_filter
=
"QD < 2.0 || FS > 200.0 || ReadPosRankSum < -20.0 || SOR > 10.0"
process
high_confidence_indel
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
variants
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*_indel.vcf"
),
emit:
vcf
script:
"""
gatk3 -T VariantFiltration \
-nct ${task.cpus} \
-R ${fasta} \
-V ${variants} \
--filterExpression "${high_confidence_indel_filter}" \
--filterName "basic_indel_filter" \
-o ${file_id}_filtered_indel.vcf
"""
}
This diff is collapsed.
Click to expand it.
src/nf_modules/picard/main.nf
+
19
−
2
View file @
4a115a8a
...
...
@@ -31,9 +31,9 @@ process index_fasta {
tag
"$file_id"
input:
tuple
val
(
file_id
),
file
(
fasta
)
tuple
val
(
file_id
),
path
(
fasta
)
output:
tuple
val
(
file_id
),
file
(
"*.dict"
),
emit:
index
tuple
val
(
file_id
),
path
(
"*.dict"
),
emit:
index
script:
"""
...
...
@@ -42,3 +42,20 @@ REFERENCE=${fasta} \
OUTPUT=${fasta.simpleName}.dict
"""
}
process
index_bam
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
bam
)
output:
tuple
val
(
file_id
),
path
(
"*"
),
emit:
index
script:
"""
PicardCommandLine BuildBamIndex \
INPUT=${bam}
"""
}
This diff is collapsed.
Click to expand it.
src/nf_modules/samtools/main.nf
+
19
−
0
View file @
4a115a8a
...
...
@@ -17,6 +17,25 @@ samtools faidx ${fasta}
"""
}
filter_bam_quality_threshold
=
30
process
filter_bam_quality
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
bam
)
output:
tuple
val
(
file_id
),
path
(
"*_filtered.bam"
),
emit:
bam
script:
"""
samtools view -@ ${task.cpus} -hb ${bam} -q ${filter_bam_quality_threshold} > \
${bam.simpleName}_filtered.bam
"""
}
process
filter_bam
{
container
=
"${container_url}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment