Skip to content
Merged
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
15 changes: 14 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"extends": ["eslint:recommended", "prettier"],
"extends": [
"eslint:recommended",
"prettier",
"plugin:react/recommended"
],
"settings": {
"react": {
#"createClass": "createReactClass", // Regex for Component Factory to use,
// default to "createReactClass"
#"pragma": "React", // Pragma to use, default to "React"
"version": "detect", // React version. "detect" installed one
#"flowVersion": "0.53" // Flow version
}
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
Expand Down
Binary file modified dash_bio-0.0.1.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions dash_bio/Circos.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Circos(Component):
"""A Circos component.
Dash Circos is a library used to analyze and interpret
data using a circular layout, based on the popular
data using a circular layout, based on the popular
'Circos' graph. This Dash Bio component is a useful tool
for showcasing relationships bewtween data/datasets in a
beautiful way. Please checkout the Dash Bio repository
Expand Down Expand Up @@ -36,7 +36,7 @@ class Circos(Component):
- size (number; optional): The overall size of the SVG container holding the
graph. Set on initilization and unchangeable thereafter.
- tracks (list; optional): Tracks that specify specific layouts.
For a complete list of tracks and usage,
For a complete list of tracks and usage,
please check the docs.

Available events: """
Expand Down
60 changes: 30 additions & 30 deletions dash_bio/Ideogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class Ideogram(Component):
- style (dict; optional): The component's inline styles
- className (string; optional): The CSS class of the component wrapper
- annotationsData (string; optional): Use this prop in callback to return annotationData when hovered.
- ancestors (dict; optional): A map associating ancestor labels to colors. Used to color
- ancestors (dict; optional): A map associating ancestor labels to colors. Used to color
chromosomes from different ancestors in polyploid genomes.
- annotations (list; optional): A list of annotation objects. Annotation objects can also have a
- annotations (list; optional): A list of annotation objects. Annotation objects can also have a
name, color, shape, and track index. At the moment there is more
keys specified and the docs need updating.
- annotationHeight (number; optional): The height of each annotation.
- annotationsLayout (string; optional): The layout of this ideogram's annotations.
- annotationsLayout (string; optional): The layout of this ideogram's annotations.
It can be one of "tracks", "histogram", or "overlay".

Tracks: Lay out annotations in tracks beside each chromosome.
Expand All @@ -40,26 +40,26 @@ class Ideogram(Component):
- annotationsColor (string; optional): The color of each annotation.
- annotationsPath (string; optional): An absolute or relative URL directing to a JSON file containing
annotation objects (JSON).
- annotationTracks (list; optional): A list of objects with metadata for each track,
- annotationTracks (list; optional): A list of objects with metadata for each track,
e.g. id, display name, color, shape.
- assembly (string; optional): Default: latest RefSeq assembly for specified organism.
The genome assembly to display.
Takes assembly name (e.g. "GRCh37"),
RefSeq accession (e.g. "GCF_000306695.2"),
- assembly (string; optional): Default: latest RefSeq assembly for specified organism.
The genome assembly to display.
Takes assembly name (e.g. "GRCh37"),
RefSeq accession (e.g. "GCF_000306695.2"),
or GenBank accession (e.g. "GCA_000005005.5")
- barWidth (number; optional): The pixel width of bars drawn when annotationsLayout: 'histogram'.
- brush (string; optional): Genomic coordinate range (e.g. "chr1:104325484-119977655") for a brush on a
chromosome. Useful when ideogram consists of one chromosome and you want to be
able to focus on a region within that chromosome,
- brush (string; optional): Genomic coordinate range (e.g. "chr1:104325484-119977655") for a brush on a
chromosome. Useful when ideogram consists of one chromosome and you want to be
able to focus on a region within that chromosome,
and create an interactive sliding window to other regions
- brushData (string; optional): A dash callback that is activated when the 'brush' prop is used in component.
It will return an dictionary like so:

{'start': <value>, 'end': <value>, 'extent': <value>}

where start is the left most edge, end is right most edge, and extent is
where start is the left most edge, end is right most edge, and extent is
the total width of the brush.
- container (string; optional): CSS styling and the id of the container holding the Ideogram in
- container (string; optional): CSS styling and the id of the container holding the Ideogram in
react-ideogram.js, this is where all the d3 magic happens.
- chrHeight (number; optional): The pixel height of the tallest chromosome in the ideogram
- chrMargin (number; optional): The pixel space of margin bewteen each chromosome.
Expand All @@ -76,13 +76,13 @@ class Ideogram(Component):

General case to specify specific chromosomes:
Ex: chromosomes=['1', '2']
- dataDir (string; optional): Absolute or relative URL of the directory
- dataDir (string; optional): Absolute or relative URL of the directory
containing data needed to draw banded chromosomes.
You will need to set up you're own database to grab data from
for custom data.
- fullChromosomeLabels (boolean; optional): Whether to include abbreviation species name in chromosome label. Used
for homology.
- histogramScaling (string; optional): One of "absolute" or "relative". The technique to use in scaling the height of histogram bars. The "absolute" value sets bar height relative to tallest bar in all chromosomes,
- histogramScaling (string; optional): One of "absolute" or "relative". The technique to use in scaling the height of histogram bars. The "absolute" value sets bar height relative to tallest bar in all chromosomes,
while "relative" sets bar height relative to tallest bar in each chromosome.
- heatmaps (list; optional): This is a work in progess and will hopefully be fixed in future releases.
- homology (optional): Used to compare two chromosomes with each other.
Expand Down Expand Up @@ -114,38 +114,38 @@ class Ideogram(Component):
- start (list; optional)
- stop (list; optional)
- filterable (number; optional): Whether annotations should be filterable.
- localOrganism (dict; optional): Provide local JSON organism into this prop from a local user JSON file.
- localOrganism (dict; optional): Provide local JSON organism into this prop from a local user JSON file.
DataDir must not be initiliazed.
- organism (string | list; optional): Organism(s) to show chromosomes for. Supply organism's name as a string (e.g. "human") or
organism's NCBI Taxonomy ID (taxid, e.g. 9606) to display chromosomes from a single organism,
- organism (string | list; optional): Organism(s) to show chromosomes for. Supply organism's name as a string (e.g. "human") or
organism's NCBI Taxonomy ID (taxid, e.g. 9606) to display chromosomes from a single organism,
or an array of organisms' names or taxids to display chromosomes from multiple species.
- orientation (string; optional): The orientation of chromosomes on the page.
- perspective (string; optional): Use perspective: 'comparative' to enable annotations between two chromosomes,
- perspective (string; optional): Use perspective: 'comparative' to enable annotations between two chromosomes,
either within the same organism or different organisms. Used for homology.
- ploidy (number; optional): The ploidy - number of chromosomes to depict for each chromosome
set.
- ploidyDesc (list; optional): Description of ploidy in each chromosome set in terms of
- ploidyDesc (list; optional): Description of ploidy in each chromosome set in terms of
ancestry composition.
- rangeSet (list; optional): List of objects describing segments of recombination
- rangeSet (list; optional): List of objects describing segments of recombination
among chromosomes in a chromosome set.
- rotatable (boolean; optional): Whether chromosomes are rotatable on click.
- rotated (boolean; optional): Dash callback that returns True if rotated, and false if not.
- resolution (number; optional): The resolution of cytogenetic bands to show for each chromosome.
The quantity refers to approximate value in bands per haploid set (bphs).
- resolution (number; optional): The resolution of cytogenetic bands to show for each chromosome.
The quantity refers to approximate value in bands per haploid set (bphs).
One of 450, 550, or 850.
- rows (number; optional): Useful for putting ideogram into a small container,
or when dealing with genomes that have many chromosomes.
- rows (number; optional): Useful for putting ideogram into a small container,
or when dealing with genomes that have many chromosomes.
Note: Not fully working needs to be fixed by developer.
- sex (string; optional): Useful for omitting chromosome Y in female mammals.
- sex (string; optional): Useful for omitting chromosome Y in female mammals.
Currently only supported for organisms that use XY sex-determination.
- showChromosomeLabels (boolean; optional): Whether to show chromosome labels, e.g. 1, 2, 3, X, Y.
- showBandLabels (boolean; optional): Whether to show cytogenetic band labels, e.g. 1q21
- showAnnotTooltip (boolean; optional): Whether to show a tooltip upon mousing over an annotation.
- showFullyBanded (boolean; optional): Whether to show fully banded chromosomes for genomes
that have sufficient data. Useful for showing simpler chromosomes of
cytogenetically well-characterized organisms, e.g. human, beside chromosomes of
- showFullyBanded (boolean; optional): Whether to show fully banded chromosomes for genomes
that have sufficient data. Useful for showing simpler chromosomes of
cytogenetically well-characterized organisms, e.g. human, beside chromosomes of
less studied organisms, e.g. chimpanzee.
- showNonNuclearChromosomes (boolean; optional): Whether to show non-nuclear chromosomes,
- showNonNuclearChromosomes (boolean; optional): Whether to show non-nuclear chromosomes,
e.g. for mitochondrial (MT) and chloroplast (CP) DNA.

Available events: """
Expand Down
2 changes: 1 addition & 1 deletion dash_bio/Molecule3dViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Molecule3dViewer(Component):
- styles (a value equal to: 'stick', 'cartoon', 'sphere'; optional): Property that can be used to change the representation of
the molecule. Options include sticks, cartoon and sphere
- modelData (optional): The data that will be used to display the molecule in 3D
The data will be in JSON format
The data will be in JSON format
and should have two main dictionaries - atoms, bonds. modelData has the following type: dict containing keys 'atoms', 'bonds'.
Those keys have the following types:
- atoms (list; optional)
Expand Down
34 changes: 17 additions & 17 deletions dash_bio/SequenceViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@

class SequenceViewer(Component):
"""A SequenceViewer component.
The sequence viewer component is used to display sequences
The sequence viewer component is used to display sequences
that represent proteins, strands of genomic information, and
more. It can apply a coverage to the sequence supplied (with
clickable coverage sections that can display specific information,
and an optional legend to describe the color codes used),
search through the sequence for specific regex, capture
more. It can apply a coverage to the sequence supplied (with
clickable coverage sections that can display specific information,
and an optional legend to describe the color codes used),
search through the sequence for specific regex, capture
mouse selection events of subparts of the sequence, display a
count of the number of nucleotides or amino acids in the
count of the number of nucleotides or amino acids in the
sequence,
Read more about the component here:
Read more about the component here:
https://github.com/FlyBase/react-sequence-viewer

Keyword arguments:
- id (string; optional): The ID used to identify this component in Dash callbacks.
- sequence (string; optional): The amino acid sequence that will be displayed.
- showLineNumbers (boolean; optional): The option of whether or not to display line numbers.
- wrapAminoAcids (boolean; optional): The option of whether or not to display the list of amino acids
as broken up into separate lines of a fixed length set by
as broken up into separate lines of a fixed length set by
charsPerLine.
- charsPerLine (number; optional): The number of amino acids that will display per line.
- toolbar (boolean; optional): The option of whether or not to display a toolbar at the top
Expand All @@ -33,10 +33,10 @@ class SequenceViewer(Component):
- sequenceMaxHeight (string; optional): The maximum height of the sequence.
- badge (boolean; optional): The option of whether or not to display a badge showing the
amino acid count at the top of the component beside the title.
- selection (list; optional): A highlighted section of the sequence; the color of the highlight
can also be defined. Takes a list of format [min, max, color] where
min is a number that represents the starting index of the selection,
max is a number that represents the stopping index of the selection,
- selection (list; optional): A highlighted section of the sequence; the color of the highlight
can also be defined. Takes a list of format [min, max, color] where
min is a number that represents the starting index of the selection,
max is a number that represents the stopping index of the selection,
and color is a string that defines the highlight color.
Cannot be used at the same time as coverage.
- coverage (list; optional): A coverage of the entire sequence; each section of the sequence
Expand All @@ -45,17 +45,17 @@ class SequenceViewer(Component):
beginning and terminating indices of the section in question.
Cannot be used at the same time as selection.
- legend (list; optional): A legend corresponding to the color codes above (optionally displayed).
- coverageClicked (number; optional): Contains the index of the section that was clicked last in
- coverageClicked (number; optional): Contains the index of the section that was clicked last in
the coverage list supplied.
- mouseSelection (optional): Contains information about the subsequence selected
by the mouse. Start and end refer to the initial and
final indices, respectively, of the subsequence, and
- mouseSelection (optional): Contains information about the subsequence selected
by the mouse. Start and end refer to the initial and
final indices, respectively, of the subsequence, and
"selection" contains the string that is selected.. mouseSelection has the following type: dict containing keys 'start', 'end', 'selection'.
Those keys have the following types:
- start (number; optional)
- end (number; optional)
- selection (string; optional)
- subpartSelected (list; optional): A list of the subparts selected using the
- subpartSelected (list; optional): A list of the subparts selected using the
"search" function or the "selection" property.

Available events: """
Expand Down
4 changes: 2 additions & 2 deletions dash_bio/Speck.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Speck(Component):
Keyword arguments:
- id (string; optional): The ID used to identify this component in Dash callbacks.
- data (list; optional): The xyz file data; a list of atoms such that each atom
has a dictionary defining the x, y, and z coordinates
has a dictionary defining the x, y, and z coordinates
along with the atom's symbol.
- scrollZoom (boolean; optional): The option of whether or not to allow scrolling to control
the zoom.
Expand Down Expand Up @@ -40,7 +40,7 @@ class Speck(Component):
- dofStrength (number; optional)
- dofPosition (number; optional)
- fxaa (number; optional)
- presetView (a value equal to: 'default', 'stickball', 'toon', 'licorice'; optional): One of several pre-loaded views: default, stick-ball, toon,
- presetView (a value equal to: 'default', 'stickball', 'toon', 'licorice'; optional): One of several pre-loaded views: default, stick-ball, toon,
and licorice

Available events: """
Expand Down
5 changes: 3 additions & 2 deletions dash_bio/_imports_.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .SequenceViewer import SequenceViewer
from .Speck import Speck


__all__ = [
"AlignmentChart",
"AlignmentViewer",
Expand All @@ -15,5 +16,5 @@
"Molecule3dViewer",
"NeedlePlot",
"SequenceViewer",
"Speck"
]
"Speck",
]
8,981 changes: 103 additions & 8,878 deletions dash_bio/bundle.js

Large diffs are not rendered by default.

Loading