Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPV analysis #13

Open
katholt opened this issue Jan 24, 2025 · 1 comment
Open

PPV analysis #13

katholt opened this issue Jan 24, 2025 · 1 comment

Comments

@katholt
Copy link
Contributor

katholt commented Jan 24, 2025

Created function solo_ppv_analysis (in file solo_ppv.R)

  • works with input geno & pheno tables in standard format output by import_ncbi_ast and parse_amrfp parsers
  • uses getBinMat to create contingency tables for specified drug and class/es
  • finds solo markers
  • creates solo stats table (x, N, p, 95% CI - for resistance (R vs I/S) and nonwildtype (R/I vs S)
  • creates plots showing distribution of S/I/R phenotypes, and PPV (with 95% CI), for each solo marker

This replaces AMRgen_PPV_plots_v5.R which can now be archived

Notes for development

  • uses getBinMat, which currently defines nonwildtype as R/I vs S, need to accommodate alternative definitions e.g. from a user-specified column or as.sir interpretations using ECOFF
  • would be helpful to add smart features like auto-detecting the right columns to use as drug_agent, drug_class, antibiotic, sir etc instead of assuming or asking users for colnames (same as getBinMat)
  • might be helpful to pull out some steps into functions, that could be access directly without running the whole analysis, if we find they are useful in other analysis/plotting functions
@katholt
Copy link
Contributor Author

katholt commented Jan 24, 2025

updated getBinMat to include the SIR calls in the output (column named pheno, class sir)

so can now update solo_ppv_stats to use this column rather than adding it to the output of getBinMat - DONE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant