lazear / sage

Proteomics search & quantification so fast that it feels like magic
https://sage-docs.vercel.app
MIT License
201 stars 38 forks source link

slightly better error messages for missing arguments and files #65

Closed Elendol closed 1 year ago

Elendol commented 1 year ago
Error: Failed to read parameters from `missing_file.json`

Caused by:
    IO error: No such file or directory (os error 2)
Elendol commented 1 year ago

you may want to squash my commits

lazear commented 1 year ago

Definitely going to squash!

Elendol commented 1 year ago

as of now we get this error message with problematic mzML files

; cargo run -- tests/config.json tests/LQSRPAAPPAPGPGQLTLR.mzML tests/aa.mzML tests/bb.mzML s3://beep
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `target/debug/sage tests/config.json tests/LQSRPAAPPAPGPGQLTLR.mzML tests/aa.mzML tests/bb.mzML 's3://beep'`
[2023-05-09T21:48:24Z INFO  sage] generated 1845 fragments in 6ms
[2023-05-09T21:48:24Z INFO  sage] processing files 0 .. 4 
Error: Failed to process mzML files

Caused by:
    Processing chunk 0 failed
        Failed to process `tests/aa.mzML`: IO error - No such file or directory (os error 2)
        Failed to process `tests/bb.mzML`: IO error - No such file or directory (os error 2)
        Failed to process `s3://beep`: S3 error - failed to construct request - key was missing: cannot be empty or unset
lazear commented 1 year ago

Awesome, thanks!

Sorry to flip flop... but I realized yesterday I have a couple of workflows that actually depend on sage not failing if files are missing (incremental searching of datasets as they come off MS...). I'll try to keep the most recent commit in the git history in case we want to use it in the future. I will try to squash and merge everything today

Elendol commented 1 year ago

cool, no problem, you might want to work on a proper refactor to different checks and errors, not just something a bit hacky about the files being present.

lazear commented 1 year ago

Ok, I squashed your branch and merged it in - I'm closing this one without merging.

Thanks again!