-
Notifications
You must be signed in to change notification settings - Fork 13
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
BrAPI Wittenberg Hackathon 2024 notes #372
Comments
2024Apr12 : https://github.com/solgenomics/BrAPI-js Some notes for the BrAPI client side (Pretzel frontend) https://github.com/solgenomics/BrAPI-js#available-brapi-methods
The current BrAPI interface is via these sources : The allelematrix / allelematrices functions may be added in those files, or possibly separate files depending on how related they are. I've sketched out some server side functions also. They would utilise these functions to process the data, and use @solgenomics/BrAPI-js to package into BrAPI responses : links 2024Apr15 : Overview of API requests and data flows for genotype / germinate / BrAPIThe Genotype Table is implemented by Germinate is added as a Data Source in the frontend; this is parallel to the Pretzel server data source which is the primary server for Pretzel requests. (This Germinate BrAPI connection has been used both on the frontend and the backend - the first implementation connected from the Pretzel server to Germinate to implement the genotype requests from the Pretzel frontend client). The additions for the hackathon are : use @solgenomics/BrAPI-js in Pretzel frontend to the backend to
DetailsPretzel frontend GUI clientvcf-feature.js : components/panel/ manage-genotype.js : API endpoints :
Pretzel Server :common/models/block.js : Block. :
Pretzel frontend GUI client (can also be used in Pretzel Server) :
frontend/app/utils/data/ germinate-genotype.js
|
Following on from Mahdi's post : we can add those endpoints to the express server. This is a good exercise for people to get familiarity with the server side of pretzel, including npm install / build / run. The express test server is @plantinformatics/vcf-genotype-brapi/test/server/
e.g. test server with :
The server has port 3000 hard-wired; another useful task would be to add configuration parameters for port and vcfDir, perhaps others, using command-line arg parsing or environment variables, At this stage we just want to receive and trace the request parameters, and send back a static json. |
Also the data model for BrAPI and VCF are fairly different, and we need to think about how we will map the request parameters to the VCF filename + chr name + sample names. These parameters I think have simple interpretations :
Maybe someone can think about how these relate :
The goal is to be able to translate the BrAPI /allelematrix request parameters to bcftools request parameters. |
Design diagram showing the Genotype web API requests : Custom API and BrAPICustom APIsequenceDiagram
participant C as Pretzel Frontend GUI
participant S as Pretzel Server
C->>S: Blocks/vcfGenotypeLookup
create participant B as bcftools
S->>B: bcftools query or view
destroy B
B->>S: VCF result
S->>C: VCF result
BrAPIsequenceDiagram
participant C as Pretzel Frontend GUI
participant S as Pretzel Server
C->>S: brapi/v2/search/allelematrix
create participant B as bcftools
S->>B: bcftools query or view
destroy B
B->>S: VCF result
S->>C: allelematrix result
For editing those mermaid diagrams: doc |
Status :
Using BrAPI from the frontend GUI enables collation of datasets from additional data sources : classDiagram
PretzelFrontendGUI <|-- PretzelServer
PretzelFrontendGUI <|-- Gigwa
PretzelFrontendGUI <|-- local_VCF_Genotype_Brapi_micro_server
PretzelFrontendGUI <|-- DivBrowse
PretzelFrontendGUI : multiple BrAPI Data Sources
class Gigwa{
}
|
Achievements to date:
Ability to connect Pretzel web app GUI to a BrAPI server, a self-hosted Gigwa instance, as an additional data source. Display after connecting to a BrAPI datasource : API requests which are sent, based on existing connection type 'Germinate'.
Result of requesting datasets from BrAPI server, and after the user selects one dataset, requesting the list of chromosomes of the dataset :
Result of requesting samples of a selected dataset from BrAPI server : API interaction : request samples of a selected dataset :
Display of SNP / Variant additionalInfo from /allelematrix result : API interaction : /allelematrix result, showing SNP / Variant additionalInfo in result.data additionalInfo and alternateBases and referenceBases : Next steps:
Source repository branchThe work for the BrAPI Hackathon 2024 was done in : Pretzel branch : feature/useBrAPI
|
Further configuration of package dependencies for library factored out to @plantinformatics/vcf-genotype-brapiac6b894 add plantinformatics dependencies, update package version to 1.0.4 |
Notes for work done as part of the BrAPI Hackathon held April 15-19, 2024 in Wittenberg, Germany. Pretzel team attending remotely.
Aim
Expand support for BrAPI within Pretzel. As a starting point, look to support /allelematrix endpoint in the backend and server to front end.
The text was updated successfully, but these errors were encountered: