hivdb / covid-drdb-payload

A relational database of SARS-CoV-2 resistance data.
Creative Commons Attribution Share Alike 4.0 International
7 stars 9 forks source link

Can I find csv files for 3CLpro and RdRP inhibitor resistance mutations? #1022

Closed jonbra closed 6 months ago

jonbra commented 6 months ago

Hi, Thanks for your great service maintaining this resource. Today I use R and SQL to query your database and extract a table called "resistance_mutations":

# Retrieve the table "resistance_mutations"
res_muts <- tbl(SARSCOV2DB, "resistance_mutations") %>% 
  collect()

I then use this table to get the relevant mutations for 3CLpro and RdRP.

But I was wondering if this table might already be available as a csv file on this repo? I can't see it in the "tables" directory.

Thanks,

Jon

KaimingTao commented 6 months ago

Hi @jonbra, thanks for using our database. The resistance_mutations table doesn't have corresponding csv file, it's generated by applying the rules

  1. the fold change of drug potency is >= 2.5
  2. the mutation is seleted in vitro or in vivo for at least 2 times among all references.

You can find the code here: https://github.com/hivdb/covid-drdb/blob/master/derived_tables/07_3clpro_resistance_mutations.sql https://github.com/hivdb/covid-drdb/blob/master/derived_tables/08_rdrp_resistance_mutations.sql

jonbra commented 6 months ago

Thanks @KaimingTao. This is just brilliant!