Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.1.4 release #412

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.4] - 2019-08-02

### Fixed
* Fixed incompatibility with Dash 1.0.0.

## [0.1.3] - 2019-07-31

### Changed
Expand Down
38 changes: 19 additions & 19 deletions dash_bio/AlignmentChart.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class AlignmentChart(Component):
"""A AlignmentChart component.
"""An AlignmentChart component.
The Alignment Viewer (MSA) component is used to align multiple genomic
or proteomic sequences from a FASTA or Clustal file. Among its
extensive set of features, the multiple sequence alignment viewer
Expand All @@ -26,57 +26,57 @@ class AlignmentChart(Component):
components in an app.
- eventDatum (dict; optional): A Dash prop that returns data on clicking, hovering or resizing the viewer.
- data (string; optional): Input data, either in FASTA or Clustal format.
- extension (string; optional): Format type of the input data, either in FASTA or Clustal.
- colorscale (string | dict; optional): Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'
- extension (string; default 'fasta'): Format type of the input data, either in FASTA or Clustal.
- colorscale (string | dict; default 'clustal2'): Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'
'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',
or your own colorscale as a {'nucleotide': COLOR} dict.
Note that this is NOT a standard plotly colorscale.
- opacity (number | string; optional): Opacity of the main plot as a value between 0 and 1.
- textcolor (string; optional): Color of the nucleotide labels, in common name, hex, rgb or rgba format.
If left blank, handled by the colorscale automatically.
- textsize (number | string; optional): Size of the nucleotide labels, as a number.
- showlabel (boolean; optional): Toggles displaying sequence labels at left of alignment
- showid (boolean; optional): Toggles displaying sequence IDs at left of alignment.
- showconservation (boolean; optional): Enables the display of conservation secondary barplot where the most conserved
- textsize (number | string; default 10): Size of the nucleotide labels, as a number.
- showlabel (boolean; default True): Toggles displaying sequence labels at left of alignment
- showid (boolean; default True): Toggles displaying sequence IDs at left of alignment.
- showconservation (boolean; default True): Enables the display of conservation secondary barplot where the most conserved
nucleotides or amino acids get greater bars.
- conservationcolor (string; optional): Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.
- conservationcolorscale (string | list; optional): Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')
- conservationcolorscale (string | list; default 'Viridis'): Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')
or as custom Plotly colorscale under a list format.
Note that this conservationcolorscale argument
does NOT follow the same format as the colorscale argument.
- conservationopacity (number | string; optional): Opacity of the conservation secondary barplot as a value between 0 and 1.
- conservationmethod (a value equal to: 'conservation', 'entropy'; optional): Whether to use most conserved ratio (MLE) 'conservation'
- conservationmethod (a value equal to: 'conservation', 'entropy'; default 'entropy'): Whether to use most conserved ratio (MLE) 'conservation'
or normalized entropy 'entropy' to determine conservation,
which is a value between 0 and 1 where 1 is most conserved.
- correctgap (boolean; optional): Whether to normalize the conservation barchart
- correctgap (boolean; default True): Whether to normalize the conservation barchart
By multiplying it elementwise with the gap barchart, as to
lower the conservation values across sequences regions with many gaps.
- showgap (boolean; optional): Enables the display of gap secondary barplot where the sequence regions
- showgap (boolean; default True): Enables the display of gap secondary barplot where the sequence regions
with the fewest gaps get the greatest bars.
- gapcolor (string; optional): Color of the gap secondary barplot, in common name, hex, rgb or rgba format.
- gapcolor (string; default 'grey'): Color of the gap secondary barplot, in common name, hex, rgb or rgba format.
- gapcolorscale (string | list; optional): Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')
or as custom Plotly colorscale under a list format.
Note that this conservationcolorscale argument
does NOT follow the same format as the colorscale argument.
- gapopacity (number | string; optional): Opacity of the gap secondary barplot as a value between 0 and 1.
- groupbars (boolean; optional): If both conservation and gap are enabled,
- groupbars (boolean; default False): If both conservation and gap are enabled,
toggles whether to group bars or to stack them as separate subplots.
No effect if not both gap and conservation are shown.
- showconsensus (boolean; optional): Displays toggling the consensus sequence, where each nucleotide in the
- showconsensus (boolean; default True): Displays toggling the consensus sequence, where each nucleotide in the
consensus sequence is the argmax of its distribution at a set nucleotide.
- tilewidth (number; optional): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
- tilewidth (number; default 16): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
takes up horizontally. The total number of tiles (numtiles) seen
horizontally is automatically determined by rounding
the Viewer width divided by the tile width.
the Viewwer width divided by the tile witdth.
- tileheight (number; optional): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
- tileheight (number; default 16): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
takes up vertically.
If enabled, set height dynamically.
- overview (a value equal to: 'heatmap', 'slider', 'none'; optional): Toggles whether the overview should be a heatmap, a slider, or none.
- overview (a value equal to: 'heatmap', 'slider', 'none'; default 'heatmap'): Toggles whether the overview should be a heatmap, a slider, or none.
- numtiles (number; optional): Sets how many tiles to display across horitontally. If enabled,
overrides tilewidth and sets the amount of tiles directly based off
that value.
- scrollskip (number; optional): If overview is set to 'scroll', determines how many tiles to skip
- scrollskip (number; default 10): If overview is set to 'scroll', determines how many tiles to skip
with each slider movement.
Has no effect if scroll is not enabled (such as with overview or none).
- tickstart (number | string; optional): Determines where to start annotating the first tile.
Expand All @@ -90,7 +90,7 @@ class AlignmentChart(Component):
- width (number | string; optional): Width of the Viewer.
Property takes precedence over tileswidth and numtiles
if either of them is set.
- height (number | string; optional): Width of the Viewer.
- height (number | string; default 900): Width of the Viewer.
Property takes precedence over tilesheight if both
are set."""
@_explicitize_args
Expand Down
38 changes: 19 additions & 19 deletions dash_bio/AlignmentViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class AlignmentViewer(Component):
"""A AlignmentViewer component.
"""An AlignmentViewer component.
The Alignment Viewer (MSA) component is used to align multiple genomic
or proteomic sequences from a FASTA or Clustal file. Among its
extensive set of features, the multiple sequence alignment viewer
Expand All @@ -26,57 +26,57 @@ class AlignmentViewer(Component):
components in an app.
- eventDatum (dict; optional): A Dash prop that returns data on clicking, hovering or resizing the viewer.
- data (string; optional): Input data, either in FASTA or Clustal format.
- extension (string; optional): Format type of the input data, either in FASTA or Clustal.
- colorscale (string | dict; optional): Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'
- extension (string; default 'fasta'): Format type of the input data, either in FASTA or Clustal.
- colorscale (string | dict; default 'clustal2'): Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'
'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',
or your own colorscale as a {'nucleotide': COLOR} dict.
Note that this is NOT a standard plotly colorscale.
- opacity (number | string; optional): Opacity of the main plot as a value between 0 and 1.
- textcolor (string; optional): Color of the nucleotide labels, in common name, hex, rgb or rgba format.
If left blank, handled by the colorscale automatically.
- textsize (number | string; optional): Size of the nucleotide labels, as a number.
- showlabel (boolean; optional): Toggles displaying sequence labels at left of alignment
- showid (boolean; optional): Toggles displaying sequence IDs at left of alignment.
- showconservation (boolean; optional): Enables the display of conservation secondary barplot where the most conserved
- textsize (number | string; default 10): Size of the nucleotide labels, as a number.
- showlabel (boolean; default True): Toggles displaying sequence labels at left of alignment
- showid (boolean; default True): Toggles displaying sequence IDs at left of alignment.
- showconservation (boolean; default True): Enables the display of conservation secondary barplot where the most conserved
nucleotides or amino acids get greater bars.
- conservationcolor (string; optional): Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.
- conservationcolorscale (string | list; optional): Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')
- conservationcolorscale (string | list; default 'Viridis'): Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')
or as custom Plotly colorscale under a list format.
Note that this conservationcolorscale argument
does NOT follow the same format as the colorscale argument.
- conservationopacity (number | string; optional): Opacity of the conservation secondary barplot as a value between 0 and 1.
- conservationmethod (a value equal to: 'conservation', 'entropy'; optional): Whether to use most conserved ratio (MLE) 'conservation'
- conservationmethod (a value equal to: 'conservation', 'entropy'; default 'entropy'): Whether to use most conserved ratio (MLE) 'conservation'
or normalized entropy 'entropy' to determine conservation,
which is a value between 0 and 1 where 1 is most conserved.
- correctgap (boolean; optional): Whether to normalize the conservation barchart
- correctgap (boolean; default True): Whether to normalize the conservation barchart
By multiplying it elementwise with the gap barchart, as to
lower the conservation values across sequences regions with many gaps.
- showgap (boolean; optional): Enables the display of gap secondary barplot where the sequence regions
- showgap (boolean; default True): Enables the display of gap secondary barplot where the sequence regions
with the fewest gaps get the greatest bars.
- gapcolor (string; optional): Color of the gap secondary barplot, in common name, hex, rgb or rgba format.
- gapcolor (string; default 'grey'): Color of the gap secondary barplot, in common name, hex, rgb or rgba format.
- gapcolorscale (string | list; optional): Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')
or as custom Plotly colorscale under a list format.
Note that this conservationcolorscale argument
does NOT follow the same format as the colorscale argument.
- gapopacity (number | string; optional): Opacity of the gap secondary barplot as a value between 0 and 1.
- groupbars (boolean; optional): If both conservation and gap are enabled,
- groupbars (boolean; default False): If both conservation and gap are enabled,
toggles whether to group bars or to stack them as separate subplots.
No effect if not both gap and conservation are shown.
- showconsensus (boolean; optional): Displays toggling the consensus sequence, where each nucleotide in the
- showconsensus (boolean; default True): Displays toggling the consensus sequence, where each nucleotide in the
consensus sequence is the argmax of its distribution at a set nucleotide.
- tilewidth (number; optional): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
- tilewidth (number; default 16): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
takes up horizontally. The total number of tiles (numtiles) seen
horizontally is automatically determined by rounding
the Viewer width divided by the tile width.
the Viewwer width divided by the tile witdth.
- tileheight (number; optional): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
- tileheight (number; default 16): Sets how many pixels each nucleotide/amino acid on the Alignment Viewer
takes up vertically.
If enabled, set height dynamically.
- overview (a value equal to: 'heatmap', 'slider', 'none'; optional): Toggles whether the overview should be a heatmap, a slider, or none.
- overview (a value equal to: 'heatmap', 'slider', 'none'; default 'heatmap'): Toggles whether the overview should be a heatmap, a slider, or none.
- numtiles (number; optional): Sets how many tiles to display across horitontally. If enabled,
overrides tilewidth and sets the amount of tiles directly based off
that value.
- scrollskip (number; optional): If overview is set to 'scroll', determines how many tiles to skip
- scrollskip (number; default 10): If overview is set to 'scroll', determines how many tiles to skip
with each slider movement.
Has no effect if scroll is not enabled (such as with overview or none).
- tickstart (number | string; optional): Determines where to start annotating the first tile.
Expand All @@ -90,7 +90,7 @@ class AlignmentViewer(Component):
- width (number | string; optional): Width of the Viewer.
Property takes precedence over tileswidth and numtiles
if either of them is set.
- height (number | string; optional): Width of the Viewer.
- height (number | string; default 900): Width of the Viewer.
Property takes precedence over tilesheight if both
are set."""
@_explicitize_args
Expand Down
70 changes: 65 additions & 5 deletions dash_bio/Circos.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,74 @@ class Circos(Component):
"1": "click",
"2": "both"
},
- layout (list; required): The overall layout of the Circos graph, provided
as a list of dictionaries.
- layout (dict; required): The overall layout of the Circos graph, provided
as a list of dictionaries. layout has the following type: list of dicts containing keys 'len', 'color', 'label', 'id'.
Those keys have the following types:
- len (number; required): The length of the block.
- color (string; required): The color of the block.
- label (string; required): The labels of the block.
- id (string; required): The id of the block, where it will recieve
data from the specified "track" id.
- config (dict; optional): Configuration of overall layout of the graph.
- size (number; optional): The overall size of the SVG container holding the
- size (number; default 800): The overall size of the SVG container holding the
graph. Set on initilization and unchangeable thereafter.
- tracks (list; optional): Tracks that specify specific layouts.
- tracks (dict; optional): Tracks that specify specific layouts.
For a complete list of tracks and usage,
please check the docs."""
please check the docs. tracks has the following type: list of dicts containing keys 'id', 'data', 'config', 'type', 'tooltipContent', 'color'.
Those keys have the following types:
- id (string; optional): The id of a specific piece of track data.
- data (list; required): The data that makes up the track. It can
be a Json object.
- config (dict; optional): The layout of the tracks, where the user
can configure innerRadius, outterRadius, ticks,
labels, and more.
- type (optional): Specify the type of track this is.
Please check the docs for a list of tracks you can use,
and ensure the name is typed in all capitals.
- tooltipContent (dict; optional): Specify what data for tooltipContent is
displayed.

The entry for the "name" key, is any of the keys used in the data loaded into tracks.
Ex: "tooltipContent": {"name": "block_id"},

To display all data in the dataset use "all" as the entry for the key "name".
Ex: "tooltipContent": {"name": "all"}

Ex: This will return (source) + ' > ' + (target) + ': ' + (targetEnd)'.
"tooltipContent": {
"source": "block_id",
"target": "position",
"targetEnd": "value"
},
Ex: This will return (source)(sourceID) + ' > ' + (target)(targetID) + ': ' (target)(targetEnd)'.
"tooltipContent": {
"source": "source",
"sourceID": "id",
"target": "target",
"targetID": "id",
"targetEnd": "end"
}. tooltipContent has the following type: a value equal to: PropTypes.string, PropTypes.shape({
name: PropTypes.string.isRequired,
}), PropTypes.shape({
source: PropTypes.string.isRequired,
sourceID: PropTypes.string,
target: PropTypes.string.isRequired,
targetEnd: PropTypes.string.isRequired,
targetID: PropTypes.string,
})
- color (dict; optional): Specify which dictonary key to grab color values from, in the passed in dataset.
This can be a string or an object.

If using a string, you can specify hex,
RGB, and colors from d3 scale chromatic (Ex: RdYlBu).

The key "name" is required for this dictionary,
where the input for "name" points to some list of
dictionaries color values.

Ex: "color": {"name": "some key that refers to color in a data set"}. color has the following type: a value equal to: PropTypes.string, PropTypes.shape({
name: PropTypes.string.isRequired,
})"""
@_explicitize_args
def __init__(self, enableDownloadSVG=Component.UNDEFINED, enableZoomPan=Component.UNDEFINED, id=Component.UNDEFINED, style=Component.UNDEFINED, eventDatum=Component.UNDEFINED, selectEvent=Component.UNDEFINED, layout=Component.REQUIRED, config=Component.UNDEFINED, size=Component.UNDEFINED, tracks=Component.UNDEFINED, **kwargs):
self._prop_names = ['enableDownloadSVG', 'enableZoomPan', 'id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks']
Expand Down
Loading