Open TheLostLambda opened 6 months ago
@Ankur-AVP-Patel is being set off on this adventure now, but is waiting on @smesnage for some examples / test cases!
There it is. Attached is an example of what we are dreaming of. All relevant info (ftrs, database and model output) is in the shared drive: "G:\Shared drives\PG Mass Spec Analysis\PGFinder wishlist\Automation consolidation (for Ankur)" Please @Ankur-AVP-Patel , get in touch if you have any questions!
Here are some pointers that I think might help with the implementation!
The goal is to generate an extra, consolidated CSV file when several datasets are uploaded and an "Advanced > Consolidation" option is ticked. If you uploaded three datasets, enabled consolidation, then ran PGFinder, it should download four files. Three of those will be the three it returns now (one CSV file per dataset), and the fourth will be the consolidation of those other three.
The place to loop into this is here: https://github.com/Mesnage-Org/pgfinder/blob/a334000b23fa7a676c0bfb93b40218341e5f7dc7/lib/pgfinder/gui/shim.py#L17-L36
pyio
import that stores the bool for whether you should consolidate or notmsData
analyze
to return a tuple of the original dataframe (matched
) as well as the CSV, then you just need to take a DataFrame and don't need to do any more CSV parsingWriting the actual consolidation function should be relatively straightforward:
@smesnage should be able to supply another reference file against which to check this process!
Finally, on the web side, you'll need to add that option to the "Advanced" options for toggling this feature.
<input>
object https://github.com/Mesnage-Org/pgfinder/blob/a334000b23fa7a676c0bfb93b40218341e5f7dc7/web/src/routes/AdvancedOptions.svelte#L5-L10Pyio
type — used to shuttle data from the webUI to PGFinder: https://github.com/Mesnage-Org/pgfinder/blob/a334000b23fa7a676c0bfb93b40218341e5f7dc7/web/src/app.d.ts#L3-L10pyio
field to the button state in the<AdvancedOptions>
: https://github.com/Mesnage-Org/pgfinder/blob/a334000b23fa7a676c0bfb93b40218341e5f7dc7/web/src/routes/%2Bpage.svelte#L117-L124That should be more than enough to get started with, and I'm happy to guide whoever through the implementation!