Skip to content

Example Use Case

How to use VOCAL with covSonar

This tutorial shows how we integrate VOCAL with covSonar. We want to alert variant sets which we derived from the covSonar database.

First we setup covSonar and load genome into covSonar Database.

Next, We use the match command of covSonar to query::

Example match command

./sonar.py match --db test.db \
--tsv > outputs/covSonar-match.tsv
or

Example match command with meta information

./sonar.py match --db  test.db \
--submission_date 2022-05-01:2022-05-07 \
--tsv > outputs/covSonar-match.tsv

Then, we have to convert covSonar output into the VOCAL format.

python  vocal/Selector.py convert-covSonar \
    -i outputs/covSonar-match.tsv \
    -a data/table_cov2_mutations_annotation.tsv \
    --cpus 8 \
    -o outputs/variants-with-phenotype-sc2-global.tsv

Finally, we can normally alert the dataset

Rscript --vanilla "vocal/Script_VOCAL_unified.R"  \
    -f outputs/variants-with-phenotype-sc2-global.tsv \
    -o outputs/ 
and later generate report as usual.
    python  vocal/Reporter.py  \
        -s outputs/vocal-alerts-samples-all.csv \
        -c outputs/vocal-alerts-clusters-summaries-all.csv \
        -o outputs/vocal-report.html 

🔚


How to use VOCAL-AutoMode (ML prediction.)

We use a simple decision tree model trained on positive information. The model is located at vocal/models/DT.best_estimator.PS.pkl

During a VOCAL prediction, please use vocal/Script_VOCAL_unified.PS.R to generate features for the ML model.
please see Run VOCAL PS.

python vocal/VOCAL-ML.py -i results/vocal-alerts-samples-all.PS.csv  -o results/vocal-alerts-samples-all.pred.PS.csv
In case, we want to analyse a cluster file (vocal-alerts-clusters-summaries-all.csv) as well.
python vocal/VOCAL-ML.py  --cluster-file -i results/vocal-alerts-clusters-summaries-all.PS.csv  -o results/vocal-alerts-clusters-summaries-all.pred.PS.csv  

The result of the prediction will be appended in a column of the output file. (namely ML_concern)

  • 0 = not need to worry
  • 1 = dangerous/deleterious

🔚