Skip to content

Add functions for generating species codes and managing parquet datasets - #27

Merged
AbhirupaGhosh merged 7 commits into
mainfrom
Update_matrix_generation
Jul 31, 2026
Merged

Add functions for generating species codes and managing parquet datasets#27
AbhirupaGhosh merged 7 commits into
mainfrom
Update_matrix_generation

Conversation

@AbhirupaGhosh

@AbhirupaGhosh AbhirupaGhosh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
  • Implemented .generate3ltrCode to create abbreviated species names.
  • Added .sql_escape and .parquet_dataset_sql for SQL operations on parquet files.
  • Updated .register_parquet_views to register views from parquet datasets.
  • Refactored .parquet2Matrix and .parquet2MDRMatrix to use new functions and improve readability.

- Implemented .generate3ltrCode to create abbreviated species names.
- Added .sql_escape and .parquet_dataset_sql for SQL operations on parquet files.
- Updated .register_parquet_views to register views from parquet datasets.
- Refactored .parquet2Matrix and .parquet2MDRMatrix to use new functions and improve readability.
@AbhirupaGhosh

AbhirupaGhosh commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@amcim I have added example files in inst/extdata/

The testing example would be

generateMLInputs(parquet_dir = "inst/extdata/Shigella_flexneri/",
                 out_path = "inst/extdata/Shigella_flexneri/")

There is a remaining concern that it prints

All cross-drug testing matrices generated
All LOO-drug matrices generated with genome-level blocking

even if no matrices are generated due to data unavailability/insufficiency.

The return of the functions .parquet2CrossDrugTestMatrix and .parquet2LOODrugMatrix needs to be changed.

@amcim amcim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functioanlity of generate the matrices themselves and what you described here all works well. Approving for merge.

@AbhirupaGhosh
AbhirupaGhosh merged commit 86907ff into main Jul 31, 2026
@AbhirupaGhosh
AbhirupaGhosh deleted the Update_matrix_generation branch July 31, 2026 22:15
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

Successfully merging this pull request may close these issues.

2 participants