Skip to content

Commit cc056f1

Browse files
committed
Small updates
1 parent 3152d20 commit cc056f1

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

README.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33

44
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
99

1010
![GWASViewer](https://raw.githubusercontent.com/timeu/GWASViewer/master/gwasviewer.png "GWASViewer")
1111

@@ -35,17 +35,19 @@ viewer.draw(dataTable, maxScore, fdrThreshold, chrLengths);
3535
```
3636

3737
### Load list of tracks and handle the track selection
38+
3839
`GWASViewer` can display a list of tracks when the user opens the settings popup.
3940
The user can set this list by using the `setTracks` function:
4041

41-
```
42+
```JAVA
4243
Tracks[] listOfTracks = // get from server for example
4344
viewer.setTracks(listOfTracks);
4445
```
46+
4547
When the user selects a track from the popup, an `SelectTrackEvent` event will be fired. The user can handle the event
4648
retrieve the data from the backend and then call `setTrackData` to display the track:
4749

48-
```
50+
```JAVA
4951
viewer.addHandler(new SelectTrackEvent.Handler() {
5052
@Override
5153
public void onSelectTrack(SelectTrackEvent event) {
@@ -54,6 +56,8 @@ viewer.addHandler(new SelectTrackEvent.Handler() {
5456
}
5557
},SelectTrackEvent.getType());
5658

59+
```
60+
5761
The track data has to be provided as a [gwt-charts][3] DataTable object with 2 columns (position, and value).
5862

5963
### Display LD Triangle plot or LD colored values
@@ -65,13 +69,13 @@ the user can use `showColoredLDValues`. For more information refer to the [LDVie
6569

6670
To highlight one or multiple regions, use the `addDisplayFeature` function and to clear it use `clearDisplayFeatures()`:
6771

68-
```
72+
```JAVA
6973
viewer.addDisplayFeature(new DisplayFeature("AT4G00651.1", 271486, 271879, "red"), true);
7074
viewer.addDisplayFeature(new DisplayFeature("Some interesting region", 8753993, 9241760, "green"), true);
7175
```
7276

7377
To select one or more SNPs use `setSelections` and to clear `clearSelections()`:
74-
```
78+
```JAVA
7579
selections.add(148);
7680
selections.add(1220);
7781
selections.add(2240);

0 commit comments

Comments
 (0)