Skip to content

Commit 3f02eb8

Browse files
fairliereesegitbook-bot
authored andcommitted
GitBook: [master] 8 pages and 15 assets modified
1 parent 69f61ef commit 3f02eb8

22 files changed

+71
-71
lines changed

.gitbook/assets/alt_3 (1).png

29.2 KB
Loading

.gitbook/assets/alt_5 (1).png

30.7 KB
Loading

.gitbook/assets/exon_skipping (1).png

24.8 KB
Loading
25.3 KB
Loading

.gitbook/assets/teaching_1 (1).png

10.4 KB
Loading

.gitbook/assets/teaching_10 (1).png

33.1 KB
Loading

.gitbook/assets/teaching_11 (1).png

34.7 KB
Loading

.gitbook/assets/teaching_2.png

-7.64 KB
Binary file not shown.

.gitbook/assets/teaching_3 (1).png

22.8 KB
Loading

.gitbook/assets/teaching_4.png

-22.6 KB
Binary file not shown.

.gitbook/assets/teaching_5.png

-22.9 KB
Binary file not shown.

.gitbook/assets/teaching_6.png

-25.5 KB
Binary file not shown.

.gitbook/assets/teaching_7.png

-25.8 KB
Binary file not shown.

.gitbook/assets/teaching_8 (1).png

29.6 KB
Loading

.gitbook/assets/teaching_9 (1).png

35.3 KB
Loading

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ After installation with pip, to enable visualizations using dashed edges, run th
3434
* [Input file format specifications](faqs/file_formats.md)
3535

