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

Small comments #1

Open
douweschulte opened this issue Apr 28, 2022 · 2 comments
Open

Small comments #1

douweschulte opened this issue Apr 28, 2022 · 2 comments

Comments

@douweschulte
Copy link
Collaborator

Nice to see how this works. It looks very nicely contained and structured in this way. Also the opening of the files looks nice with this conversion to a BufReader.

Small comments:

  • Technically speaking the residue sequence number is not unique, if coupled to the insertion code it is unique. This can be retrieved by using the Residue::id method. It is hard to return this type with wasm_bindgen, but be prepared to find a single PDB with duplicate residue sequence numbers. (Idea: just crash when you detect one of these, so it cannot go wrong in any other way.)
  • I found a nice crate in the meantime: https://crates.io/crates/serde-wasm-bindgen, this allows any struct that implements Serde::Serialize to be passed to the Java/typescript side. So that would enable you to directly throw the full PDB to the other side, or use more intricate structures Vec<String> in your PDBInfo.
@douweschulte
Copy link
Collaborator Author

I hope you do not mind the uninvited commentary, I am just very interested in how this Wasm stuff works and if changes to pdbtbx are needed. And feel free to reach out (or tag me in an issue/PR) if you have questions about Rust stuff I would be happy to help.

@sverhoeven
Copy link
Member

Comments are welcome,

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

No branches or pull requests

3 participants