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
1207cdab
Verified
Commit
1207cdab
authored
4 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
gatk3: add new processes
parent
eddc374c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nf_modules/gatk3/main.nf
+164
-12
164 additions, 12 deletions
src/nf_modules/gatk3/main.nf
with
164 additions
and
12 deletions
src/nf_modules/gatk3/main.nf
+
164
−
12
View file @
1207cdab
...
@@ -24,11 +24,11 @@ gatk3 -T HaplotypeCaller \
...
@@ -24,11 +24,11 @@ gatk3 -T HaplotypeCaller \
process
filter_snp
{
process
filter_snp
{
container
=
"${container_url}"
container
=
"${container_url}"
label
"big_mem_m
ono
_cpus"
label
"big_mem_m
ulti
_cpus"
tag
"$file_id"
tag
"$file_id"
input:
input:
tuple
val
(
file_id
),
path
(
v
ariants
)
tuple
val
(
file_id
),
path
(
v
cf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
output:
tuple
val
(
file_id
),
path
(
"*_snp.vcf"
),
emit:
vcf
tuple
val
(
file_id
),
path
(
"*_snp.vcf"
),
emit:
vcf
...
@@ -37,7 +37,7 @@ process filter_snp {
...
@@ -37,7 +37,7 @@ process filter_snp {
gatk3 -T SelectVariants \
gatk3 -T SelectVariants \
-nct ${task.cpus} \
-nct ${task.cpus} \
-R ${fasta} \
-R ${fasta} \
-V ${v
ariants
} \
-V ${v
cf
} \
-selectType SNP \
-selectType SNP \
-o ${file_id}_snp.vcf
-o ${file_id}_snp.vcf
"""
"""
...
@@ -45,11 +45,11 @@ gatk3 -T SelectVariants \
...
@@ -45,11 +45,11 @@ gatk3 -T SelectVariants \
process
filter_indels
{
process
filter_indels
{
container
=
"${container_url}"
container
=
"${container_url}"
label
"big_mem_m
ono
_cpus"
label
"big_mem_m
ulti
_cpus"
tag
"$file_id"
tag
"$file_id"
input:
input:
tuple
val
(
file_id
),
path
(
v
ariants
)
tuple
val
(
file_id
),
path
(
v
cf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
output:
tuple
val
(
file_id
),
path
(
"*_indel.vcf"
),
emit:
vcf
tuple
val
(
file_id
),
path
(
"*_indel.vcf"
),
emit:
vcf
...
@@ -58,7 +58,7 @@ process filter_indels {
...
@@ -58,7 +58,7 @@ process filter_indels {
gatk3 -T SelectVariants \
gatk3 -T SelectVariants \
-nct ${task.cpus} \
-nct ${task.cpus} \
-R ${fasta} \
-R ${fasta} \
-V ${v
ariants
} \
-V ${v
cf
} \
-selectType INDEL \
-selectType INDEL \
-o ${file_id}_indel.vcf
-o ${file_id}_indel.vcf
"""
"""
...
@@ -68,11 +68,11 @@ high_confidence_snp_filter = "(QD < 2.0) || (FS > 60.0) || (MQ < 40.0) || (MQRan
...
@@ -68,11 +68,11 @@ high_confidence_snp_filter = "(QD < 2.0) || (FS > 60.0) || (MQ < 40.0) || (MQRan
process
high_confidence_snp
{
process
high_confidence_snp
{
container
=
"${container_url}"
container
=
"${container_url}"
label
"big_mem_m
ono
_cpus"
label
"big_mem_m
ulti
_cpus"
tag
"$file_id"
tag
"$file_id"
input:
input:
tuple
val
(
file_id
),
path
(
v
ariants
)
tuple
val
(
file_id
),
path
(
v
cf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
output:
tuple
val
(
file_id
),
path
(
"*_snp.vcf"
),
emit:
vcf
tuple
val
(
file_id
),
path
(
"*_snp.vcf"
),
emit:
vcf
...
@@ -81,7 +81,7 @@ process high_confidence_snp {
...
@@ -81,7 +81,7 @@ process high_confidence_snp {
gatk3 -T VariantFiltration \
gatk3 -T VariantFiltration \
-nct ${task.cpus} \
-nct ${task.cpus} \
-R ${fasta} \
-R ${fasta} \
-V ${v
ariants
} \
-V ${v
cf
} \
--filterExpression "${high_confidence_snp_filter}" \
--filterExpression "${high_confidence_snp_filter}" \
--filterName "basic_snp_filter" \
--filterName "basic_snp_filter" \
-o ${file_id}_filtered_snp.vcf
-o ${file_id}_filtered_snp.vcf
...
@@ -92,11 +92,11 @@ high_confidence_indel_filter = "QD < 3.0 || FS > 200.0 || ReadPosRankSum < -20.0
...
@@ -92,11 +92,11 @@ high_confidence_indel_filter = "QD < 3.0 || FS > 200.0 || ReadPosRankSum < -20.0
process
high_confidence_indels
{
process
high_confidence_indels
{
container
=
"${container_url}"
container
=
"${container_url}"
label
"big_mem_m
ono
_cpus"
label
"big_mem_m
ulti
_cpus"
tag
"$file_id"
tag
"$file_id"
input:
input:
tuple
val
(
file_id
),
path
(
v
ariants
)
tuple
val
(
file_id
),
path
(
v
cf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
output:
tuple
val
(
file_id
),
path
(
"*_indel.vcf"
),
emit:
vcf
tuple
val
(
file_id
),
path
(
"*_indel.vcf"
),
emit:
vcf
...
@@ -105,9 +105,161 @@ process high_confidence_indels {
...
@@ -105,9 +105,161 @@ process high_confidence_indels {
gatk3 -T VariantFiltration \
gatk3 -T VariantFiltration \
-nct ${task.cpus} \
-nct ${task.cpus} \
-R ${fasta} \
-R ${fasta} \
-V ${v
ariants
} \
-V ${v
cf
} \
--filterExpression "${high_confidence_indel_filter}" \
--filterExpression "${high_confidence_indel_filter}" \
--filterName "basic_indel_filter" \
--filterName "basic_indel_filter" \
-o ${file_id}_filtered_indel.vcf
-o ${file_id}_filtered_indel.vcf
"""
"""
}
}
process
recalibrate_snp_table
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
snp_file
),
path
(
indel_file
),
path
(
bam
),
path
(
bam_idx
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"recal_data_table"
),
emit:
recal_table
script:
"""
gatk3 -T BaseRecalibrator \
-nct ${task.cpus} \
-R ${fasta} \
-I ${bam} \
-knownSites ${snp_file} \
-knownSites ${indel_file} \
-o recal_data_table
"""
}
process
recalibrate_snp
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
snp_file
),
path
(
indel_file
),
path
(
bam
),
path
(
bam_idx
)
tuple
val
(
table_id
),
path
(
recal_data_table
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*.bam"
),
emit:
bam
script:
"""
gatk3 -T PrintReads \
--use_jdk_deflater \
--use_jdk_inflater \
-nct ${task.cpus} \
-R ${fasta} \
-I ${bam} \
-BQSR recal_data_table \
-o ${file_id}_recal.bam
"""
}
process
haplotype_caller
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
bam
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*.gvcf"
),
emit:
gvcf
script:
"""
gatk3 -T HaplotypeCaller \
-nct ${task.cpus} \
-R ${fasta} \
-I ${bam} \
-ERC GVCF \
-variant_index_type LINEAR -variant_index_parameter 128000 \
-o ${file_id}.gvcf
"""
}
process
gvcf_genotyping
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
gvcf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*.vcf"
),
emit:
vcf
script:
"""
gatk3 -T GenotypeGVCFs \
-nct ${task.cpus} \
-R ${fasta} \
-V ${gvcf} \
-o ${file_id}_joint.vcf
"""
}
process
select_variants_snp
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
vcf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*_joint_snp.vcf"
),
emit:
vcf
script:
"""
gatk3 -T SelectVariants \
-nct ${task.cpus} \
-R ${fasta} \
-V ${vcf} \
-selectType SNP \
-o ${file_id}_joint_snp.vcf
"""
}
process
select_variants_indels
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
vcf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*_joint_indel.vcf"
),
emit:
vcf
script:
"""
gatk3 -T SelectVariants \
-nct ${task.cpus} \
-R ${fasta} \
-V ${vcf} \
-selectType INDEL \
-o ${file_id}_joint_indel.vcf
"""
}
process
personalized_genome
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"$file_id"
input:
tuple
val
(
file_id
),
path
(
vcf
)
tuple
val
(
ref_id
),
path
(
fasta
),
path
(
fai
),
path
(
dict
)
output:
tuple
val
(
file_id
),
path
(
"*_genome.fasta"
),
emit:
fasta
script:
library
=
pick_library
(
file_id
,
library_list
)
"""
gatk3 -T FastaAlternateReferenceMaker\
-R ${reference} \
-V ${vcf} \
-o ${library}_genome.fasta
"""
}
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