3636
## Comprehensive Documentation
37-
For full documentaion, please visit [our website](https://freese.gitbook.io/swan/)
3837

38+
For full documentaion, please visit [our website](https://freese.gitbook.io/swan/)
3939

4040
Logo by the wonderful [Eamonn Casey](https://www.instagram.com/designsbyeamonn/)
4141

SUMMARY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@
1414
* [File format specifications](faqs/file_formats.md)
1515

1616
## Code documentation
17-
* [swan_vis.SwanGraph()](docs/swangraph.md)
17+
18+
* [swan\_vis.SwanGraph\(\)](code-documentation/swangraph.md)
19+

docs/swangraph.md renamed to code-documentation/swangraph.md

Lines changed: 60 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
## Classes
1+
# swan\_vis.SwanGraph\(\)
22

3+
## swan.Swangraph\(\)
34

4-
### swan.Swangraph()
55
```python
66
SwanGraph(file=None)
7-
```
7+
```
88

99
A graph class to represent a transcriptome and perform plotting and analysis from it
1010

11-
```
11+
```text
1212
Attributes:
1313
1414
datasets (list of str):
@@ -43,16 +43,17 @@ Attributes:
4343
transcript expression test
4444
```
4545

46-
### Methods
46+
## Methods
47+
48+
### add\_abundance
4749

48-
#### add_abundance
4950
```python
5051
add_abundance(self, counts_file, count_cols, dataset_name, tid_col='annot_transcript_id')
5152
```
5253

5354
Adds abundance information to an existing dataset in the SwanGraph.
54-
55-
```
55+
56+
```text
5657
Parameters:
5758
5859
counts_file (str): Path to tsv counts matrix
@@ -62,31 +63,30 @@ Parameters:
6263
Default='annot_transcript_id'
6364
```
6465

66+
### add\_annotation
6567

66-
#### add_annotation
6768
```python
6869
add_annotation(self, fname)
6970
```
7071

7172
Adds an annotation from input fname to the SwanGraph.
72-
73-
```
73+
74+
```text
7475
Parameters:
7576
fname (str): Path to annotation GTF
7677
```
7778

79+
### add\_dataset
7880

79-
80-
#### add_dataset
8181
```python
8282
add_dataset(self, col, fname, dataset_name=None, whitelist=None, annot=None, counts_file=None, count_cols=None, tid_col='annot_transcript_id', include_isms=False)
8383
```
8484

8585
Add transcripts from a dataset from either a GTF or a TALON database.
8686

87-
```
87+
```text
8888
Parameters:
89-
89+
9090
col (str): Name of column to add data to in the SwanGraph
9191
fname (str): Path to GTF or TALON db
9292
@@ -111,16 +111,15 @@ Parameters:
111111
Default=False
112112
```
113113

114+
### de\_gene\_test
114115

115-
116-
#### de_gene_test
117116
```python
118117
de_gene_test(self, dataset_groups)
119118
```
120119

121120
Runs a differential expression test on the gene level.
122121

123-
```
122+
```text
124123
Parameters:
125124
126125
dataset_groups (list of list of str, len 2): Grouping of datasets
@@ -133,19 +132,17 @@ Returns:
133132
test (pandas DataFrame): A summary table of the differential
134133
expression test, including p and q-values, as well
135134
as log fold change.
136-
137135
```
138136

137+
### de\_transcript\_test
139138

140-
141-
#### de_transcript_test
142139
```python
143140
de_transcript_test(self, dataset_groups)
144141
```
145142

146143
Runs a differential expression test on the transcript level.
147144

148-
```
145+
```text
149146
Parameters:
150147
151148
dataset_groups (list of list of str, len 2): Grouping of datasets
@@ -160,48 +157,45 @@ Returns:
160157
as log fold change.
161158
```
162159

160+
### find\_es\_genes
163161

164-
#### find_es_genes
165162
```python
166163
find_es_genes(self)
167164
```
168165

169-
Finds all unique genes containing novel exon skipping events.
170-
Requires that an annotation has been added to the SwanGraph.
171-
172-
```
166+
Finds all unique genes containing novel exon skipping events. Requires that an annotation has been added to the SwanGraph.
167+
168+
```text
173169
Returns:
174170
175171
es_genes (list of str): A list of gene ids from the SwanGraph with
176172
at least one novel exon skipping event
177173
```
178174

175+
### find\_ir\_genes
179176

180-
#### find_ir_genes
181177
```python
182178
find_ir_genes(self)
183179
```
184180

185-
Finds all unique genes containing novel intron retention events.
186-
Requires that an annotation has been added to the SwanGraph.
181+
Finds all unique genes containing novel intron retention events. Requires that an annotation has been added to the SwanGraph.
187182

188-
```
183+
```text
189184
Returns:
190185
191186
ir_genes (list of str): A list of gene ids from the SwanGraph with
192187
at least one novel intron retention event
193188
```
194189

190+
### find\_isoform\_switching\_genes
195191

196-
#### find_isoform_switching_genes
197192
```python
198193
find_isoform_switching_genes(self, q=0.05, n_genes=None)
199194
```
200195

201-
Finds isoform switching genes; genes that are not differentially expressed but contain at least one transcript that is.
202-
Requires that de_gene_test and de_transcript_test have been run.
203-
204-
```
196+
Finds isoform switching genes; genes that are not differentially expressed but contain at least one transcript that is. Requires that de\_gene\_test and de\_transcript\_test have been run.
197+
198+
```text
205199
Parameters:
206200
207201
q (float): q-value threshold to declare a gene/transcript
@@ -218,15 +212,15 @@ Returns:
218212
categorized as isoform switching
219213
```
220214

215+
### gen\_report
221216

222-
#### gen_report
223217
```python
224218
gen_report(self, gids, prefix, datasets='all', dataset_groups=False, dataset_group_names=False, novelty=False, heatmap=False, tpm=False, include_qvals=False, q=0.05, include_unexpressed=False, indicate_dataset=False, indicate_novel=False, browser=False, order='expression')
225219
```
226220

227221
Generates a PDF report for a given gene or list of genes according to the user's input.
228-
229-
```
222+
223+
```text
230224
Parameters:
231225
232226
gids (str or list of str): Gene ids or names to generate
@@ -298,16 +292,15 @@ Parameters:
298292
'tid' if not
299293
```
300294

295+
### get\_de\_genes
301296

302-
#### get_de_genes
303297
```python
304298
get_de_genes(self, q=0.05, n_genes=None)
305299
```
306300

307-
Subsets the differential gene expression test summary table based on a q-value cutoff.
308-
Requires that de_gene_test has already been run.
309-
310-
```
301+
Subsets the differential gene expression test summary table based on a q-value cutoff. Requires that de\_gene\_test has already been run.
302+
303+
```text
311304
Parameters:
312305
313306
q (float): q-value threshold to declare a gene as significant
@@ -323,15 +316,15 @@ Returns:
323316
significance threshold
324317
```
325318

319+
### get\_de\_transcripts
326320

327-
#### get_de_transcripts
328321
```python
329322
get_de_transcripts(self, q=0.05, n_transcripts=None)
330323
```
331324

332-
Subsets the differential transcript expression test summary table based on a q-value cutoff. Requires that de_transcript_test has already been run.
333-
334-
```
325+
Subsets the differential transcript expression test summary table based on a q-value cutoff. Requires that de\_transcript\_test has already been run.
326+
327+
```text
335328
Parameters:
336329
337330
q (float): q-value threshold to declare a transcript as significant
@@ -344,19 +337,18 @@ Returns:
344337
tids (list of str): List of transcript ids that pass the
345338
significance threshold
346339
test (pandas DataFrame): Summary table of transcripts that pass
347-
the significance threshold
340+
the significance threshold
348341
```
349342

343+
### plot\_each\_transcript
350344

351-
352-
#### plot_each_transcript
353345
```python
354346
plot_each_transcript(self, tids, prefix, indicate_dataset=False, indicate_novel=False, browser=False)
355347
```
356348

357349
Plot each input transcript and automatically save figures.
358-
359-
```
350+
351+
```text
360352
Parameters:
361353
362354
tids (list of str): List of transcript ids to plot
@@ -375,15 +367,15 @@ Parameters:
375367
indicate_novel
376368
```
377369

370+
### plot\_each\_transcript\_in\_gene
378371

379-
#### plot_each_transcript_in_gene
380372
```python
381373
plot_each_transcript_in_gene(self, gid, prefix, indicate_dataset=False, indicate_novel=False, browser=False)
382374
```
383375

384376
Plot each transcript in a given gene and automatically save figures.
385-
386-
```
377+
378+
```text
387379
Parameters:
388380
389381
gid (str): Gene id or gene name to plot transcripts from
@@ -402,16 +394,15 @@ Parameters:
402394
indicate_novel
403395
```
404396

397+
### plot\_graph
405398

406-
#### plot_graph
407399
```python
408400
plot_graph(self, gid, indicate_dataset=False, indicate_novel=False, prefix=None)
409401
```
410402

411-
Plots a gene summary SwanGraph for an input gene.
412-
Does not automatically save the figure by default!
413-
414-
```
403+
Plots a gene summary SwanGraph for an input gene. Does not automatically save the figure by default!
404+
405+
```text
415406
Parameters:
416407
417408
gid (str): Gene ID to plot for (can also be gene name but
@@ -429,15 +420,15 @@ Parameters:
429420
Default: None, won't automatically save
430421
```
431422

423+
### plot\_transcript\_path
432424

433-
#### plot_transcript_path
434425
```python
435426
plot_transcript_path(self, tid, indicate_dataset=False, indicate_novel=False, browser=False, prefix=None)
436427
```
437428

438429
Plots a path of a single transcript isoform through a gene summary SwanGraph.
439-
440-
```
430+
431+
```text
441432
Parameters:
442433
443434
tid (str): Transcript id of transcript to plot
@@ -457,17 +448,18 @@ Parameters:
457448
Default: None, won't automatically save
458449
```
459450

451+
### save\_graph
460452

461-
#### save_graph
462453
```python
463454
save_graph(self, prefix)
464455
```
465456

466457
Saves the current SwanGraph in pickle format with the .p extension.
467-
468-
```
458+
459+
```text
469460
Parameters:
470461
471462
prefix (str): Path and filename prefix. Resulting file will
472463
be saved as prefix.p
473-
```
464+
```
465+

faqs/understanding_swan_vis.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Understanding Swan visualizations
2+
13
Swan utilizes a representation of transcript structure and alternative splicing that most people aren't familiar with. The goal of this guide is to help the user understand and interpret the graphical output format from Swan, in a step-by-step manner.
24

35
## Table of contents
@@ -55,3 +57,4 @@ Exon skipping in a SwanGraph consists of an intronic \(pink\) edge that complete
5557
In a SwanGraph, intron retention is the opposite of exon skipping. It is seen when an exonic \(green\) edge completely spans an intronic \(pink\) edge. This means that an intronic region from one transcript model has been included in a different transcript model.
5658

5759
![](../.gitbook/assets/intron_retention.png)
60+

tutorials/analysis_tools.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Swan has several analysis options to use.
44

55
Table of contents
6+
67
* [Differential gene expression](analysis_tools.md#differential-gene-expression-tests)
78
* [Differential transcript expression](analysis_tools.md#differential-transcript-expression-tests)
89
* [Isoform switching](analysis_tools.md#isoform-switching)

tutorials/getting_started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ First, if you haven't already, make sure to [install Swan](../#installation). Af
55
Then, download the data and the reference transcriptome annotation from [here](https://hpc.oit.uci.edu/~freese/swan_files/). The bash commands to do so are given below.
66

77
Table of contents
8+
89
* [Example data download](getting_started.md#download-example-data)
910
* [Starting and initializing your SwanGraph](getting_started.md#starting-up-swan-and-initializing-your-swangraph)
1011
* [Add transcript models \(GTF\) and abundance info](getting_started.md#adding-transcript-models-gtf-and-abundance-information-at-the-same-time)

0 commit comments

Comments
 (0)