rki-mf1 / vocal

Vocal is a simple Variants Of Concern ALert system script. Doc https://rki-mf1.github.io/vocal-doc/
5 stars 1 forks source link

document metadata creation from covsonar table #10

Closed huguesrichard closed 4 days ago

huguesrichard commented 1 week ago

The documentation for VOCAL details nicely the use of the selector.py function to generate a table of mutation that is VOCAL compatible from a covsonar match table (VOCAL tool/Ecosystem section)

However the Script_VOCAL_unified.R function should make use of the metadata that is usually in the covsonar file: sample ID, geolocation, sampling date and lineage annotation. My quick fix for the moment is to use a awk script to generate another metadata table

awk -v FS='\t' -v OFS='\t' 'NR==1 {print "ID", "PRIMARY_DIAGNOSTIC_LAB_PLZ", "SAMPLING_DATE", "LINEAGE"} NR>1 {print $1, $15, $16, $18}' covsonar_database_results.tsv > covsonar_metadata_information_extracted.csv

The best thing would be to do that directly in the Selector.py function such that it can output two table files.

chkirschbaum commented 4 days ago

The new preprocessing step checks if a metadata file contains at least the ID and LINEAGE column. If not, it checks if the header fits a covsonar file and runs this command if it does.