r2dt-bio / R2DT

Visualise RNA secondary structure in consistent, reproducible and recognisable layouts
https://r2dt.bio
Apache License 2.0
65 stars 11 forks source link

Feature request: Download RNA2D schema from R2DT widget #101

Closed Psirving closed 3 weeks ago

Psirving commented 1 year ago

Hi! First of all, thank you so much for building this tool. The layouts look awesome!

I'm developing a python package to analyze and explore RNA structure data in Jupyter and to create figures for publication: RNAvigate. It includes support for RNA2D data schema files.

Is there a way to obtain these files without installing R2DT locally. If not, could you make this format available via the R2DT widget? Any web-based access option would be helpful.

AntonPetrov commented 1 year ago

@Psirving Hi Patrick! Thank you for reaching out, I am actually a big fan of RNAvigate! I saw your RNA Society poster and was very impressed.

It is possible to fetch R2DT results in the RNA 2D JSON Schema format. For example, if you submit a sequence to the R2DT API: https://www.ebi.ac.uk/Tools/common/tools/help/index.html?tool=r2dt

you get a job id like r2dt-R20230726-220347-0839-95483427-p1m.

Then once the results are ready, the JSON schema file can be fetched like this: https://www.ebi.ac.uk/Tools/services/rest/r2dt/result/r2dt-R20230726-220347-0839-95483427-p1m/json

This also works for jobs submitted using the R2DT web app at https://rnacentral.org/r2dt as it uses the same API under the hood.

Would this work for you? Thanks again for using R2DT.

Psirving commented 1 year ago

Thank you, I'm glad you like RNAvigate! Did we meet at my poster? If I had realized who you were, I would've liked to pick your brain about making a web server for RNAvigate.

This is super helpful and exactly what I was looking for. I think this is the method that I had figured out but forgot how to do. I will include these instructions in the RNAvigate documentation.

A couple of notes:

Below is the Linezolid binding site in B. sub LSU mapped by chemical probing: image

AntonPetrov commented 1 year ago

Thanks Patrick, glad it was helpful!

If I had realized who you were, I would've liked to pick your brain about making a web server for RNAvigate.

Never too late, I am always happy to jump on a call and chat about RNA.

I think this is the method that I had figured out but forgot how to do. I will include these instructions in the RNAvigate documentation.

I will also add this to the R2DT API docs.

I tried to use the sequence from 6AH1 chain A, (B. subtilis subtilis LSU: 6HA1_LSU.txt) but R2DT could not find a matching template

I will investigate why it's not finding a template, thank you for reporting it.

I couldn't find a job ID on that page, so I downloaded the fasta and resubmitted to R2DT

That's the way to go, RNAcentral does not store the 2D schema files at this time.

A 'Save RNA2D' button in the widget would be a nice feature for a future version.

I agree, there should be a Save dropdown menu with several options (the existing SVG and PNG plus an additional JSON option). @blakesweeney @carlosribas What do you think? We would also need an Edit dropdown soon 🤫

Below is the Linezolid binding site in B. sub LSU mapped by chemical probing

Looks very cool! 👏👏👏

blakesweeney commented 1 year ago

Being able to save all the data R2DT can produce would be useful, I will add it to our todo list.

AntonPetrov commented 3 weeks ago

This has been implemented - thank you @carlosribas! 👏

One can now download JSON, SVG, PNG, and thumbnail files using a new dropdown menu or right click to copy the URLs:

Image

The API docs also include instructions about how to fetch JSON programmatically: https://docs.r2dt.bio/en/latest/api.html

Psirving commented 3 weeks ago

This is awesome, thanks! @vonboss, I think you asked me about the API.