dosorio / Peptides

An R package to calculate indices and theoretical physicochemical properties of peptides and protein sequences.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature request

cbroeckl opened this issue · comments

Hello,
I come from the world of small molecules and occasionally deal with peptides. Two requests for the very nice Peptides package. Given an AA sequence I can retrieve the MW of the peptide, but what would be better still is the (1) molecular formula and (2) some digital representation of the structure - SMILES would probably be easiest, though inchi would be an option too. I would guess that formula would be much easier than structure, but I figured I might as well place the request for both! Thanks for putting this together!
Corey

Hey @cbroeckl, thanks for the suggestion. Let me see what can I do.

based on this reference, adding support for smile strings would be reasonably easy, just some basic string manipulation could be enough .... (assuming canonical linear peptides) https://www.ncbi.nlm.nih.gov/pubmed/29186902 . The I guess the issue would be to check if the generated strings are canonicalized SMILES.

An additional thing to consider would be under what interface should those pieces of information be available ... (a new function? add it to the standard print of a peptide object ? what do you want it to return, list/string/formal object ...)

Let me know if you want me to help.
Best,
Sebastian

Hey @jspaezp

Thanks for the reference. I think it should be a new function in the package. At the moment, I don't have enough time to do it, but if you can code the skeleton of the function, I can help with the documentation and packing.

Best,

Daniel

hey @dosorio and @cbroeckl

I think i have a working version of the functions, only question is how you want to handle non-standard aminoacid codes passed to the function .. (what error do you want to pop when "Z" is passed, should I support J and O, right now i left them aside for consistency with the rest of the package).

It builds, passes tests and checks in travis

travis build link:
https://github.com/jspaezp/Peptides/tree/feature_smiles_string_export

link to my fork feature branch:
https://travis-ci.org/github/jspaezp/Peptides/jobs/687073465

let me know if it is ready to go into a PR

Best,
Sebastian

Hi @jspaezp

Awesome! As always, your code works like a charm. I tested it on Win64.

Please submit the PR. I will submit the new version to CRAN by the end of the month.

Best,

Daniel

Hello all
I found a workaround for this some time ago for those immediate needs, but wanted to come back to thank you for the efforts on this request - I am sure I will be using it in the future!
Corey