2
2
3
3
4
4
GWASViewer is a Google Web Toolkit (GWT) widget for displaying interactive Manhattan plots.
5
- It is a composite of multiple different GWT widgets:
6
- 1 . [ dygraphs-gwt] [ 0 ] as the actual Manhattan plot and statistic plots
7
- 2 . [ GeneViewer] [ 1 ] as the gene annotation track
8
- 3 . [ LDViewer] [ 2 ] as a LD triangle viewer
5
+ It is a composite of multiple different GWT widgets:
6
+ [ dygraphs-gwt] [ 0 ] as the actual Manhattan plot and statistic plots
7
+ [ GeneViewer] [ 1 ] as the gene annotation track
8
+ [ LDViewer] [ 2 ] as a LD triangle viewer
9
9
10
10
![ GWASViewer] ( https://raw.githubusercontent.com/timeu/GWASViewer/master/gwasviewer.png " GWASViewer ")
11
11
@@ -35,17 +35,19 @@ viewer.draw(dataTable, maxScore, fdrThreshold, chrLengths);
35
35
```
36
36
37
37
### Load list of tracks and handle the track selection
38
+
38
39
` GWASViewer ` can display a list of tracks when the user opens the settings popup.
39
40
The user can set this list by using the ` setTracks ` function:
40
41
41
- ```
42
+ ``` JAVA
42
43
Tracks [] listOfTracks = // get from server for example
43
44
viewer. setTracks(listOfTracks);
44
45
```
46
+
45
47
When the user selects a track from the popup, an ` SelectTrackEvent ` event will be fired. The user can handle the event
46
48
retrieve the data from the backend and then call ` setTrackData ` to display the track:
47
49
48
- ```
50
+ ``` JAVA
49
51
viewer. addHandler(new SelectTrackEvent .Handler () {
50
52
@Override
51
53
public void onSelectTrack (SelectTrackEvent event ) {
@@ -54,6 +56,8 @@ viewer.addHandler(new SelectTrackEvent.Handler() {
54
56
}
55
57
},SelectTrackEvent . getType());
56
58
59
+ ```
60
+
57
61
The track data has to be provided as a [ gwt-charts] [ 3 ] DataTable object with 2 columns (position, and value).
58
62
59
63
### Display LD Triangle plot or LD colored values
@@ -65,13 +69,13 @@ the user can use `showColoredLDValues`. For more information refer to the [LDVie
65
69
66
70
To highlight one or multiple regions, use the ` addDisplayFeature ` function and to clear it use ` clearDisplayFeatures() ` :
67
71
68
- ```
72
+ ``` JAVA
69
73
viewer. addDisplayFeature(new DisplayFeature (" AT4G00651.1" , 271486 , 271879 , " red" ), true );
70
74
viewer. addDisplayFeature(new DisplayFeature (" Some interesting region" , 8753993 , 9241760 , " green" ), true );
71
75
```
72
76
73
77
To select one or more SNPs use ` setSelections ` and to clear ` clearSelections() ` :
74
- ```
78
+ ``` JAVA
75
79
selections. add(148 );
76
80
selections. add(1220 );
77
81
selections. add(2240 );
0 commit comments