Skip to content

Commit

Permalink
feat: Add a new check for the variantconvert configuration (issue #246)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgmgeo committed Aug 6, 2024
1 parent a4279ca commit fa9d8db
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions changeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For more details, please see the README file.


, 2024, AnnotSV version 3.4.3
- Add a new check for the variantconvert configuration (issue 246)
- Fix a bug in the AnnotSV_ID setting when POS (e.g. 1) is contained in CHROM (e.g. 1)
- Add alias gene symbols in the OMIM annotations file

Expand Down
20 changes: 19 additions & 1 deletion share/tcl/AnnotSV/AnnotSV-variantconvert.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,25 @@ proc checkVariantconvertConfigfile {} {
# 1 - AnnotSV install with the root user
# 2 - AnnotSV run with non-root user
# => The $localConfigfile can not be created by a non-root user. This file should exists with 777 permissions
if {![file exists $localConfigfile] || [file size $localConfigfile] eq 0} {

# If the user defined a wrong "-annotationsDir" during the first execution of AnnotSV (using the -vcf 1 parameter), the $localConfigfile need to be removed then recomputed.
if {[file exists $localConfigfile]} {
set testPathExists 0
set testRefExists 0
foreach L [LinesFromFile $localConfigfile] {
if {[regexp "\"path\": \"(.*)\"," $L match path]} {
if {[file exists $path]} {set testPathExists 1}
}
if {[regexp "\"##reference=file:(.*)\"" $L match ref]} {
if {[file exists $ref]} {set testRefExists 1}
}
}
if {$testPathExists eq 0 || $testRefExists eq 0} {
file delete -force $localConfigfile
}
}
# If the file has been deleted or does not yet exist:
if {![file exists $localConfigfile]} {
set L_Lines {}
foreach L [LinesFromFile $configfile] {
if {[regexp "$distributedPathLine" $L]} {
Expand Down

0 comments on commit fa9d8db

Please sign in to comment.