Skip to content

Commit 1ea6c79

Browse files
committed
Updated docs.
1 parent 2c18a72 commit 1ea6c79

File tree

9 files changed

+80
-38
lines changed

9 files changed

+80
-38
lines changed

docs/docs/api/gw-init.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ parent: API Reference
66
nav_order: 1
77
---
88

9-
# Gw Class
9+
## Gw Class
10+
11+
`Gw(reference, **kwargs)`
1012

1113
The `Gw` class is the main interface to libgw (GW). Initialise the GW object
1214
with a reference genome and optional parameters.
1315

14-
### `Gw(reference, **kwargs)`
1516

1617
**Parameters:**
1718
- `reference` (str): Path to reference genome file or genome tag
@@ -25,8 +26,9 @@ gw = Gw("reference.fa", theme="dark", threads=4,
2526
```
2627
---
2728

29+
## onlineGenomeTags
2830

29-
### `onlineGenomeTags()`
31+
`onlineGenomeTags()`
3032

3133
Returns a dictionary of available online reference genome tags. Use a local genome
3234
for much better performance.

docs/docs/api/gw-interactive.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ nav_order: 7
88
---
99

1010
# Interactive Controls
11+
{: .no_toc .text-delta }
1112

1213
## Table of contents
1314
{: .no_toc .text-delta }
@@ -17,7 +18,8 @@ nav_order: 7
1718

1819
---
1920

20-
### `apply_command(command)`
21+
### apply_command
22+
`apply_command(command)`
2123

2224
Apply a GW command string.
2325

@@ -26,7 +28,8 @@ Apply a GW command string.
2628

2729
---
2830

29-
### `key_press(key, scancode, action, mods)`
31+
### key_press
32+
`key_press(key, scancode, action, mods)`
3033

3134
Process a key press event.
3235

@@ -38,7 +41,8 @@ Process a key press event.
3841

3942
---
4043

41-
### `mouse_event(x_pos, y_pos, button, action)`
44+
### mouse_event
45+
`mouse_event(x_pos, y_pos, button, action)`
4246

4347
Process a mouse event.
4448

docs/docs/api/gw-loading-data.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ nav_order: 2
66
---
77

88
## Loading Data
9+
{: .no_toc .text-delta }
910

1011
## Table of contents
1112
{: .no_toc .text-delta }
@@ -15,7 +16,8 @@ nav_order: 2
1516

1617
---
1718

18-
### `add_bam(path)`
19+
### add_bam
20+
`add_bam(path)`
1921

2022
Add a BAM file to the visualisation.
2123

@@ -31,7 +33,8 @@ gw.add_bam("sample.bam")
3133
```
3234
---
3335

34-
### `remove_bam(index)`
36+
### remove_bam
37+
`remove_bam(index)`
3538

3639
Remove a BAM file from the visualisation.
3740

@@ -43,7 +46,8 @@ Remove a BAM file from the visualisation.
4346

4447
---
4548

46-
### `add_track(path, vcf_as_track=True, bed_as_track=True)`
49+
### add_track
50+
`add_track(path, vcf_as_track=True, bed_as_track=True)`
4751

4852

4953
Add a genomic data track to the visualisation.
@@ -66,7 +70,8 @@ gw.add_track("features.bed")
6670
```
6771
---
6872

69-
### `remove_track(index)`
73+
### remove_track
74+
`remove_track(index)`
7075

7176
Remove a data track from the visualisation.
7277

docs/docs/api/gw-managing-regions.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ nav_order: 3
66
---
77

88
## Managing Regions
9+
{: .no_toc .text-delta }
910

1011
## Table of contents
1112
{: .no_toc .text-delta }
@@ -15,7 +16,8 @@ nav_order: 3
1516

1617
---
1718

18-
### `add_region(chrom, start, end, marker_start=-1, marker_end=-1)`
19+
### add_region
20+
`add_region(chrom, start, end, marker_start=-1, marker_end=-1)`
1921

2022
Add a genomic region for visualisation. Setting the markers will result in a small triangle being drawn at
2123
the genomic position.
@@ -38,7 +40,8 @@ gw.add_region("chr1", 1000000, 1100000, 1050000, 1060000)
3840

3941
---
4042

41-
### `remove_region(index)`
43+
### remove_region
44+
`remove_region(index)`
4245

4346
Remove a genomic region from the visualisation.
4447

@@ -50,7 +53,8 @@ Remove a genomic region from the visualisation.
5053

5154
---
5255

53-
### `view_region(chrom, start, end)`
56+
### view_region
57+
`view_region(chrom, start, end)`
5458

5559
Clear existing regions and view a specific genomic region.
5660

@@ -70,7 +74,8 @@ gw.view_region("chr1", 1000000, 1100000)
7074

7175
---
7276

73-
### `set_active_region_index(index)`
77+
### set_active_region_index
78+
`set_active_region_index(index)`
7479

7580
Set the currently active region for dynamic visualisation.
7681

@@ -82,19 +87,22 @@ Set the currently active region for dynamic visualisation.
8287

8388
---
8489

85-
### `clear()`
90+
### clear
91+
`clear()`
8692

8793
Remove all data.
8894

8995
---
9096

91-
### `clear_regions()`
97+
### clear_regions
98+
`clear_regions()`
9299

93100
Remove all defined genomic regions.
94101

95102
---
96103

97-
### `clear_alignments()`
104+
### clear_alignments
105+
`clear_alignments()`
98106

99107
Remove all loaded alignment data.
100108

docs/docs/api/gw-palette.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ nav_order: 8
77

88

99
# GwPalette Class
10+
{: .no_toc .text-delta }
1011

1112
## Table of contents
1213
{: .no_toc .text-delta }

docs/docs/api/gw-saving-images.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ nav_order: 5
66
---
77

88
## Saving images
9+
{: .no_toc .text-delta }
910

1011
## Table of contents
1112
{: .no_toc .text-delta }
@@ -15,7 +16,8 @@ nav_order: 5
1516

1617
---
1718

18-
### `save_png(path)`
19+
### save_png
20+
`save_png(path)`
1921

2022
Save the current raster image to a PNG file.
2123

@@ -32,7 +34,8 @@ gw.save_png("visualisation.png")
3234

3335
---
3436

35-
### `save_pdf(path)`
37+
### save_pdf
38+
`save_pdf(path)`
3639

3740
Save the plot to a PDF file.
3841

@@ -49,7 +52,8 @@ gw.save_pdf("visualization.pdf")
4952

5053
---
5154

52-
### `save_svg(path)`
55+
### save_svg
56+
`save_svg(path)`
5357

5458
Save the plot to a SVG file.
5559

@@ -66,7 +70,8 @@ gw.save_svg("visualization.svg")
6670

6771
---
6872

69-
### `encode_as_png(compression_level=6)`
73+
### encode_as_png
74+
`encode_as_png(compression_level=6)`
7075

7176
Encode the current canvas as PNG and return the binary data.
7277

@@ -76,7 +81,8 @@ Encode the current canvas as PNG and return the binary data.
7681
**Returns:**
7782
- `bytes`: PNG encoded image data
7883

79-
### `encode_as_jpeg(quality=80)`
84+
### encode_as_jpeg
85+
`encode_as_jpeg(quality=80)`
8086

8187
Encode the current canvas as JPEG and return the binary data.
8288

@@ -88,7 +94,8 @@ Encode the current canvas as JPEG and return the binary data.
8894

8995
---
9096

91-
### `array()`
97+
### array
98+
`array()`
9299

93100
Convert the raster image to a numpy array.
94101

docs/docs/api/gw-settings.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ nav_order: 6
66
---
77

88
### Display Settings
9+
{: .no_toc .text-delta }
910

1011
## Table of contents
1112
{: .no_toc .text-delta }
@@ -15,7 +16,8 @@ nav_order: 6
1516

1617
---
1718

18-
## `set_canvas_width(width)`
19+
## set_canvas_width
20+
`set_canvas_width(width)`
1921

2022
Set the canvas width and recreate the raster surface.
2123

@@ -27,7 +29,8 @@ Set the canvas width and recreate the raster surface.
2729

2830
---
2931

30-
### `set_canvas_height(height)`
32+
### set_canvas_height
33+
`set_canvas_height(height)`
3134

3235
Set the canvas height and recreate the raster surface.
3336

@@ -39,7 +42,8 @@ Set the canvas height and recreate the raster surface.
3942

4043
---
4144

42-
### `set_canvas_size(width, height)`
45+
### set_canvas_size
46+
`set_canvas_size(width, height)`
4347

4448
Set both canvas width and height and recreate the raster surface.
4549

@@ -52,7 +56,8 @@ Set both canvas width and height and recreate the raster surface.
5256

5357
---
5458

55-
### `set_theme(theme_name)`
59+
### set_theme
60+
`set_theme(theme_name)`
5661

5762
Set a predefined visualisation theme.
5863

@@ -70,7 +75,8 @@ gw.set_theme("dark")
7075

7176
---
7277

73-
### `set_paint_ARBG(paint_enum, a, r, g, b)`
78+
### set_paint_ARBG
79+
`set_paint_ARBG(paint_enum, a, r, g, b)`
7480

7581
Set the ARGB color for a specific paint type.
7682

@@ -89,7 +95,8 @@ gw.set_paint_ARBG(GwPalette.NORMAL_READ, 255, 0, 0, 128)
8995

9096
---
9197

92-
### `apply_theme(theme_dict)`
98+
### apply_theme
99+
`apply_theme(theme_dict)`
93100

94101
Apply a custom theme using a dictionary of paint types and colors.
95102

@@ -111,7 +118,8 @@ gw.apply_theme(custom_theme)
111118

112119
---
113120

114-
### `load_theme_from_json(filepath)`
121+
### load_theme_from_json
122+
`load_theme_from_json(filepath)`
115123

116124
Load and apply a theme from a JSON file.
117125

@@ -128,7 +136,8 @@ gw.load_theme_from_json("custom_theme.json")
128136

129137
---
130138

131-
### `save_theme_to_json(filepath)`
139+
### save_theme_to_json
140+
`save_theme_to_json(filepath)`
132141

133142
Save the current theme settings to a JSON file.
134143

@@ -146,7 +155,8 @@ gw.save_theme_to_json("my_theme.json")
146155

147156
---
148157

149-
### `set_font_size(size)`
158+
### set_font_size
159+
`set_font_size(size)`
150160

151161
Set the font size.
152162

@@ -156,7 +166,8 @@ Set the font size.
156166
**Returns:**
157167
- `Gw`: Self for method chaining
158168

159-
## `set_font_name(name)`
169+
## set_font_name
170+
`set_font_name(name)`
160171

161172
Set the font name.
162173

0 commit comments

Comments
 (0)