Skip to content

Commit

Permalink
exposed herediclassify_config path and added automatic conversion of …
Browse files Browse the repository at this point in the history
…herediclass config pejaver
  • Loading branch information
MarvinDo committed Jul 26, 2024
1 parent 2a047b1 commit 8a28afb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ classified_structural_variants
/src/frontend_celery/playwright/redis*
/Python-*
/data_makefile
/.localpython
/.localpython*

resources/backups/keycloak_export/dev/*/*-users*.json
/resources/backups/database_dumper/dev/data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ def save_to_db(self, variant_id, conn: Connection):
if autoclass_input is None:
return 0, "Not enough information to calculate the automatic classification"

config_path = os.path.join(paths.automatic_classification_path, "config_production.yaml")
returncode, err_msg, classification = self.run_automatic_classification(autoclass_input, config_path)
returncode, err_msg, classification = self.run_automatic_classification(autoclass_input, paths.automatic_classification_config_path)

if returncode != 0:
raise RuntimeError(err_msg)
Expand Down
2 changes: 2 additions & 0 deletions src/common/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def joinpaths(path, *paths):
ngs_bits_path = joinpaths(toolsdir, "ngs-bits/bin")
htslib_path = joinpaths(toolsdir, "htslib")
automatic_classification_path = joinpaths(toolsdir, "herediclass")
automatic_classification_config_path = os.path.join(automatic_classification_path, "config_pejaver_mult_strength_production.yaml") # config_production.yaml
samtools_path = joinpaths(toolsdir, "samtools/samtools")

# data
Expand Down Expand Up @@ -245,6 +246,7 @@ def joinpaths(path, *paths):
htslib_path = joinpaths(toolsdir, "htslib-1.16")
samtools_path = joinpaths(toolsdir, "samtools/samtools")
automatic_classification_path = joinpaths(toolsdir, "herediclass")
automatic_classification_config_path = os.path.join(automatic_classification_path, "config_production.yaml")


# data
Expand Down
5 changes: 4 additions & 1 deletion tools/script/install_herediclass_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@ for filename in $gene_sepcific_config_path_production/*.yaml; do
sed -r -i "s:variant_classification/::g" $filename
done


for filename in $gene_sepcific_config_path_production/pejaver_mult_strength/*.yaml; do
sed -r -i "s:/home/katzkean/:$variant_classification_path/:g" $filename
sed -r -i "s:variant_classification/::g" $filename
done

0 comments on commit 8a28afb

Please sign in to comment.