The mason components needed to run the solgenomics.net website
brapi-pedigree-viewer's Introduction
brapi-pedigree-viewer's People
brapi-pedigree-viewer's Issues
Add color coded tiles to each nodes for representing genotypic (and other) information
Add color coded tiles to each nodes for representing genotypic information. Maximum 10 tiles / accession. Should be able to represent any color value, but for most genotyping apps, 3 should be enough. Position under node? For marker data, the markers to represent in the tiles could be read from a MarkerSet (chosen from a select box of available MarkerSets)
Convert to Angular
Hi,
I am going to convert the pedigree viewer into an Angular based tool, and I am new to this area. Would you like to give some hints? Like where should I start and which part should I be aware of?
Thank you!
Kyra Zhang
Use pedigree viewer with Angular applications
Hello @dauglyon ,
I am trying to import and use this tool inside Angular 7 application. In browser console, I have this error message concerning the use of "PedigreeViewer()" function:
ERROR TypeError: "Object(...) is not a function"
ngOnInit genealogic-tree.component.ts:23
Angular 5
checkAndUpdateDirectiveInline
checkAndUpdateNodeInline
checkAndUpdateNode
debugCheckAndUpdateNode
debugCheckDirectivesFn
View_GermplasmCardComponent_1 GermplasmCardComponent.html:778
Angular 27
RxJS 5
Angular 11
GermplasmCardComponent.html:750:2
View_GermplasmCardComponent_1 GermplasmCardComponent.html:750
Angular 15
RxJS 5
Angular 11
I created a component genealogic-tree with the following file genealogic-tree.component.ts:
import { Component, Input, OnInit } from '@angular/core';
import { BrAPI } from '@solgenomics/brapijs';
import { PedigreeViewer } from '@solgenomics/brapi-pedigree-viewer';
import { BrapiGermplasm } from '../models/brapi.model';
import { BrapiService } from '../brapi.service';
@Component({
selector: 'faidare-genealogic-tree',
templateUrl: './genealogic-tree.component.html',
styleUrls: ['./genealogic-tree.component.scss']
})
export class GenealogicTreeComponent implements OnInit {
@Input() germplasmId: String;
constructor(private brapiService: BrapiService) {
this.germplasmId = 'aHR0cHM6Ly9kb2kub3JnLzEwLjE1NDU0L01FQVJBUw%3D%3D';
}
ngOnInit() {
const pdg = PedigreeViewer(
/*REQUIRED Server: BrAPI.js handle for target endpoint*/
BrAPI('http://localhost:8380/faidare-dev/brapi/v1'),
// this.brapiService,
/*OPTIONAL a function which returns a link to a germplasm information page,*/
function() {
return 'http://localhost:4200/faidare-dev/germplasm?id=aHR0cHM6Ly9kb2kub3JnLzEwLjE1NDU0L01FQVJBUw%3D%3D';
}
);
if (pdg != null) {
pdg.newTree(
// REQUIRED root germplasmDbId of germplasm which should be displayed on start (highlighted in pink)
this.germplasmId
);
pdg.drawViewer(
// REQUIRED selector for the parent node of the new viewer SVG element.
'div#pdgv-wrap',
// OPTIONAL width of viewer
800,
// OPTIONAL height of viewer
400
);
}
}
}
In genealogic-tree.component.html':
<div id="pdgv-wrap"></div>
And in the germplasm-card.component.html, I added a selector:
<div>
<faidare-genealogic-tree [germplasmId]="germplasmGnpis.germplasmDbId"></faidare-genealogic-tree>
</div>
Thanks for your attention
Mélanie Buy
Commands not working in Windows 10
Hi,
When I was trying to install BrAPI pedigree viewer in visual studio code environment in windows 10, the "rm", "-rf", "cp" commands did not work and they were not recognized in windows.
Error shown like this:
'cp' is not recognized as an internal or external command,
Thank you for your attention!
Kyra Zhang
Make nodes selectable
Make nodes selectable so that actions can be run on a group of nodes, such as a link to a haplotype viewer
Loading progeny of many-progeny germplasm is too slow.
Question about required calls
Hi @dauglyon ,
This is a very promising BrAPP! I'm very keen in replacing in replacing the BMS current pedigree viewer with this.
One question: I see in your demo gif that you're traversing the tree in both directions, so it seems to me like the code must be relying on the Pedigree call to get parents and the yet to be brapified Progeny call to get the progenies. Am I right?
If that's the case I'll can forward with implementing the Pedigree call in BMS as it is defined now and wait for the progeny spec to to be Merged.
Once again, thanks so much for sharing this high quality tools with the community!
make compatible with brapi v1.2
main problem to fix is use parent1DbId and parent2DbId instead of parent1Id and parent2Id in the pedigree call. also use germplasmDbId and defaultDisplayName instead of progenyGermplasmDbId in the progeny call.
https://brapi.docs.apiary.io/#reference/germplasm/germplasm-pedigree/germplasm-pedigree-by-id
https://brapi.docs.apiary.io/#reference/germplasm/germplasm-progeny/germplasm-progeny-by-id
for future implementation: brapi pedigree call now includes "siblings" as an array in the response
Type "null" for progeny field in progeny object instead of empty array
Hi,
In our BrAPI endpoint at URGI, the germplasm without progeny have this sort of result:
{
"result":
{"germplasmDbId": "aHR0cHM6Ly9kb2kub3JnLzEwLjE1NDU0L0ZLSEFZSA==",
"defaultDisplayName": "662200176",
"progeny":null
}"
Theses cases cause problems with pedigree viewer:
TypeError: "ped_pro_germId[1].progeny is null"
Thank you for your attention,
Mélanie Buy
Version Not Defined in PedigreeViewer.js
Utilizing the latest commit of BrAPI-Pedigree-Viewer (as opposed to pulling from NPM) results in a version is not defined error.
It seems the PedigreeViewer.js in BrAPI-Pedigree-Viewer is out of sync with the version on sgn. The BrAPI-Pedigree-Viewer received the update to retrieve parent nodes differently depending on BrAPI version but the version is not passed in.
PedigreeViewer.js?fda6:147 Uncaught (in promise) ReferenceError: version is not defined
at eval (PedigreeViewer.js?fda6:147:1)
at eval (BrAPI.js?f10b:833:1)
at eval (BrAPI.js?f10b:675:1)
at Array.forEach (<anonymous>)
at Filter_Node.publishResult (BrAPI.js?f10b:674:1)
at eval (BrAPI.js?f10b:805:1)
at eval (BrAPI.js?f10b:675:1)
at Array.forEach (<anonymous>)
at Join_Node.publishResult (BrAPI.js?f10b:674:1)
at eval (BrAPI.js?f10b:900:1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.