Skip to content
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

Fully implement annotation #35

Merged
merged 41 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6b863ec
Template update for nf-core/tools version 2.6
nvnieuwk Oct 7, 2022
3d7d169
Template update for nf-core/tools version 2.7.2
nvnieuwk Jan 26, 2023
bacea54
first steps
nvnieuwk Apr 14, 2023
4c6916f
fully implement the annotation
nvnieuwk Apr 17, 2023
363abf3
update test
nvnieuwk Apr 17, 2023
fe17d76
offer a lamb to the linting gods
nvnieuwk Apr 17, 2023
b551476
bug fix
nvnieuwk Apr 17, 2023
74df144
offer a virgin to the linting gods (hope this is enough)
nvnieuwk Apr 17, 2023
1aaa70f
Add dynamic VCFanno config creation
nvnieuwk Apr 19, 2023
c6ca962
go on a pilgrimage to the mountain of the linting gods and make a blo…
nvnieuwk Apr 19, 2023
81f2917
fix and update annotate test to stub
nvnieuwk Apr 19, 2023
8281284
update vep container on stub runs
nvnieuwk Apr 19, 2023
f2d632f
add postannotations support to the configs
nvnieuwk Apr 19, 2023
37aafe9
simplified the vcfanno config code and made it smarter
nvnieuwk Apr 19, 2023
f1342e5
added new fields from the annotsv vcf to the default configs
nvnieuwk Apr 19, 2023
3d25cc6
added a param for the default annotsv file name
nvnieuwk Apr 19, 2023
b3d3a2c
fix small bug with param
nvnieuwk Apr 19, 2023
1a67261
fix small bug with param
nvnieuwk Apr 19, 2023
96a3dee
Add all default configs
nvnieuwk Apr 19, 2023
33123c5
sacrificing my firstborn child to the linting gods
nvnieuwk Apr 19, 2023
b2a9c91
Moved the unused configs to a separate folder
nvnieuwk Apr 19, 2023
6c5f4e1
update configs
nvnieuwk Apr 20, 2023
ab2756f
update vep config
nvnieuwk Apr 20, 2023
47a12fc
add option to annotate on small variants with AnnotSV (real test file…
nvnieuwk Apr 20, 2023
732dc8b
Remove unused VEP parameters
nvnieuwk Apr 20, 2023
10b11f7
fix issues
nvnieuwk Apr 20, 2023
799e4f9
add tests for small variants vcfs
nvnieuwk Apr 20, 2023
3afdab1
add an option to also output the annotsv outputs
nvnieuwk Apr 21, 2023
0cd4c3d
Merge wrongly placed commits (#40)
nvnieuwk May 8, 2023
db84300
Template update for nf-core/tools version 2.8
nvnieuwk May 11, 2023
8cc579e
Merge branch 'TEMPLATE' into template-v2.8
nvnieuwk May 11, 2023
6638f54
black linting
nvnieuwk May 11, 2023
7f8d565
update modules
nvnieuwk May 11, 2023
a0bde4d
update modules
nvnieuwk May 11, 2023
e9bb263
fix local modules
nvnieuwk May 11, 2023
0e40f59
bump
nvnieuwk May 11, 2023
48bed31
eclint
nvnieuwk May 11, 2023
dbb159b
Merge pull request #42 from CenterForMedicalGeneticsGhent/template-v2.8
nvnieuwk May 11, 2023
9d69532
update genome in docs
nvnieuwk May 25, 2023
4b626f8
update vcfanno configs retina and rpe
nvnieuwk May 25, 2023
f023b52
fix rpe bed file in config
nvnieuwk May 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
363 changes: 363 additions & 0 deletions assets/dummy_annotsv.vcf

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions assets/vcfanno/1KGP_3202.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="1KGP_3202.gatksv_svtools_novelins.freeze_V3.wAF.GRCh38.vcf.gz"
fields=["AF"]
ops=["self"]
names=["AF_1000G"]
5 changes: 5 additions & 0 deletions assets/vcfanno/CREs_v1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="CREs.v1.coordinates.bed.gz"
columns=[4]
ops=["self"]
names=["CRE_Gene_name"]
5 changes: 5 additions & 0 deletions assets/vcfanno/IRD_v9.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="IRD.v9.coordinates.bed"
columns=[4]
ops=["self"]
names=["IRD_Gene_name"]
5 changes: 5 additions & 0 deletions assets/vcfanno/RetNetCNV_v1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="RetNetCNV.v1.coordinates.bed"
columns=[4]
ops=["self"]
names=["RetNetCNV_Gene_name"]
5 changes: 5 additions & 0 deletions assets/vcfanno/RetNet_v6.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="RetNet.v6.coordinates.bed"
columns=[4]
ops=["self"]
names=["RetNet_Gene_name"]
5 changes: 5 additions & 0 deletions assets/vcfanno/all_v8.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="ALL.wgs.mergedSV.v8.20130502.svs.genotypes.GRCh38.vcf.gz"
fields=["AF"]
ops=["self"]
names=["AF_ALLv8"]
5 changes: 5 additions & 0 deletions assets/vcfanno/annotsv.toml
nvnieuwk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="annotsv_annotated.vcf.gz"
fields=["AnnotSV_ID", "Samples_ID", "Gene_name", "Gene_count", "Cosmic_ID", "RE_gene", "CytoBand", "OMIM_ID", "GnomAD_pLI", "ExAC_pLI", "ACMG_class", "AnnotSV_ranking_score", "AnnotSV_ranking_criteria"]
names=["AnnotSV_ID", "Samples_ID", "Gene_name", "Gene_count", "Cosmic_ID", "RE_gene", "CytoBand", "OMIM_ID", "GnomAD_pLI", "ExAC_pLI", "ACMG_class", "AnnotSV_ranking_score", "AnnotSV_ranking_criteria"]
ops=["self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self"]
5 changes: 5 additions & 0 deletions assets/vcfanno/dbVar.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="dbVar.GRCh38.variant_call.all.vcf.gz"
fields=["AF"]
ops=["self"]
names=["AF_dbVar"]
5 changes: 5 additions & 0 deletions assets/vcfanno/goNL_AF_genotyped_SVs.toml
nvnieuwk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="GoNL_AF_genotyped_SVs.v6.1.20161013.vcf.gz"
fields=["AF"]
ops=["self"]
names=["AF_goNL"]
5 changes: 5 additions & 0 deletions assets/vcfanno/nstd166.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[annotation]]
file="nstd166.GRCh38.variant_call.vcf.gz"
fields=["AF","DBVARID","REGIONID","CLNSIG","CLNACC"]
ops=["self","self","self","self","self"]
names=["AF_gnomAD","DBVARID","REGIONID","CLNSIG","CLNACC"]
6 changes: 6 additions & 0 deletions assets/vcfanno/retina_scale.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[annotation]]
file="retina_scale_res25000_win250000.TADboundaries.bed"
columns=[4]
#TODO: define the name and ops here
#names=["RetNetCNV_Gene_name"]
#ops=["self"]
6 changes: 6 additions & 0 deletions assets/vcfanno/rpe_scale.toml
nvnieuwk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[annotation]]
file="rpe_scale_res25000_win250000.TADboundaries.bed"
columns=[4]
#TODO: define the name and ops here
#names=["RetNetCNV_Gene_name"]
#ops=["self"]
46 changes: 25 additions & 21 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,14 @@ process {
]
}

if(!params.annotate) {
withName: "^.*:VCF_GENOTYPE_SV_PARAGRAPH:TABIX_FAMILY\$" {
publishDir = [
enabled: true,
overwrite: true,
path: { "${params.outdir}/ready/${meta.family}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename ==~ /^.*.vcf.gz.tbi$/ ? filename.replace("_genotyped", "") : null }
]
}
withName: "^.*:VCF_GENOTYPE_SV_PARAGRAPH:TABIX_FAMILY\$" {
publishDir = [
enabled: !params.annotate,
overwrite: true,
path: { "${params.outdir}/ready/${meta.family}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename ==~ /^.*.vcf.gz.tbi$/ ? filename.replace("_genotyped", "") : null }
]
}

/*
Expand All @@ -271,8 +269,17 @@ process {
*/

if(params.annotate){
withName: "^.*:ENSEMBLVEP_VEP\$" {
container = "nfcore/vep:${params.vep_version}.${params.genome}"

withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV_VCFANNO:ANNOTSV_ANNOTSV\$" {
ext.args = "-vcf 1"
}

withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV_VCFANNO:TABIX_ANNOTSV\$" {
ext.prefix = params.annotsv_file_name
}

withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV_VCFANNO:ENSEMBLVEP_VEP\$" {
container = {workflow.stubRun ? "quay.io/biocontainers/ensembl-vep:108.2--pl5321h4a94de4_0" : "nfcore/vep:${params.vep_version}.${params.genome}"}
ext.prefix = {"${meta.id}_annotated"}
ext.args = {[
// specify we use VCF files
Expand All @@ -296,22 +303,19 @@ process {
(params.vep_structuralvariantoverlap && params.genomes1000_sv) ? "--plugin StructuralVariantOverlap,file=${params.genomes1000_sv.split('/')[-1]}": "",
(params.vep_phenotypes) ? "--plugin Phenotypes,file=${params.phenotypes.split('/')[-1]}": ""
].join(' ').trim()}
publishDir = [
enabled: true,
overwrite: true,
path: { "${params.outdir}/ready/${meta.family}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename ==~ /^.*.vcf.gz$/ ? filename.replace("_annotated", "") : null }
]
}

withName: "^.*:TABIX_ANNOTATED\$" {
withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV_VCFANNO:VCFANNO\$" {
ext.args = "-permissive-overlap"
}

withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV_VCFANNO:TABIX_ANNOTATED\$" {
publishDir = [
enabled: true,
overwrite: true,
path: { "${params.outdir}/ready/${meta.family}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename ==~ /^.*.vcf.gz.tbi$/ ? filename.replace("_annotated", "") : null }
saveAs: { filename -> filename != "versions.yml" ? filename : null }
]
}
}
Expand Down
1 change: 1 addition & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ params.genomes1000_sv = WorkflowMain.getGenomeAttribute(params, 'genomes10
params.genomes1000_sv_tbi = WorkflowMain.getGenomeAttribute(params, 'genomes1000_sv_tbi')
params.phenotypes = WorkflowMain.getGenomeAttribute(params, 'phenotypes')
params.phenotypes_tbi = WorkflowMain.getGenomeAttribute(params, 'phenotypes_tbi')
params.annotsv_annotations = WorkflowMain.getGenomeAttribute(params, 'annotsv_annotations')

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
27 changes: 24 additions & 3 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"annotsv/annotsv": {
"branch": "master",
"git_sha": "28708bf9ef55937d87ff6604cb36a26b3275c43f",
"installed_by": ["modules"],
"patch": "modules/nf-core/annotsv/annotsv/annotsv-annotsv.diff"
},
"annotsv/installannotations": {
"branch": "master",
"git_sha": "b68aee26a00c3578710004072a10927660d16015",
"installed_by": ["modules"]
},
"bcftools/concat": {
"branch": "master",
"git_sha": "582ff1755bdd205c65e2ba4c31e0a008dae299ec",
Expand Down Expand Up @@ -42,7 +53,7 @@
},
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "b6d4d476aee074311c89d82a69c1921bd70c8180",
"git_sha": "7101db4432d3268b7fcb5b8f75fa0a022dc5561b",
"installed_by": ["modules"]
},
"delly/call": {
Expand All @@ -53,7 +64,7 @@
},
"ensemblvep/vep": {
"branch": "master",
"git_sha": "bea3ca998816a7f812b1bbbcb27c3a9ffbac0706",
"git_sha": "ac924c4ba0be25f79248b51be0c9fbfa404b6030",
"installed_by": ["modules"]
},
"gridss/gridss": {
Expand Down Expand Up @@ -123,14 +134,24 @@
},
"tabix/bgziptabix": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "da53f7da4ff34b920bb3f186d151184bd440e3b5",
"installed_by": ["modules"]
},
"tabix/tabix": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"]
},
"untar": {
"branch": "master",
"git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7",
"installed_by": ["modules"]
},
"vcfanno": {
"branch": "master",
"git_sha": "8b97329e850add26d11d822209cc6712f829e12a",
"installed_by": ["modules"]
},
"whamg": {
"branch": "master",
"git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b",
Expand Down
20 changes: 20 additions & 0 deletions modules/nf-core/annotsv/annotsv/annotsv-annotsv.diff

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 79 additions & 0 deletions modules/nf-core/annotsv/annotsv/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading