Skip to content

Commit ec65f31

Browse files
committed
Version 1.0.5:
- Fixed the subsampling slider bug in multi-genomes visualization (when moving from all genomes presentation to a subset and the option 'All regions' should be added to the slider). - Finished writing manual.md.
1 parent 883d600 commit ec65f31

File tree

3 files changed

+46
-6
lines changed

3 files changed

+46
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SynTrackerVis: a Python-based web application for interactive visual analysis of SynTracker's results
22

3-
### Version 1.0.4
3+
### Version 1.0.5
44

55
## Overview
66

SynTrackerVis_app/manual.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SynTrackerVis: a Python-based web application for interactive visual analysis of SynTracker's results
22

3-
### Version 1.0.4
3+
### Version 1.0.5
44

55
## Overview
66

@@ -105,7 +105,8 @@ The initial presented bar-plots allow the user to interactively change the numbe
105105
and see how it influences the number of sample-pairs comparisons and the total number of samples which can be taken into account
106106
in the following APSS-based analyses.
107107
The numbers of sub-sampled regions available for selection are: 40, 60, 80, 100, 125, 150, 175, 200, 250, 300, 350, 400.
108-
In case the number of compared pairs, when selecting 40 regions, is lower than 100, the option 'All regions' is also available for selection.
108+
In case the number of compared pairs, when selecting 40 regions, is lower than 100, the option 'All regions' is also available for selection.
109+
Setting the desired subsampling number is done using the slider widget.
109110
That means that all the compared pairs from all the available regions are included in the downstream analyses.
110111

111112
By clicking the 'Display plots using the selected number of regions' button, the following downstream analyses are being calculated and displayed.
@@ -234,3 +235,36 @@ They appear in at least 50% of the compared sample-pairs.
234235
- **Filter plot button:** Clicking this button updates the plot, so that only pairwise comparisons, originating from the selected groups of the selected feature, will be included in the plot.
235236
- **Reset filteration button:** Clicking this button resets the filtering and updates the plot so that all data is shown.
236237

238+
## Multiple Genomes Visualization
239+
240+
The multiple genomes visualisation tab is active when the input file contains more than one reference genomes.
241+
It presents APSS-based analysis for all the reference genomes or for a selected subset.
242+
243+
### Setting the genomes that will be included in the analysis
244+
- **All genomes:** Include all available reference genomes.
245+
- **Select a subset of genomes:** Using the multi-select widget, it is possible to select specific genomes to be included in the analysis.
246+
By default, the genomes are sorted by their abundance (the number of compared pairs), but they can be sorted alphabetically by their names as well.
247+
- **Update genome selection button:** Clicking this button updates the set of genomes that are included in the analysis.
248+
249+
### Initial bar-plots
250+
The initial presented bar-plots allow the user to interactively change the number of sub-sampled regions
251+
and see how it influences the number of compared sample-pairs and the total number of species that can be taken into account
252+
in the following APSS-based analysis.
253+
The numbers of sub-sampled regions available for selection are: 40, 60, 80, 100, 125, 150, 175, 200, 250, 300, 350, 400.
254+
In case the number of compared pairs, when selecting 40 regions, is lower than 100, the option 'All regions' is also available for selection.
255+
That means that all the compared pairs from all the available regions are included in the downstream analysis.
256+
Setting the desired subsampling number is done using the slider widget.
257+
258+
By clicking the 'Display plots using the selected number of regions' button, the following downstream analyses are being calculated and displayed.
259+
260+
### APSS distribution among species plot
261+
262+
This plot shows the APSS distribution among all the compared sample-pairs of each included reference genome as a boxplot.
263+
The plot color can be changed using the color-picker widget.
264+
265+
**Including metadata:** When checking the 'Use metadata in plot' checkbox, it is possible to select a feature,
266+
by which the comparisons can be divided into two categories: same / different.
267+
for example: if the selected feature is 'country', the two categories are 'same country' and 'different country'.
268+
The features are derived from the uploaded metadata file and can be interactively selected from a drop-down menu.
269+
The colors of the same / different feature categories can be changed using the color-picker widgets.
270+
When using metadata, the P-values of the comparisons for the selected feature can be downloaded in addition to the APSS table.

SynTrackerVis_app/syntracker_vis_app.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ def __init__(self):
459459
self.save_pvalues_table_path = pn.widgets.TextInput(
460460
name='Save P-values table as: (if no full path, the file is saved under \'Downloads/\')')
461461
self.download_pvalues_table_column = pn.Column()
462+
self.download_multi_col = pn.Column
462463

463464
# synteny_per_pos plots elements
464465
self.visited_synteny_per_pos_tab = 0
@@ -2748,6 +2749,8 @@ def create_multi_genomes_plots_initial_column(self):
27482749
self.sample_sizes_slider_multi.value = config.sampling_sizes_wo_all[0]
27492750
is_all_regions = 0
27502751
else:
2752+
self.sample_sizes_slider_multi.options = config.sampling_sizes
2753+
self.sample_sizes_slider_multi.value = config.sampling_sizes[0]
27512754
is_all_regions = 1
27522755

27532756
self.selected_subset_species_num = len(self.selected_genomes_subset)
@@ -2909,8 +2912,8 @@ def create_box_plot_multi_pane(self):
29092912
self.download_pvalues_table_column = pn.Column(self.save_pvalues_table_path, download_pvalues_button,
29102913
pn.pane.Markdown())
29112914

2912-
controls_col = pn.Column(styling_col, pn.Spacer(height=30), self.download_box_plot_column,
2913-
self.download_boxplot_table_column, self.download_pvalues_table_column)
2915+
self.download_multi_col = pn.Column(styling_col, pn.Spacer(height=30), self.download_box_plot_column,
2916+
self.download_boxplot_table_column)
29142917

29152918
# There is metadata
29162919
if self.is_metadata:
@@ -2924,6 +2927,9 @@ def create_box_plot_multi_pane(self):
29242927
self.feature_select_watcher = self.box_plot_feature_select.param.watch(self.update_feature_in_boxplot,
29252928
'value', onlychanged=False)
29262929

2930+
# Add the p-values download column
2931+
self.download_multi_col.append(self.download_pvalues_table_column)
2932+
29272933
# No metadata
29282934
else:
29292935
self.use_metadata_box_plot.disabled = True
@@ -2935,7 +2941,7 @@ def create_box_plot_multi_pane(self):
29352941

29362942
self.box_plot_pane = pn.pane.Matplotlib(self.box_plot, width=700, dpi=300, tight=True, format='png')
29372943

2938-
box_plot_row = pn.Row(controls_col, pn.Spacer(width=30), self.box_plot_pane, styles={'padding': "15px"})
2944+
box_plot_row = pn.Row(self.download_multi_col, pn.Spacer(width=30), self.box_plot_pane, styles={'padding': "15px"})
29392945
self.box_plot_card.append(box_plot_row)
29402946

29412947
def calculate_metadata_for_box_plot(self):

0 commit comments

Comments
 (0)