Skip to content

Commit 1005011

Browse files
committed
Updated docs
1 parent de2170c commit 1005011

File tree

3 files changed

+34
-55
lines changed

3 files changed

+34
-55
lines changed

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ theme: just-the-docs
44

55
logo: "/assets/images/gw_icon.png"
66
favicon_ico: "/assets/images/gw_icon.ico"
7-
color_scheme: dark
7+
color_scheme: light
88

99
baseurl: "/gwplot"
1010
url: "https://kcleal.github.io"

docs/docs/API.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The `Gw` class is the main interface to libgw (GW).
2121

2222
### Initialization
2323

24-
#### `Gw(reference, **kwargs)`
24+
### `Gw(reference, **kwargs)`
2525

2626
Initialize the GW object with a reference genome and optional parameters.
2727

@@ -38,7 +38,7 @@ gw = Gw("reference.fa", theme="dark", threads=4,
3838

3939
### Class Methods
4040

41-
#### `onlineGenomeTags()`
41+
### `onlineGenomeTags()`
4242

4343
Returns a dictionary of available online reference genome tags. Use a local genome
4444
for much better performance.
@@ -55,7 +55,7 @@ print(tags)
5555

5656
### Loading Data
5757

58-
#### `add_bam(path)`
58+
### `add_bam(path)`
5959

6060
Add a BAM file to the visualization.
6161

@@ -70,7 +70,7 @@ Add a BAM file to the visualization.
7070
gw.add_bam("sample.bam")
7171
```
7272

73-
#### `remove_bam(index)`
73+
### `remove_bam(index)`
7474

7575
Remove a BAM file from the visualization.
7676

@@ -80,7 +80,7 @@ Remove a BAM file from the visualization.
8080
**Returns:**
8181
- `Gw`: Self for method chaining
8282

83-
#### `add_track(path, vcf_as_track=True, bed_as_track=True)`
83+
### `add_track(path, vcf_as_track=True, bed_as_track=True)`
8484

8585
Add a genomic data track to the visualization.
8686

@@ -101,7 +101,7 @@ gw.add_track("variants.vcf")
101101
gw.add_track("features.bed")
102102
```
103103

104-
#### `remove_track(index)`
104+
### `remove_track(index)`
105105

106106
Remove a data track from the visualization.
107107

@@ -113,7 +113,7 @@ Remove a data track from the visualization.
113113

114114
### Managing Regions
115115

116-
#### `add_region(chrom, start, end, marker_start=-1, marker_end=-1)`
116+
### `add_region(chrom, start, end, marker_start=-1, marker_end=-1)`
117117

118118
Add a genomic region for visualization. Setting the markers will result in a small triangle being drawn at
119119
the genomic position.
@@ -134,7 +134,7 @@ the genomic position.
134134
gw.add_region("chr1", 1000000, 1100000, 1050000, 1060000)
135135
```
136136

137-
#### `remove_region(index)`
137+
### `remove_region(index)`
138138

139139
Remove a genomic region from the visualization.
140140

@@ -144,7 +144,7 @@ Remove a genomic region from the visualization.
144144
**Returns:**
145145
- `Gw`: Self for method chaining
146146

147-
#### `view_region(chrom, start, end)`
147+
### `view_region(chrom, start, end)`
148148

149149
Clear existing regions and view a specific genomic region.
150150

@@ -162,7 +162,7 @@ Clear existing regions and view a specific genomic region.
162162
gw.view_region("chr1", 1000000, 1100000)
163163
```
164164

165-
#### `set_active_region_index(index)`
165+
### `set_active_region_index(index)`
166166

167167
Set the currently active region for dynamic visualization.
168168

@@ -172,28 +172,28 @@ Set the currently active region for dynamic visualization.
172172
**Returns:**
173173
- `Gw`: Self for method chaining
174174

175-
#### `clear()`
175+
### `clear()`
176176

177177
Remove all data.
178178

179-
#### `clear_regions()`
179+
### `clear_regions()`
180180

181181
Remove all defined genomic regions.
182182

183-
#### `clear_alignments()`
183+
### `clear_alignments()`
184184

185185
Remove all loaded alignment data.
186186

187187
### Visualization
188188

189-
#### `draw()`
189+
### `draw()`
190190

191191
Draw the visualization to the raster surface without buffering. Suitable for non-interactive visualizations.
192192

193193
**Returns:**
194194
- `Gw`: Self for method chaining
195195

196-
#### `draw_interactive(clear_buffer=False)`
196+
### `draw_interactive(clear_buffer=False)`
197197

198198
Draw the visualization to the raster surface. Caches state for using with interactive functions.
199199

@@ -203,7 +203,7 @@ Draw the visualization to the raster surface. Caches state for using with intera
203203
**Returns:**
204204
- `Gw`: Self for method chaining
205205

206-
#### `draw_image(stream=True)`
206+
### `draw_image(stream=True)`
207207

208208
Draw the visualization and return it as a PIL Image.
209209

@@ -220,7 +220,7 @@ img = gw.draw_image()
220220
img.save("output.png")
221221
```
222222

223-
#### `save_png(path)`
223+
### `save_png(path)`
224224

225225
Save the current raster image to a PNG file.
226226

@@ -235,7 +235,7 @@ Save the current raster image to a PNG file.
235235
gw.draw().save_png("visualization.png")
236236
```
237237

238-
#### `encode_as_png(compression_level=6)`
238+
### `encode_as_png(compression_level=6)`
239239

240240
Encode the current canvas as PNG and return the binary data.
241241

@@ -245,7 +245,7 @@ Encode the current canvas as PNG and return the binary data.
245245
**Returns:**
246246
- `bytes`: PNG encoded image data
247247

248-
#### `encode_as_jpeg(quality=80)`
248+
### `encode_as_jpeg(quality=80)`
249249

250250
Encode the current canvas as JPEG and return the binary data.
251251

@@ -255,7 +255,7 @@ Encode the current canvas as JPEG and return the binary data.
255255
**Returns:**
256256
- `bytes`: JPEG encoded image data
257257

258-
#### `array()`
258+
### `array()`
259259

260260
Convert the image pixel data to a numpy array.
261261

@@ -270,7 +270,7 @@ img_array = gw.draw().array()
270270

271271
### Canvas and Display Settings
272272

273-
#### `set_canvas_width(width)`
273+
### `set_canvas_width(width)`
274274

275275
Set the canvas width and recreate the raster surface.
276276

@@ -280,7 +280,7 @@ Set the canvas width and recreate the raster surface.
280280
**Returns:**
281281
- `Gw`: Self for method chaining
282282

283-
#### `set_canvas_height(height)`
283+
### `set_canvas_height(height)`
284284

285285
Set the canvas height and recreate the raster surface.
286286

@@ -290,7 +290,7 @@ Set the canvas height and recreate the raster surface.
290290
**Returns:**
291291
- `Gw`: Self for method chaining
292292

293-
#### `set_canvas_size(width, height)`
293+
### `set_canvas_size(width, height)`
294294

295295
Set both canvas width and height and recreate the raster surface.
296296

@@ -301,7 +301,7 @@ Set both canvas width and height and recreate the raster surface.
301301
**Returns:**
302302
- `Gw`: Self for method chaining
303303

304-
#### `set_theme(theme_name)`
304+
### `set_theme(theme_name)`
305305

306306
Set a predefined visualization theme.
307307

@@ -317,7 +317,7 @@ Set a predefined visualization theme.
317317
gw.set_theme("dark")
318318
```
319319

320-
#### `set_paint_ARBG(paint_enum, a, r, g, b)`
320+
### `set_paint_ARBG(paint_enum, a, r, g, b)`
321321

322322
Set the ARGB color for a specific paint type.
323323

@@ -334,7 +334,7 @@ Set the ARGB color for a specific paint type.
334334
gw.set_paint_ARBG(GwPalette.NORMAL_READ, 255, 0, 0, 128)
335335
```
336336

337-
#### `apply_theme(theme_dict)`
337+
### `apply_theme(theme_dict)`
338338

339339
Apply a custom theme using a dictionary of paint types and colors.
340340

@@ -354,7 +354,7 @@ custom_theme = {
354354
gw.apply_theme(custom_theme)
355355
```
356356

357-
#### `load_theme_from_json(filepath)`
357+
### `load_theme_from_json(filepath)`
358358

359359
Load and apply a theme from a JSON file.
360360

@@ -369,7 +369,7 @@ Load and apply a theme from a JSON file.
369369
gw.load_theme_from_json("custom_theme.json")
370370
```
371371

372-
#### `save_theme_to_json(filepath)`
372+
### `save_theme_to_json(filepath)`
373373

374374
Save the current theme settings to a JSON file.
375375

@@ -385,7 +385,7 @@ Save the current theme settings to a JSON file.
385385
gw.save_theme_to_json("my_theme.json")
386386
```
387387

388-
#### `set_font_size(size)`
388+
### `set_font_size(size)`
389389

390390
Set the font size.
391391

@@ -395,7 +395,7 @@ Set the font size.
395395
**Returns:**
396396
- `Gw`: Self for method chaining
397397

398-
#### `set_font_name(name)`
398+
### `set_font_name(name)`
399399

400400
Set the font name.
401401

@@ -437,14 +437,14 @@ Set the font name.
437437

438438
### Interactive Controls
439439

440-
#### `apply_command(command)`
440+
### `apply_command(command)`
441441

442442
Apply a GW command string.
443443

444444
**Parameters:**
445445
- `command` (str): GW command to execute (e.g., "filter", "count", etc.)
446446

447-
#### `key_press(key, scancode, action, mods)`
447+
### `key_press(key, scancode, action, mods)`
448448

449449
Process a key press event.
450450

@@ -454,7 +454,7 @@ Process a key press event.
454454
- `action` (int): Key action code
455455
- `mods` (int): Modifier keys
456456

457-
#### `mouse_event(x_pos, y_pos, button, action)`
457+
### `mouse_event(x_pos, y_pos, button, action)`
458458

459459
Process a mouse event.
460460

docs/docs/Install.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,3 @@ pip install -e . -v
3030
# Run tests
3131
python -m unittest discover -s ./tests
3232
```
33-
34-
## Building from Source
35-
36-
First install dependencies.
37-
38-
On macOS, you can install the required dependencies using Homebrew:
39-
40-
```bash
41-
brew install fontconfig freetype glfw htslib jpeg-turbo libpng xz
42-
```
43-
44-
Then:
45-
46-
```bash
47-
git clone https://github.com/kcleal/gwplot.git
48-
cd gwplot
49-
pip install -r requirements.txt
50-
pip install .
51-
# Run tests
52-
python -m unittest discover -s ./tests
53-
```

0 commit comments

Comments
 (0)