Add MWTabFile.download_results_file() for programmatic results file download#15
Add MWTabFile.download_results_file() for programmatic results file download#15sagarbasnet74 wants to merge 1 commit into
Conversation
|
Thank you for this pull request. |
|
Thank you for the feedback, Dr. Moseley! That makes sense — keeping REST operations in mwrest.py maintains cleaner separation of concerns. |
|
Hi Dr. Moseley,
Thank you for the quick feedback on PR #15. I completely agree that
implementing results file download through mwrest.py is architecturally
cleaner — my MWTabFile approach was pragmatic but your modular design is
better long-term.
I'd love to learn more about your planned mwrest implementation and discuss
where I could contribute most effectively — whether that's building out the
mwrest version, writing tests for it, or other projects in the lab's
pipeline like kegg_pull or rcha_metab.
To be direct: I am applying to the MS in Bioinformatics program at the
University of Kentucky and would very much like to join your lab. I have
hands-on computational research experience, and your work on metabolomics
pipelines, multi-omics integration, and open-source scientific tooling sits
exactly at the intersection of what I want to spend the next several years
on.
Beyond the results file downloader, I also explored extending mwtab with a
Polars backend for the pandas bridge (for faster large-scale metabolite
data processing) and a KEGG cross-annotation module via kegg_pull — both
motivated by gaps I noticed while working through the codebase. I'd welcome
your thoughts on whether these directions align with the lab's roadmap.
I am attaching my CV and would be grateful for 15 minutes of your time to
discuss both the technical work and potential fit in your lab.
Thank you for building mwtab and making it open — it is genuinely one of
the most well-engineered research codebases I have worked with.
Best regards,
Sagar Basnet
GitHub: https://github.com/sagarbasnet74
…On Tue, 9 Jun 2026 at 06:39, Hunter Moseley ***@***.***> wrote:
*hunter-moseley* left a comment (MoseleyBioinformaticsLab/mwtab#15)
<#15 (comment)>
Thank you for this pull request.
Due to your prodding, we are looking to add the results file download
functionality into the API.
However, we will probably implement it through the mwrest submodule.
—
Reply to this email directly, view it on GitHub
<#15?email_source=notifications&email_token=A4ERHUBICZN5MB4C5B55ETT465N3PA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVGQ4TKMZZGM3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4654953936>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4ERHUHKVMNOAXHLLMKIC6T465N3PAVCNFSM6AAAAACZ5AK2YSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMNJUHE2TGOJTGY>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/A4ERHUCGWEXSYSQFWDHH5AD465N3PA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVGQ4TKMZZGM3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/A4ERHUGTX6EYBQ6U3A5AZ3T465N3PA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVGQ4TKMZZGM3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I ended up moving the results file downloading into the MWRESTFile class, so it is now available there and through the read_mwrest function in the fileio module. I only had it in the CLI because I couldn't really imagine a use case where it would be needed in the API. I would expect that anyone wanting to work with these files would just use the CLI to grab them and then manipulate them programmatically. Any code written to download anything programmatically is just duplicating what the CLI already does, so it just seems unlikely to me that someone would reinvent the wheel for that. Even though we won't be using it, I do have some feedback on the code you wrote if you are interested. None of this is meant to criticize or be negative.
Note that after my next commit "download_and_save_mwrest_file" changes a lot since I moved the results file stuff to MWRESTFile. |
|
Sagar, Let's move the rest of your discussion off this issue and into email. |
Summary
The CLI supports
--results-filesbutMWTabFilehas no programmatic way to download results files. This PR addsMWTabFile.download_results_file()to fill that gap.Changes
download_results_file()toMWTabFileclass insrc/mwtab/mwtab.pystudy_idandanalysis_idmanaged propertiesMS_RESULTS_FILEandNMR_RESULTS_FILEsectionsrequests.Sessionfor connection poolingfilenamekeyTests
tests/test_download_results_file.pyUsage