g-browser
v0.5.9
Published
## On our website
Downloads
172
Readme
Usage
On our website
The genome browser is available online at https://exbio.wzw.tum.de/genome-browser
As npm package
The npm package including documentation can be found here.
As iframe
You can embed the genome browser as iframe in your website. The following example shows how to embed the genome browser
<iframe src="https://igv-proxy.epistasis-disease-atlas.com/genome-browser?genome=hg38"></iframe>
Controlling the iframe
The iframe can be controlled by sending messages to it. In general, messages can be sent like this:
const iframe = document.querySelector('iframe');
const message = {
type: 'messageType',
data: {
// ...
}
};
iframe.contentWindow.postMessage(message, '*');
Available message types
| messageType | Description | Data format |
|----------------------|---------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| file
| Adds a file to the genome browser | { name: string; url: string; type: string; format?: string; color?: string;}
|
| genome
| Sets the genome assembly for the genome browser | string
|
| additionalLink
| Allows to manually add a link to an external resource. Will appear next to the "Copy permalink" button. | string
|
| additionalLinkName
| Sets the button title for the "additionalLink" button | string
|
| id
| Triggers the Genome browser to load a given state uid | string
|
| save
| Triggers the Genome browser to save its current state and copy the state uid to the user clipboard. | No data required |
| genes
| Adds a list of gene symbols to the genome browser | string[]
|
| snps
| Adds a list of RS-IDs to the genome browser | string[]
|
Development
This project was generated with Angular CLI version 14.1.3.
Development server
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you
change any of the source files.
Code scaffolding
Run ng generate component component-name
to generate a new component. You can also
use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Running unit tests
Run ng test
to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a
package that implements end-to-end testing capabilities.
Further help
To get more help on the Angular CLI use ng help
or go check out
the Angular CLI Overview and Command Reference page.