@rcsb/rcsb-saguaro-app

6.0.14 • Public • Published

rcsb-saguaro-app

RCSB Saguaro Web Application is an open-source library built on the top of the RCSB Saguaro 1D Feature Viewer and designed to display protein features at the RCSB Web Site. The package collects protein annotations from the 1D Coordinate Server and the main RCSB Data API and generates preconfigures Protein Feature Summaries. The package allows access to RCSB Saguaro methods to add or change displayed data.

When using rcsb-saguaro, please cite:

Joan Segura, Yana Rose, John Westbrook, Stephen K Burley, Jose M Duarte. RCSB Protein Data Bank 1D tools and services, Bioinformatics, 2020; https://doi.org/10.1093/bioinformatics/btaa1012

Node Module Installation

npm install @rcsb/rcsb-saguaro-app

CDN JavaScript

<script src="https://cdn.jsdelivr.net/npm/@rcsb/rcsb-saguaro-app@6.0.0/build/app.min.js" type="text/javascript"></script>

Testing

  • npm install
  • npm run devServer
  • Go to http://localhost:9000/UniprotGroupFv.html

JavaScript Examples

The full collection of examples can be edit and modified at CODEPEN

Library Documentation

TypeScript classes documentation can be found here.

Main Class and Methods

RcsbFvWebApp calss provides a collection of methods to display preconfigured features over PDB and UniProt sequences as displayed at RCSB PDB web site. Additionally, it allows to configure board size and set up feature click events.

  • RcsbFvWebApp.buildUniprotFv(elementId: string, upAcc: string)

  • RcsbFvWebApp.buildEntityFv(elementId: string, entityId: string)

  • RcsbFvWebApp.buildInstanceFv(elementId: string, instanceId: string)

  • RcsbFvWebApp.buildUniprotEntityFv(elementId: string, upAcc: string, entityId: string)

  • RcsbFvWebApp.buildUniprotEntityInstanceFv(elementId: string, upAcc: string, entityId: string, instanceId: string)

  • RcsbFvWebApp.setBoardConfig(boardConfigData: RcsbFvBoardConfigInterface)

  • RcsbFvWebApp.getRcsbFv(elementId: string)

GraphQL configuration

Building TypeScript interfaces
  • Files ["src/RcsbServerConfig/codegen.borrego.json", "src/RcsbServerConfig/codegen.yosemite.json"]
  • Borrego Interfaces: graphql-codegen --config src/RcsbServerConfig/codegen.borrego.json
  • Yosemite Interfaces: graphql-codegen --config src/RcsbServerConfig/codegen.yosemite.json
  • Generated Sources: "src/RcsbGraphQL/Types"
IntelliJ schemas
  • Config Files: ["src/RcsbGraphQL/Queries/Borrego/.graphqlconfig", "src/RcsbGraphQL/Queries/Yosemite/.graphqlconfig"]
  • Generated Schemas: ["src/RcsbGraphQL/Queries/Borrego/schema.graphql", "src/RcsbGraphQL/Queries/Yosemite/schema.graphql"]

New RCSB data-api request method

  • A new graphql query defined in src/RcsbGraphQL/Queries/Yosemite (e.g. QueryAssemblyInterfaces.graphql)
  • A new request class using rcsb-api-tools defined in src/RcsbGraphQL (e.g. RcsbQueryAssemblyInterfaces.ts)
  • A new method in the RcsbClient class defined in src/RcsbGraphQL/RcsbClient.ts (e.g. requestAssemblyInterfaces)
    • This method must used the request class defined above
  • A new collector class based on the request class in src/RcsbCollectTools/Translators (e.g. AssemblyInterfacesCollector)
    • This class must call the method defined above
    • This class may transform the RCSB data-api schema into a more convenient interface
  • A new translator class defined in src/RcsbUtils (e.g. AssemblyInterfacesTranslate)
    • The constructor gets the data collected by the above class
    • The class exposes the methods needs to provide the relationships between RCSB objects of different granularity
  • A new method in the RcsbRequestContextManager defined in src/RcsbFvWeb/RcsbFvBuilder
    • This method must avoid duplicate requests

Testing

Different testing example are available in the src/RcsbFvExamples folder

  • npm install
  • npm run devServer

Go to:

  • http://localhost:9000/EntitySummaryFv.html
  • http://localhost:9000/InstanceSequenceFv.html
  • http://localhost:9000/UniprotGroupFv.html ...

Contributing

All contributions are welcome. Please, make a pull request or open an issue.

License

The MIT License

Copyright (c) 2019 - now, RCSB PDB and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Versions

Current Tags

Version History

Package Sidebar

Install

npm i @rcsb/rcsb-saguaro-app

Weekly Downloads

102

Version

6.0.14

License

MIT

Unpacked Size

8.71 MB

Total Files

828

Last publish

Collaborators

  • chunxiao.bi
  • bioinsilico
  • yana.rose
  • sebastian.bittrich