From 3516b29a60b0494d14c9c47c3ccf457140525942 Mon Sep 17 00:00:00 2001 From: Hammad Khan Date: Tue, 8 Jun 2021 16:56:39 -0400 Subject: [PATCH 01/10] Updated to latest release of dash-bio-utils --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index aae79a365..d07f7397c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # pip install -r requirements.txt cython>=0.19 -dash-bio-utils==0.0.4 +dash-bio-utils==0.0.6 dash-daq==0.2.2 gunicorn==19.9.0 jsonschema==2.6.0 From 566b309afed105a8646cb168fc0dfd929924b807 Mon Sep 17 00:00:00 2001 From: Hammad Khan Date: Tue, 8 Jun 2021 16:57:02 -0400 Subject: [PATCH 02/10] Updated CHANGELOG --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08e88d0d2..108902875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## UNRELEASED + +### Fixed +* [#561](https://github.com/plotly/dash-bio/pull/561) Repeated re-rendering of the Molecule3dViewer component caused the viewer zoom to decrease multiplicatively. +This fix also exposes the `zoom` and `zoomTo` props for this component. + + ## [0.7.0] - 2021-04-19 ### Fixed @@ -12,7 +19,7 @@ * [#554](https://github.com/plotly/dash-bio/pull/554) Added additional props and arbitrary layout arguments to VolcanoPlot. ### Changed -- [#550](https://github.com/plotly/dash-bio/pull/548) Updated CONTRIBUTING.md andbasic demo app structure. In addition, removed residual code and pre-deploy scripts associated with now-discontinued Dash Bio gallery. +- [#550](https://github.com/plotly/dash-bio/pull/548) Updated CONTRIBUTING.md andbasic demo app structure. In addition, removed residual code and pre-deploy scripts associated with now-discontinued Dash Bio gallery. ## [0.6.1] - 2021-02-15 ### Fixed From 43a85f4517b0933f650055df75986c8b6a829c32 Mon Sep 17 00:00:00 2001 From: Hammad Khan Date: Tue, 8 Jun 2021 16:57:23 -0400 Subject: [PATCH 03/10] Updated mol3d props --- R/dashbioAlignmentChart.R | 6 +- R/dashbioCircos.R | 6 +- R/dashbioFornaContainer.R | 6 +- R/dashbioIdeogram.R | 6 +- R/dashbioIgv.R | 6 +- R/dashbioMolecule2dViewer.R | 6 +- R/dashbioMolecule3dViewer.R | 6 +- R/dashbioNeedlePlot.R | 6 +- R/dashbioNglMoleculeViewer.R | 6 +- R/dashbioOncoPrint.R | 6 +- R/dashbioPileup.R | 6 +- R/dashbioSequenceViewer.R | 6 +- R/dashbioSpeck.R | 6 +- dash_bio/AlignmentChart.py | 216 ++++++++++----- dash_bio/Circos.py | 202 ++++++++------ dash_bio/FornaContainer.py | 176 +++++++----- dash_bio/Ideogram.py | 368 ++++++++++++++++--------- dash_bio/Igv.py | 58 ++-- dash_bio/Molecule2dViewer.py | 68 +++-- dash_bio/Molecule3dViewer.py | 145 +++++++--- dash_bio/NeedlePlot.py | 138 ++++------ dash_bio/NglMoleculeViewer.py | 245 ++++++++-------- dash_bio/OncoPrint.py | 80 ++++-- dash_bio/Pileup.py | 106 ++++--- dash_bio/SequenceViewer.py | 169 ++++++++---- dash_bio/Speck.py | 128 ++++++--- dash_bio/async-moleculeviewer3.js | 2 +- dash_bio/async-moleculeviewer3.js.map | 2 +- dash_bio/bundle.js | 2 +- dash_bio/bundle.js.map | 2 +- dash_bio/metadata.json | 56 ++++ inst/deps/async-moleculeviewer3.js | 2 +- inst/deps/async-moleculeviewer3.js.map | 2 +- inst/deps/bundle.js | 2 +- inst/deps/bundle.js.map | 2 +- man/dashbioAlignmentChart.Rd | 105 ++++--- man/dashbioCircos.Rd | 36 +-- man/dashbioFornaContainer.Rd | 82 +++--- man/dashbioIdeogram.Rd | 127 ++++----- man/dashbioIgv.Rd | 16 +- man/dashbioMolecule2dViewer.Rd | 12 +- man/dashbioMolecule3dViewer.Rd | 62 +++-- man/dashbioNeedlePlot.Rd | 24 +- man/dashbioNglMoleculeViewer.Rd | 72 ++--- man/dashbioOncoPrint.Rd | 32 +-- man/dashbioPileup.Rd | 8 +- man/dashbioSequenceViewer.Rd | 70 ++--- man/dashbioSpeck.Rd | 10 +- src/lib/components/Molecule3dViewer.js | 52 ++++ src/lib/fragments/Molecule3dViewer.js | 15 +- 50 files changed, 1791 insertions(+), 1181 deletions(-) diff --git a/R/dashbioAlignmentChart.R b/R/dashbioAlignmentChart.R index 5e42015e4..032b4b202 100644 --- a/R/dashbioAlignmentChart.R +++ b/R/dashbioAlignmentChart.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioAlignmentChart <- function(id=NULL, eventDatum=NULL, data=NULL, extension=NULL, colorscale=NULL, opacity=NULL, textcolor=NULL, textsize=NULL, showlabel=NULL, showid=NULL, showconservation=NULL, conservationcolor=NULL, conservationcolorscale=NULL, conservationopacity=NULL, conservationmethod=NULL, correctgap=NULL, showgap=NULL, gapcolor=NULL, gapcolorscale=NULL, gapopacity=NULL, groupbars=NULL, showconsensus=NULL, tilewidth=NULL, tileheight=NULL, overview=NULL, numtiles=NULL, scrollskip=NULL, tickstart=NULL, ticksteps=NULL, width=NULL, height=NULL) { +dashbioAlignmentChart <- function(id=NULL, colorscale=NULL, conservationcolor=NULL, conservationcolorscale=NULL, conservationmethod=NULL, conservationopacity=NULL, correctgap=NULL, data=NULL, eventDatum=NULL, extension=NULL, gapcolor=NULL, gapcolorscale=NULL, gapopacity=NULL, groupbars=NULL, height=NULL, numtiles=NULL, opacity=NULL, overview=NULL, scrollskip=NULL, showconsensus=NULL, showconservation=NULL, showgap=NULL, showid=NULL, showlabel=NULL, textcolor=NULL, textsize=NULL, tickstart=NULL, ticksteps=NULL, tileheight=NULL, tilewidth=NULL, width=NULL) { - props <- list(id=id, eventDatum=eventDatum, data=data, extension=extension, colorscale=colorscale, opacity=opacity, textcolor=textcolor, textsize=textsize, showlabel=showlabel, showid=showid, showconservation=showconservation, conservationcolor=conservationcolor, conservationcolorscale=conservationcolorscale, conservationopacity=conservationopacity, conservationmethod=conservationmethod, correctgap=correctgap, showgap=showgap, gapcolor=gapcolor, gapcolorscale=gapcolorscale, gapopacity=gapopacity, groupbars=groupbars, showconsensus=showconsensus, tilewidth=tilewidth, tileheight=tileheight, overview=overview, numtiles=numtiles, scrollskip=scrollskip, tickstart=tickstart, ticksteps=ticksteps, width=width, height=height) + props <- list(id=id, colorscale=colorscale, conservationcolor=conservationcolor, conservationcolorscale=conservationcolorscale, conservationmethod=conservationmethod, conservationopacity=conservationopacity, correctgap=correctgap, data=data, eventDatum=eventDatum, extension=extension, gapcolor=gapcolor, gapcolorscale=gapcolorscale, gapopacity=gapopacity, groupbars=groupbars, height=height, numtiles=numtiles, opacity=opacity, overview=overview, scrollskip=scrollskip, showconsensus=showconsensus, showconservation=showconservation, showgap=showgap, showid=showid, showlabel=showlabel, textcolor=textcolor, textsize=textsize, tickstart=tickstart, ticksteps=ticksteps, tileheight=tileheight, tilewidth=tilewidth, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioAlignmentChart <- function(id=NULL, eventDatum=NULL, data=NULL, extension props = props, type = 'AlignmentChart', namespace = 'dash_bio', - propNames = c('id', 'eventDatum', 'data', 'extension', 'colorscale', 'opacity', 'textcolor', 'textsize', 'showlabel', 'showid', 'showconservation', 'conservationcolor', 'conservationcolorscale', 'conservationopacity', 'conservationmethod', 'correctgap', 'showgap', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'showconsensus', 'tilewidth', 'tileheight', 'overview', 'numtiles', 'scrollskip', 'tickstart', 'ticksteps', 'width', 'height'), + propNames = c('id', 'colorscale', 'conservationcolor', 'conservationcolorscale', 'conservationmethod', 'conservationopacity', 'correctgap', 'data', 'eventDatum', 'extension', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'height', 'numtiles', 'opacity', 'overview', 'scrollskip', 'showconsensus', 'showconservation', 'showgap', 'showid', 'showlabel', 'textcolor', 'textsize', 'tickstart', 'ticksteps', 'tileheight', 'tilewidth', 'width'), package = 'dashBio' ) diff --git a/R/dashbioCircos.R b/R/dashbioCircos.R index 1b04261c6..f9c5f6d1c 100644 --- a/R/dashbioCircos.R +++ b/R/dashbioCircos.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioCircos <- function(enableDownloadSVG=NULL, enableZoomPan=NULL, id=NULL, style=NULL, eventDatum=NULL, selectEvent=NULL, layout=NULL, config=NULL, size=NULL, tracks=NULL) { +dashbioCircos <- function(id=NULL, config=NULL, enableDownloadSVG=NULL, enableZoomPan=NULL, eventDatum=NULL, layout=NULL, selectEvent=NULL, size=NULL, style=NULL, tracks=NULL) { - props <- list(enableDownloadSVG=enableDownloadSVG, enableZoomPan=enableZoomPan, id=id, style=style, eventDatum=eventDatum, selectEvent=selectEvent, layout=layout, config=config, size=size, tracks=tracks) + props <- list(id=id, config=config, enableDownloadSVG=enableDownloadSVG, enableZoomPan=enableZoomPan, eventDatum=eventDatum, layout=layout, selectEvent=selectEvent, size=size, style=style, tracks=tracks) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioCircos <- function(enableDownloadSVG=NULL, enableZoomPan=NULL, id=NULL, s props = props, type = 'Circos', namespace = 'dash_bio', - propNames = c('enableDownloadSVG', 'enableZoomPan', 'id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks'), + propNames = c('id', 'config', 'enableDownloadSVG', 'enableZoomPan', 'eventDatum', 'layout', 'selectEvent', 'size', 'style', 'tracks'), package = 'dashBio' ) diff --git a/R/dashbioFornaContainer.R b/R/dashbioFornaContainer.R index 875661849..00e82769f 100644 --- a/R/dashbioFornaContainer.R +++ b/R/dashbioFornaContainer.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioFornaContainer <- function(id=NULL, height=NULL, width=NULL, sequences=NULL, nodeFillColor=NULL, colorScheme=NULL, customColors=NULL, allowPanningAndZooming=NULL) { +dashbioFornaContainer <- function(id=NULL, allowPanningAndZooming=NULL, colorScheme=NULL, customColors=NULL, height=NULL, nodeFillColor=NULL, sequences=NULL, width=NULL) { - props <- list(id=id, height=height, width=width, sequences=sequences, nodeFillColor=nodeFillColor, colorScheme=colorScheme, customColors=customColors, allowPanningAndZooming=allowPanningAndZooming) + props <- list(id=id, allowPanningAndZooming=allowPanningAndZooming, colorScheme=colorScheme, customColors=customColors, height=height, nodeFillColor=nodeFillColor, sequences=sequences, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioFornaContainer <- function(id=NULL, height=NULL, width=NULL, sequences=NU props = props, type = 'FornaContainer', namespace = 'dash_bio', - propNames = c('id', 'height', 'width', 'sequences', 'nodeFillColor', 'colorScheme', 'customColors', 'allowPanningAndZooming'), + propNames = c('id', 'allowPanningAndZooming', 'colorScheme', 'customColors', 'height', 'nodeFillColor', 'sequences', 'width'), package = 'dashBio' ) diff --git a/R/dashbioIdeogram.R b/R/dashbioIdeogram.R index c65ea3273..32684f1ed 100644 --- a/R/dashbioIdeogram.R +++ b/R/dashbioIdeogram.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioIdeogram <- function(id=NULL, style=NULL, className=NULL, annotationsLayout=NULL, annotations=NULL, annotationsPath=NULL, annotationsData=NULL, annotationTracks=NULL, annotationHeight=NULL, annotationsColor=NULL, histogramScaling=NULL, barWidth=NULL, showAnnotTooltip=NULL, assembly=NULL, brush=NULL, brushData=NULL, container=NULL, chrHeight=NULL, chrMargin=NULL, chrWidth=NULL, chromosomes=NULL, dataDir=NULL, organism=NULL, localOrganism=NULL, homology=NULL, perspective=NULL, fullChromosomeLabels=NULL, resolution=NULL, filterable=NULL, orientation=NULL, ploidy=NULL, ploidyDesc=NULL, ancestors=NULL, rangeSet=NULL, rotatable=NULL, rotated=NULL, sex=NULL, showChromosomeLabels=NULL, showBandLabels=NULL, showFullyBanded=NULL, showNonNuclearChromosomes=NULL) { +dashbioIdeogram <- function(id=NULL, ancestors=NULL, annotationHeight=NULL, annotationTracks=NULL, annotations=NULL, annotationsColor=NULL, annotationsData=NULL, annotationsLayout=NULL, annotationsPath=NULL, assembly=NULL, barWidth=NULL, brush=NULL, brushData=NULL, chrHeight=NULL, chrMargin=NULL, chrWidth=NULL, chromosomes=NULL, className=NULL, container=NULL, dataDir=NULL, filterable=NULL, fullChromosomeLabels=NULL, histogramScaling=NULL, homology=NULL, localOrganism=NULL, organism=NULL, orientation=NULL, perspective=NULL, ploidy=NULL, ploidyDesc=NULL, rangeSet=NULL, resolution=NULL, rotatable=NULL, rotated=NULL, sex=NULL, showAnnotTooltip=NULL, showBandLabels=NULL, showChromosomeLabels=NULL, showFullyBanded=NULL, showNonNuclearChromosomes=NULL, style=NULL) { - props <- list(id=id, style=style, className=className, annotationsLayout=annotationsLayout, annotations=annotations, annotationsPath=annotationsPath, annotationsData=annotationsData, annotationTracks=annotationTracks, annotationHeight=annotationHeight, annotationsColor=annotationsColor, histogramScaling=histogramScaling, barWidth=barWidth, showAnnotTooltip=showAnnotTooltip, assembly=assembly, brush=brush, brushData=brushData, container=container, chrHeight=chrHeight, chrMargin=chrMargin, chrWidth=chrWidth, chromosomes=chromosomes, dataDir=dataDir, organism=organism, localOrganism=localOrganism, homology=homology, perspective=perspective, fullChromosomeLabels=fullChromosomeLabels, resolution=resolution, filterable=filterable, orientation=orientation, ploidy=ploidy, ploidyDesc=ploidyDesc, ancestors=ancestors, rangeSet=rangeSet, rotatable=rotatable, rotated=rotated, sex=sex, showChromosomeLabels=showChromosomeLabels, showBandLabels=showBandLabels, showFullyBanded=showFullyBanded, showNonNuclearChromosomes=showNonNuclearChromosomes) + props <- list(id=id, ancestors=ancestors, annotationHeight=annotationHeight, annotationTracks=annotationTracks, annotations=annotations, annotationsColor=annotationsColor, annotationsData=annotationsData, annotationsLayout=annotationsLayout, annotationsPath=annotationsPath, assembly=assembly, barWidth=barWidth, brush=brush, brushData=brushData, chrHeight=chrHeight, chrMargin=chrMargin, chrWidth=chrWidth, chromosomes=chromosomes, className=className, container=container, dataDir=dataDir, filterable=filterable, fullChromosomeLabels=fullChromosomeLabels, histogramScaling=histogramScaling, homology=homology, localOrganism=localOrganism, organism=organism, orientation=orientation, perspective=perspective, ploidy=ploidy, ploidyDesc=ploidyDesc, rangeSet=rangeSet, resolution=resolution, rotatable=rotatable, rotated=rotated, sex=sex, showAnnotTooltip=showAnnotTooltip, showBandLabels=showBandLabels, showChromosomeLabels=showChromosomeLabels, showFullyBanded=showFullyBanded, showNonNuclearChromosomes=showNonNuclearChromosomes, style=style) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioIdeogram <- function(id=NULL, style=NULL, className=NULL, annotationsLayo props = props, type = 'Ideogram', namespace = 'dash_bio', - propNames = c('id', 'style', 'className', 'annotationsLayout', 'annotations', 'annotationsPath', 'annotationsData', 'annotationTracks', 'annotationHeight', 'annotationsColor', 'histogramScaling', 'barWidth', 'showAnnotTooltip', 'assembly', 'brush', 'brushData', 'container', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'dataDir', 'organism', 'localOrganism', 'homology', 'perspective', 'fullChromosomeLabels', 'resolution', 'filterable', 'orientation', 'ploidy', 'ploidyDesc', 'ancestors', 'rangeSet', 'rotatable', 'rotated', 'sex', 'showChromosomeLabels', 'showBandLabels', 'showFullyBanded', 'showNonNuclearChromosomes'), + propNames = c('id', 'ancestors', 'annotationHeight', 'annotationTracks', 'annotations', 'annotationsColor', 'annotationsData', 'annotationsLayout', 'annotationsPath', 'assembly', 'barWidth', 'brush', 'brushData', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'className', 'container', 'dataDir', 'filterable', 'fullChromosomeLabels', 'histogramScaling', 'homology', 'localOrganism', 'organism', 'orientation', 'perspective', 'ploidy', 'ploidyDesc', 'rangeSet', 'resolution', 'rotatable', 'rotated', 'sex', 'showAnnotTooltip', 'showBandLabels', 'showChromosomeLabels', 'showFullyBanded', 'showNonNuclearChromosomes', 'style'), package = 'dashBio' ) diff --git a/R/dashbioIgv.R b/R/dashbioIgv.R index 6c4457d1c..dcfeff3b2 100644 --- a/R/dashbioIgv.R +++ b/R/dashbioIgv.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioIgv <- function(id=NULL, style=NULL, className=NULL, genome=NULL, reference=NULL, locus=NULL, minimumBases=NULL, tracks=NULL) { +dashbioIgv <- function(id=NULL, className=NULL, genome=NULL, locus=NULL, minimumBases=NULL, reference=NULL, style=NULL, tracks=NULL) { - props <- list(id=id, style=style, className=className, genome=genome, reference=reference, locus=locus, minimumBases=minimumBases, tracks=tracks) + props <- list(id=id, className=className, genome=genome, locus=locus, minimumBases=minimumBases, reference=reference, style=style, tracks=tracks) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioIgv <- function(id=NULL, style=NULL, className=NULL, genome=NULL, referen props = props, type = 'Igv', namespace = 'dash_bio', - propNames = c('id', 'style', 'className', 'genome', 'reference', 'locus', 'minimumBases', 'tracks'), + propNames = c('id', 'className', 'genome', 'locus', 'minimumBases', 'reference', 'style', 'tracks'), package = 'dashBio' ) diff --git a/R/dashbioMolecule2dViewer.R b/R/dashbioMolecule2dViewer.R index 646278ad6..344506ffd 100644 --- a/R/dashbioMolecule2dViewer.R +++ b/R/dashbioMolecule2dViewer.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioMolecule2dViewer <- function(id=NULL, selectedAtomIds=NULL, width=NULL, height=NULL, modelData=NULL) { +dashbioMolecule2dViewer <- function(id=NULL, height=NULL, modelData=NULL, selectedAtomIds=NULL, width=NULL) { - props <- list(id=id, selectedAtomIds=selectedAtomIds, width=width, height=height, modelData=modelData) + props <- list(id=id, height=height, modelData=modelData, selectedAtomIds=selectedAtomIds, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioMolecule2dViewer <- function(id=NULL, selectedAtomIds=NULL, width=NULL, h props = props, type = 'Molecule2dViewer', namespace = 'dash_bio', - propNames = c('id', 'selectedAtomIds', 'width', 'height', 'modelData'), + propNames = c('id', 'height', 'modelData', 'selectedAtomIds', 'width'), package = 'dashBio' ) diff --git a/R/dashbioMolecule3dViewer.R b/R/dashbioMolecule3dViewer.R index d6f377e00..3ba3f96b3 100644 --- a/R/dashbioMolecule3dViewer.R +++ b/R/dashbioMolecule3dViewer.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioMolecule3dViewer <- function(id=NULL, selectionType=NULL, backgroundColor=NULL, backgroundOpacity=NULL, styles=NULL, modelData=NULL, atomLabelsShown=NULL, selectedAtomIds=NULL, labels=NULL, orbital=NULL, shapes=NULL, onRenderNewData=NULL, onChangeSelection=NULL) { +dashbioMolecule3dViewer <- function(id=NULL, atomLabelsShown=NULL, backgroundColor=NULL, backgroundOpacity=NULL, labels=NULL, modelData=NULL, onChangeSelection=NULL, onRenderNewData=NULL, orbital=NULL, selectedAtomIds=NULL, selectionType=NULL, shapes=NULL, styles=NULL, zoom=NULL, zoomTo=NULL) { - props <- list(id=id, selectionType=selectionType, backgroundColor=backgroundColor, backgroundOpacity=backgroundOpacity, styles=styles, modelData=modelData, atomLabelsShown=atomLabelsShown, selectedAtomIds=selectedAtomIds, labels=labels, orbital=orbital, shapes=shapes, onRenderNewData=onRenderNewData, onChangeSelection=onChangeSelection) + props <- list(id=id, atomLabelsShown=atomLabelsShown, backgroundColor=backgroundColor, backgroundOpacity=backgroundOpacity, labels=labels, modelData=modelData, onChangeSelection=onChangeSelection, onRenderNewData=onRenderNewData, orbital=orbital, selectedAtomIds=selectedAtomIds, selectionType=selectionType, shapes=shapes, styles=styles, zoom=zoom, zoomTo=zoomTo) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioMolecule3dViewer <- function(id=NULL, selectionType=NULL, backgroundColor props = props, type = 'Molecule3dViewer', namespace = 'dash_bio', - propNames = c('id', 'selectionType', 'backgroundColor', 'backgroundOpacity', 'styles', 'modelData', 'atomLabelsShown', 'selectedAtomIds', 'labels', 'orbital', 'shapes', 'onRenderNewData', 'onChangeSelection'), + propNames = c('id', 'atomLabelsShown', 'backgroundColor', 'backgroundOpacity', 'labels', 'modelData', 'onChangeSelection', 'onRenderNewData', 'orbital', 'selectedAtomIds', 'selectionType', 'shapes', 'styles', 'zoom', 'zoomTo'), package = 'dashBio' ) diff --git a/R/dashbioNeedlePlot.R b/R/dashbioNeedlePlot.R index e083dfa6d..313001dce 100644 --- a/R/dashbioNeedlePlot.R +++ b/R/dashbioNeedlePlot.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioNeedlePlot <- function(id=NULL, mutationData=NULL, xlabel=NULL, ylabel=NULL, rangeSlider=NULL, needleStyle=NULL, domainStyle=NULL) { +dashbioNeedlePlot <- function(id=NULL, domainStyle=NULL, mutationData=NULL, needleStyle=NULL, rangeSlider=NULL, xlabel=NULL, ylabel=NULL) { - props <- list(id=id, mutationData=mutationData, xlabel=xlabel, ylabel=ylabel, rangeSlider=rangeSlider, needleStyle=needleStyle, domainStyle=domainStyle) + props <- list(id=id, domainStyle=domainStyle, mutationData=mutationData, needleStyle=needleStyle, rangeSlider=rangeSlider, xlabel=xlabel, ylabel=ylabel) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioNeedlePlot <- function(id=NULL, mutationData=NULL, xlabel=NULL, ylabel=NU props = props, type = 'NeedlePlot', namespace = 'dash_bio', - propNames = c('id', 'mutationData', 'xlabel', 'ylabel', 'rangeSlider', 'needleStyle', 'domainStyle'), + propNames = c('id', 'domainStyle', 'mutationData', 'needleStyle', 'rangeSlider', 'xlabel', 'ylabel'), package = 'dashBio' ) diff --git a/R/dashbioNglMoleculeViewer.R b/R/dashbioNglMoleculeViewer.R index b1529f4b1..c53680938 100644 --- a/R/dashbioNglMoleculeViewer.R +++ b/R/dashbioNglMoleculeViewer.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioNglMoleculeViewer <- function(id=NULL, width=NULL, height=NULL, stageParameters=NULL, imageParameters=NULL, downloadImage=NULL, pdbString=NULL, data=NULL, molStyles=NULL) { +dashbioNglMoleculeViewer <- function(id=NULL, data=NULL, downloadImage=NULL, height=NULL, imageParameters=NULL, molStyles=NULL, pdbString=NULL, stageParameters=NULL, width=NULL) { - props <- list(id=id, width=width, height=height, stageParameters=stageParameters, imageParameters=imageParameters, downloadImage=downloadImage, pdbString=pdbString, data=data, molStyles=molStyles) + props <- list(id=id, data=data, downloadImage=downloadImage, height=height, imageParameters=imageParameters, molStyles=molStyles, pdbString=pdbString, stageParameters=stageParameters, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioNglMoleculeViewer <- function(id=NULL, width=NULL, height=NULL, stagePara props = props, type = 'NglMoleculeViewer', namespace = 'dash_bio', - propNames = c('id', 'width', 'height', 'stageParameters', 'imageParameters', 'downloadImage', 'pdbString', 'data', 'molStyles'), + propNames = c('id', 'data', 'downloadImage', 'height', 'imageParameters', 'molStyles', 'pdbString', 'stageParameters', 'width'), package = 'dashBio' ) diff --git a/R/dashbioOncoPrint.R b/R/dashbioOncoPrint.R index 8fc83fadf..bcff49845 100644 --- a/R/dashbioOncoPrint.R +++ b/R/dashbioOncoPrint.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioOncoPrint <- function(id=NULL, eventDatum=NULL, data=NULL, padding=NULL, colorscale=NULL, backgroundcolor=NULL, range=NULL, showlegend=NULL, showoverview=NULL, width=NULL, height=NULL) { +dashbioOncoPrint <- function(id=NULL, backgroundcolor=NULL, colorscale=NULL, data=NULL, eventDatum=NULL, height=NULL, padding=NULL, range=NULL, showlegend=NULL, showoverview=NULL, width=NULL) { - props <- list(id=id, eventDatum=eventDatum, data=data, padding=padding, colorscale=colorscale, backgroundcolor=backgroundcolor, range=range, showlegend=showlegend, showoverview=showoverview, width=width, height=height) + props <- list(id=id, backgroundcolor=backgroundcolor, colorscale=colorscale, data=data, eventDatum=eventDatum, height=height, padding=padding, range=range, showlegend=showlegend, showoverview=showoverview, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioOncoPrint <- function(id=NULL, eventDatum=NULL, data=NULL, padding=NULL, props = props, type = 'OncoPrint', namespace = 'dash_bio', - propNames = c('id', 'eventDatum', 'data', 'padding', 'colorscale', 'backgroundcolor', 'range', 'showlegend', 'showoverview', 'width', 'height'), + propNames = c('id', 'backgroundcolor', 'colorscale', 'data', 'eventDatum', 'height', 'padding', 'range', 'showlegend', 'showoverview', 'width'), package = 'dashBio' ) diff --git a/R/dashbioPileup.R b/R/dashbioPileup.R index 9057c7eee..b46918696 100644 --- a/R/dashbioPileup.R +++ b/R/dashbioPileup.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioPileup <- function(id=NULL, style=NULL, className=NULL, range=NULL, reference=NULL, tracks=NULL) { +dashbioPileup <- function(id=NULL, className=NULL, range=NULL, reference=NULL, style=NULL, tracks=NULL) { - props <- list(id=id, style=style, className=className, range=range, reference=reference, tracks=tracks) + props <- list(id=id, className=className, range=range, reference=reference, style=style, tracks=tracks) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioPileup <- function(id=NULL, style=NULL, className=NULL, range=NULL, refer props = props, type = 'Pileup', namespace = 'dash_bio', - propNames = c('id', 'style', 'className', 'range', 'reference', 'tracks'), + propNames = c('id', 'className', 'range', 'reference', 'style', 'tracks'), package = 'dashBio' ) diff --git a/R/dashbioSequenceViewer.R b/R/dashbioSequenceViewer.R index 6b0658d2f..a453ee635 100644 --- a/R/dashbioSequenceViewer.R +++ b/R/dashbioSequenceViewer.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioSequenceViewer <- function(id=NULL, sequence=NULL, showLineNumbers=NULL, wrapAminoAcids=NULL, charsPerLine=NULL, toolbar=NULL, search=NULL, title=NULL, sequenceMaxHeight=NULL, badge=NULL, selection=NULL, coverage=NULL, legend=NULL, coverageClicked=NULL, mouseSelection=NULL, subpartSelected=NULL) { +dashbioSequenceViewer <- function(id=NULL, badge=NULL, charsPerLine=NULL, coverage=NULL, coverageClicked=NULL, legend=NULL, mouseSelection=NULL, search=NULL, selection=NULL, sequence=NULL, sequenceMaxHeight=NULL, showLineNumbers=NULL, subpartSelected=NULL, title=NULL, toolbar=NULL, wrapAminoAcids=NULL) { - props <- list(id=id, sequence=sequence, showLineNumbers=showLineNumbers, wrapAminoAcids=wrapAminoAcids, charsPerLine=charsPerLine, toolbar=toolbar, search=search, title=title, sequenceMaxHeight=sequenceMaxHeight, badge=badge, selection=selection, coverage=coverage, legend=legend, coverageClicked=coverageClicked, mouseSelection=mouseSelection, subpartSelected=subpartSelected) + props <- list(id=id, badge=badge, charsPerLine=charsPerLine, coverage=coverage, coverageClicked=coverageClicked, legend=legend, mouseSelection=mouseSelection, search=search, selection=selection, sequence=sequence, sequenceMaxHeight=sequenceMaxHeight, showLineNumbers=showLineNumbers, subpartSelected=subpartSelected, title=title, toolbar=toolbar, wrapAminoAcids=wrapAminoAcids) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioSequenceViewer <- function(id=NULL, sequence=NULL, showLineNumbers=NULL, props = props, type = 'SequenceViewer', namespace = 'dash_bio', - propNames = c('id', 'sequence', 'showLineNumbers', 'wrapAminoAcids', 'charsPerLine', 'toolbar', 'search', 'title', 'sequenceMaxHeight', 'badge', 'selection', 'coverage', 'legend', 'coverageClicked', 'mouseSelection', 'subpartSelected'), + propNames = c('id', 'badge', 'charsPerLine', 'coverage', 'coverageClicked', 'legend', 'mouseSelection', 'search', 'selection', 'sequence', 'sequenceMaxHeight', 'showLineNumbers', 'subpartSelected', 'title', 'toolbar', 'wrapAminoAcids'), package = 'dashBio' ) diff --git a/R/dashbioSpeck.R b/R/dashbioSpeck.R index 500965516..988277476 100644 --- a/R/dashbioSpeck.R +++ b/R/dashbioSpeck.R @@ -1,8 +1,8 @@ # AUTO GENERATED FILE - DO NOT EDIT -dashbioSpeck <- function(id=NULL, data=NULL, scrollZoom=NULL, view=NULL, presetView=NULL) { +dashbioSpeck <- function(id=NULL, data=NULL, presetView=NULL, scrollZoom=NULL, view=NULL) { - props <- list(id=id, data=data, scrollZoom=scrollZoom, view=view, presetView=presetView) + props <- list(id=id, data=data, presetView=presetView, scrollZoom=scrollZoom, view=view) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } @@ -10,7 +10,7 @@ dashbioSpeck <- function(id=NULL, data=NULL, scrollZoom=NULL, view=NULL, presetV props = props, type = 'Speck', namespace = 'dash_bio', - propNames = c('id', 'data', 'scrollZoom', 'view', 'presetView'), + propNames = c('id', 'data', 'presetView', 'scrollZoom', 'view'), package = 'dashBio' ) diff --git a/dash_bio/AlignmentChart.py b/dash_bio/AlignmentChart.py index 1824649ce..1ce7a5d02 100644 --- a/dash_bio/AlignmentChart.py +++ b/dash_bio/AlignmentChart.py @@ -18,92 +18,156 @@ class AlignmentChart(Component): https://github.com/plotly/react-alignment-viewer Keyword arguments: -- id (string; optional): The ID of this component, used to identify dash components -in callbacks. The ID needs to be unique across all of the -components in an app. -- eventDatum (string; 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; 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; 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; 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'; 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; 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; default True): Enables the display of gap secondary barplot where the sequence regions -with the fewest gaps get the greatest bars. -- 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; 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; 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; default 16): Sets how many pixels each nucleotide/amino acid on the Alignment Chart -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; default 16): Sets how many pixels each nucleotide/amino acid on the Alignment Chart -takes up vertically. -If enabled, set height dynamically. -- 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; 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. -If let blank will be automatically determined by Plotly. -Equivalent to Plotly's tick0 property. -Does not function if overview mode 'slider' is applied. (Current bug) -- ticksteps (number | string; optional): Determines at what interval to keep annotating the tiles. -If left blank will be automatially determined by Plotly. -Equivalent to Plotly's dtick property. -Does not function if overview mode 'slider' is applied. (Current bug) -- width (number | string; optional): Width of the Viewer. -Property takes precedence over tileswidth and numtiles -if either of them is set. -- height (number | string; default 900): Width of the Viewer. -Property takes precedence over tilesheight if both -are set.""" + +- id (string; optional): + The ID of this component, used to identify dash components in + callbacks. The ID needs to be unique across all of the components + in an app. + +- 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. + +- conservationcolor (string; optional): + Color of the conservation secondary barplot, in common name, hex, + rgb or rgba format. + +- 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. + +- 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. + +- conservationopacity (number | string; optional): + Opacity of the conservation secondary barplot as a value between 0 + and 1. + +- 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. + +- data (string; optional): + Input data, either in FASTA or Clustal format. + +- eventDatum (string; optional): + A Dash prop that returns data on clicking, hovering or resizing + the viewer. + +- extension (string; default 'fasta'): + Format type of the input data, either in FASTA or Clustal. + +- 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; 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. + +- height (number | string; default 900): + Width of the Viewer. Property takes precedence over tilesheight if + both are set. + +- 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. + +- opacity (number | string; optional): + Opacity of the main plot as a value between 0 and 1. + +- overview (a value equal to: 'heatmap', 'slider', 'none'; default 'heatmap'): + Toggles whether the overview should be a heatmap, a slider, or + none. + +- 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). + +- 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. + +- showconservation (boolean; default True): + Enables the display of conservation secondary barplot where the + most conserved nucleotides or amino acids get greater bars. + +- showgap (boolean; default True): + Enables the display of gap secondary barplot where the sequence + regions with the fewest gaps get the greatest bars. + +- showid (boolean; default True): + Toggles displaying sequence IDs at left of alignment. + +- showlabel (boolean; default True): + Toggles displaying sequence labels at left of alignment. + +- 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; default 10): + Size of the nucleotide labels, as a number. + +- tickstart (number | string; optional): + Determines where to start annotating the first tile. If let blank + will be automatically determined by Plotly. Equivalent to Plotly's + tick0 property. Does not function if overview mode 'slider' is + applied. (Current bug). + +- ticksteps (number | string; optional): + Determines at what interval to keep annotating the tiles. If left + blank will be automatially determined by Plotly. Equivalent to + Plotly's dtick property. Does not function if overview mode + 'slider' is applied. (Current bug). + +- tileheight (number; default 16): + Sets how many pixels each nucleotide/amino acid on the Alignment + Chart takes up vertically. If enabled, set height dynamically. + +- tilewidth (number; default 16): + Sets how many pixels each nucleotide/amino acid on the Alignment + Chart 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. + +- width (number | string; optional): + Width of the Viewer. Property takes precedence over tileswidth and + numtiles if either of them is set.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, eventDatum=Component.UNDEFINED, data=Component.UNDEFINED, extension=Component.UNDEFINED, colorscale=Component.UNDEFINED, opacity=Component.UNDEFINED, textcolor=Component.UNDEFINED, textsize=Component.UNDEFINED, showlabel=Component.UNDEFINED, showid=Component.UNDEFINED, showconservation=Component.UNDEFINED, conservationcolor=Component.UNDEFINED, conservationcolorscale=Component.UNDEFINED, conservationopacity=Component.UNDEFINED, conservationmethod=Component.UNDEFINED, correctgap=Component.UNDEFINED, showgap=Component.UNDEFINED, gapcolor=Component.UNDEFINED, gapcolorscale=Component.UNDEFINED, gapopacity=Component.UNDEFINED, groupbars=Component.UNDEFINED, showconsensus=Component.UNDEFINED, tilewidth=Component.UNDEFINED, tileheight=Component.UNDEFINED, overview=Component.UNDEFINED, numtiles=Component.UNDEFINED, scrollskip=Component.UNDEFINED, tickstart=Component.UNDEFINED, ticksteps=Component.UNDEFINED, width=Component.UNDEFINED, height=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'eventDatum', 'data', 'extension', 'colorscale', 'opacity', 'textcolor', 'textsize', 'showlabel', 'showid', 'showconservation', 'conservationcolor', 'conservationcolorscale', 'conservationopacity', 'conservationmethod', 'correctgap', 'showgap', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'showconsensus', 'tilewidth', 'tileheight', 'overview', 'numtiles', 'scrollskip', 'tickstart', 'ticksteps', 'width', 'height'] + self._prop_names = ['id', 'colorscale', 'conservationcolor', 'conservationcolorscale', 'conservationmethod', 'conservationopacity', 'correctgap', 'data', 'eventDatum', 'extension', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'height', 'numtiles', 'opacity', 'overview', 'scrollskip', 'showconsensus', 'showconservation', 'showgap', 'showid', 'showlabel', 'textcolor', 'textsize', 'tickstart', 'ticksteps', 'tileheight', 'tilewidth', 'width'] self._type = 'AlignmentChart' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'eventDatum', 'data', 'extension', 'colorscale', 'opacity', 'textcolor', 'textsize', 'showlabel', 'showid', 'showconservation', 'conservationcolor', 'conservationcolorscale', 'conservationopacity', 'conservationmethod', 'correctgap', 'showgap', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'showconsensus', 'tilewidth', 'tileheight', 'overview', 'numtiles', 'scrollskip', 'tickstart', 'ticksteps', 'width', 'height'] + self.available_properties = ['id', 'colorscale', 'conservationcolor', 'conservationcolorscale', 'conservationmethod', 'conservationopacity', 'correctgap', 'data', 'eventDatum', 'extension', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'height', 'numtiles', 'opacity', 'overview', 'scrollskip', 'showconsensus', 'showconservation', 'showgap', 'showid', 'showlabel', 'textcolor', 'textsize', 'tickstart', 'ticksteps', 'tileheight', 'tilewidth', 'width'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/Circos.py b/dash_bio/Circos.py index 26a097cf2..39e6da96e 100644 --- a/dash_bio/Circos.py +++ b/dash_bio/Circos.py @@ -13,98 +13,136 @@ class Circos(Component): on github to learn more about this API. Keyword arguments: -- enableDownloadSVG (boolean; optional): Allow for an SVG snapshot of the Circos graph to be downloaded. -- enableZoomPan (boolean; optional): Allow for zooming and panning the Circos graph. -- id (string; optional): The ID of the component to be used in Dash callbacks -- style (dict; optional): The CSS styling of the div wrapping the component -- eventDatum (dict; optional): A Dash prop that returns data on clicking or hovering of the tracks. -Depending on what is specified for prop "selectEvent". -- selectEvent (dict; optional): A dictionary used to choose whether tracks should return -data on click, hover, or both, with the dash prop "eventDatum". -The keys of the dictionary represent the index of the list -specified for "tracks". -Ex: -selectEvent={ - "0": "hover", - "1": "click", - "2": "both" - }, -- 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; default 800): The overall size of the SVG container holding the -graph. Set on initilization and unchangeable thereafter. -- tracks (dict; optional): Tracks that specify specific layouts. -For a complete list of tracks and usage, -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: string | dict containing keys 'name'. -Those keys have the following types: - - name (string; required) | dict containing keys 'source', 'sourceID', 'target', 'targetEnd', 'targetID'. -Those keys have the following types: - - source (string; required) - - sourceID (string; optional) - - target (string; required) - - targetEnd (string; required) - - targetID (string; optional) - - 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: string | dict containing keys 'name'. -Those keys have the following types: - - name (string; required)""" + +- id (string; optional): + The ID of the component to be used in Dash callbacks. + +- config (dict; optional): + Configuration of overall layout of the graph. + +- enableDownloadSVG (boolean; optional): + Allow for an SVG snapshot of the Circos graph to be downloaded. + +- enableZoomPan (boolean; optional): + Allow for zooming and panning the Circos graph. + +- eventDatum (dict; optional): + A Dash prop that returns data on clicking or hovering of the + tracks. Depending on what is specified for prop \"selectEvent\". + +- layout (list of dicts; required): + The overall layout of the Circos graph, provided as a list of + dictionaries. + + `layout` is a list of dicts with keys: + + - color (string; required): + The color of the block. + + - id (string; required): + The id of the block, where it will recieve data from the + specified \"track\" id. + + - label (string; required): + The labels of the block. + + - len (number; required): + The length of the block. + +- selectEvent (dict; optional): + A dictionary used to choose whether tracks should return data on + click, hover, or both, with the dash prop \"eventDatum\". The keys + of the dictionary represent the index of the list specified for + \"tracks\". Ex: selectEvent={ \"0\": \"hover\", + \"1\": \"click\", \"2\": \"both\" },. + +- size (number; default 800): + The overall size of the SVG container holding the graph. Set on + initilization and unchangeable thereafter. + +- style (dict; optional): + The CSS styling of the div wrapping the component. + +- tracks (list of dicts; optional): + Tracks that specify specific layouts. For a complete list of + tracks and usage, please check the docs. + + `tracks` is a list of dicts with keys: + + - 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` is a string + + Or dict with keys: + + - name (string; required) + + - config (dict; optional): + The layout of the tracks, where the user can configure + innerRadius, outterRadius, ticks, labels, and more. + + - data (list; required): + The data that makes up the track. It can be a Json object. + + - id (string; optional): + The id of a specific piece of track data. + + - 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` is a string | dict with keys: + + - name (string; required) + + Or dict with keys: + + - source (string; required) + + - sourceID (string; optional) + + - target (string; required) + + - targetEnd (string; required) + + - targetID (string; optional) + + - 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.""" @_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'] + self._prop_names = ['id', 'config', 'enableDownloadSVG', 'enableZoomPan', 'eventDatum', 'layout', 'selectEvent', 'size', 'style', 'tracks'] self._type = 'Circos' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['enableDownloadSVG', 'enableZoomPan', 'id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks'] + self.available_properties = ['id', 'config', 'enableDownloadSVG', 'enableZoomPan', 'eventDatum', 'layout', 'selectEvent', 'size', 'style', 'tracks'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in ['layout']: if k not in args: raise TypeError( diff --git a/dash_bio/FornaContainer.py b/dash_bio/FornaContainer.py index 79560de5f..28a0df65e 100644 --- a/dash_bio/FornaContainer.py +++ b/dash_bio/FornaContainer.py @@ -10,87 +10,121 @@ class FornaContainer(Component): library (https://github.com/ViennaRNA/fornac). Keyword arguments: -- id (string; optional): The ID of this component, used to identify dash components in -callbacks. The ID needs to be unique across all of the -components in an app. -- height (number; default 500): The height (in px) of the container in which the molecules will -be displayed. -- width (number; default 300): The width (in px) of the container in which the molecules will -be displayed. -- sequences (dict; optional): The molecules that will be displayed. sequences has the following type: list of dicts containing keys 'sequence', 'structure', 'options'. -Those keys have the following types: - - sequence (string; required): A string representing the RNA nucleotide sequence of -the RNA molecule. - - structure (string; required): A dot-bracket string -(https://software.broadinstitute.org/software/igv/RNAsecStructure) -that specifies the secondary structure of the RNA -molecule. - - options (dict; optional): Additional options to be applied to the rendering of -the RNA molecule. options has the following type: dict containing keys 'applyForce', 'circularizeExternal', 'labelInterval', 'name', 'avoidOthers'. -Those keys have the following types: - - applyForce (boolean; optional): Indicate whether the force-directed layout will be -applied to the displayed molecule. Enabling this -option allows users to change the layout of the -molecule by selecting and dragging the individual -nucleotide nodes. True by default. - - circularizeExternal (boolean; optional): This only makes sense in connection with the -applyForce argument. If it's true, the external -loops will be arranged in a nice circle. If false, -they will be allowed to flop around as the force -layout dictates. True by default. - - labelInterval (number; optional): Change how often nucleotide numbers are labelled -with their number. 10 by default. - - name (string; optional): The molecule name; this is used in custom color -scales. - - avoidOthers (boolean; optional): Whether or not this molecule should "avoid" other -molecules in the map. -- nodeFillColor (string; optional): The fill color for all of the nodes. This will override any -color scheme defined in colorScheme. -- colorScheme (a value equal to: 'sequence', 'structure', 'positions', 'custom'; default 'sequence'): The color scheme that is used to color the nodes. -- customColors (dict; optional): The custom colors used to color the nodes if the 'custom' -option is chosen for the `colorScheme` prop. -For example, if the domain is `[0, 20]`, the range is -`['yellow', 'red']`, and the dictionary specified in -'colorValues' that corresponds to a molecule is `{'6': 10}`, -the sixth nucleotide in that molecule will have a color that is -perfectly in between yellow and red (i.e., orange), since 10 is -perfectly in between 0 and 20. customColors has the following type: dict containing keys 'domain', 'range', 'colorValues'. -Those keys have the following types: - - domain (list of numbers; optional): The limits for the color scale. This is used with the range -specified in `range` to calculate the color of a given -nucleotide, based on the number that it is assigned. - - range (list of strings; optional): The range of colors that will be used in conjunction with -the `domain` prop. - - colorValues (dict with strings as keys and values of type dict with strings as keys and values of type string | number; optional): A dictionary which contains keys, each of which are either -an empty string (`''`) or the name of a molecule that has -been defined in the `name` prop in the `options` for a -sequence in the `sequences` property. -The value corresponding to the key that is an empty string -(if that key exists) is a "default" color scheme that will -be applied first, and can be overridden by the color -schemes defined for molecule-specific keys. The -aforementioned color schemes each take the form of a -dictionary in which the keys are the nucleotide positions -and the values are either a) numbers to be normalized with -respect to the scale defined in `domain` (so that their -color will be calculated), or b) direct string -representations of colors. -- allowPanningAndZooming (boolean; default True): Allow users to zoom in and pan the display. If this is enabled, -then pressing the 'c' key on the keyboard will center the view.""" + +- id (string; optional): + The ID of this component, used to identify dash components in + callbacks. The ID needs to be unique across all of the components + in an app. + +- allowPanningAndZooming (boolean; default True): + Allow users to zoom in and pan the display. If this is enabled, + then pressing the 'c' key on the keyboard will center the view. + +- colorScheme (a value equal to: 'sequence', 'structure', 'positions', 'custom'; default 'sequence'): + The color scheme that is used to color the nodes. + +- customColors (dict; optional): + The custom colors used to color the nodes if the 'custom' option + is chosen for the `colorScheme` prop. For example, if the domain + is `[0, 20]`, the range is `['yellow', 'red']`, and the dictionary + specified in 'colorValues' that corresponds to a molecule is + `{'6': 10}`, the sixth nucleotide in that molecule will have a + color that is perfectly in between yellow and red (i.e., orange), + since 10 is perfectly in between 0 and 20. + + `customColors` is a dict with keys: + + - colorValues (dict with strings as keys and values of type dict with strings as keys and values of type string | number; optional): + A dictionary which contains keys, each of which are either an + empty string (`''`) or the name of a molecule that has been + defined in the `name` prop in the `options` for a sequence in + the `sequences` property. The value corresponding to the key + that is an empty string (if that key exists) is a \"default\" + color scheme that will be applied first, and can be overridden + by the color schemes defined for molecule-specific keys. The + aforementioned color schemes each take the form of a + dictionary in which the keys are the nucleotide positions and + the values are either a) numbers to be normalized with respect + to the scale defined in `domain` (so that their color will be + calculated), or b) direct string representations of colors. + + - domain (list of numbers; optional): + The limits for the color scale. This is used with the range + specified in `range` to calculate the color of a given + nucleotide, based on the number that it is assigned. + + - range (list of strings; optional): + The range of colors that will be used in conjunction with the + `domain` prop. + +- height (number; default 500): + The height (in px) of the container in which the molecules will be + displayed. + +- nodeFillColor (string; optional): + The fill color for all of the nodes. This will override any color + scheme defined in colorScheme. + +- sequences (list of dicts; optional): + The molecules that will be displayed. + + `sequences` is a list of dicts with keys: + + - options (dict; optional): + Additional options to be applied to the rendering of the RNA + molecule. + + `options` is a dict with keys: + + - applyForce (boolean; optional): + Indicate whether the force-directed layout will be applied + to the displayed molecule. Enabling this option allows + users to change the layout of the molecule by selecting + and dragging the individual nucleotide nodes. True by + default. + + - avoidOthers (boolean; optional): + Whether or not this molecule should \"avoid\" other + molecules in the map. + + - circularizeExternal (boolean; optional): + This only makes sense in connection with the applyForce + argument. If it's True, the external loops will be + arranged in a nice circle. If False, they will be allowed + to flop around as the force layout dictates. True by + default. + + - labelInterval (number; optional): + Change how often nucleotide numbers are labelled with + their number. 10 by default. + + - name (string; optional): + The molecule name; this is used in custom color scales. + + - sequence (string; required): + A string representing the RNA nucleotide sequence of the RNA + molecule. + + - structure (string; required): + A dot-bracket string + (https://software.broadinstitute.org/software/igv/RNAsecStructure) + that specifies the secondary structure of the RNA molecule. + +- width (number; default 300): + The width (in px) of the container in which the molecules will be + displayed.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, height=Component.UNDEFINED, width=Component.UNDEFINED, sequences=Component.UNDEFINED, nodeFillColor=Component.UNDEFINED, colorScheme=Component.UNDEFINED, customColors=Component.UNDEFINED, allowPanningAndZooming=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'height', 'width', 'sequences', 'nodeFillColor', 'colorScheme', 'customColors', 'allowPanningAndZooming'] + self._prop_names = ['id', 'allowPanningAndZooming', 'colorScheme', 'customColors', 'height', 'nodeFillColor', 'sequences', 'width'] self._type = 'FornaContainer' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'height', 'width', 'sequences', 'nodeFillColor', 'colorScheme', 'customColors', 'allowPanningAndZooming'] + self.available_properties = ['id', 'allowPanningAndZooming', 'colorScheme', 'customColors', 'height', 'nodeFillColor', 'sequences', 'width'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/Ideogram.py b/dash_bio/Ideogram.py index 51df20986..e52a028f4 100644 --- a/dash_bio/Ideogram.py +++ b/dash_bio/Ideogram.py @@ -16,153 +16,247 @@ class Ideogram(Component): Component's props: https://github.com/eweitz/ideogram/blob/master/api.md Keyword arguments: -- id (string; required): The ID used to identify this component in Dash callbacks and used to identify Ideogram -instances. -- style (dict; optional): The component's inline styles -- className (string; optional): The CSS class of the component wrapper -- annotationsLayout (a value equal to: 'tracks', 'histogram', 'overlay'; default 'tracks'): Layout of ideogram annotations. -One of "tracks", "histogram", or "overlay". - -"tracks": display annotations in tracks beside each chromosome. - -"histogram": display annotations in a histogram. Clusters annotations by location. Each -cluster/bin is shown as a bar, the height of which represents the number of annotations on -genomic range. - -"overlay": display annotations directly over chromosomes. -- annotations (dict; 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. annotations has the following type: list of dicts containing keys 'name', 'chr', 'start', 'stop'. -Those keys have the following types: - - name (string; optional) - - chr (string; optional) - - start (number; optional) - - stop (number; optional) -- annotationsPath (string; optional): An absolute or relative URL directing to a JSON file containing annotation objects (JSON). -- annotationsData (string; optional): Use this prop in a dash callback to return annotationData when hovered. -It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with -dash.dependencies.Input -- annotationTracks (list of dicts; optional): A list of objects with metadata for each track, e.g., id, display name, color, shape. -- annotationHeight (number; optional): Not used if annotationsLayout is set to "overlay". -The height of histogram bars or the size of annotations tracks symbols -- annotationsColor (string; default '#F00'): Color of annotations. -- histogramScaling (a value equal to: 'absolute', 'relative'; optional): Scaling of histogram bars height -Only used if annotationsLayout is set to "histogram". -One of "absolute" or "relative". - -"absolute": sets bar height relative to tallest bar in all chromosomes. -"relative": sets bar height relative to tallest bar in each chromosome. -- barWidth (number; default 3): Pixel width of histogram bars. -Only used if annotationsLayout is set to "histogram". -- showAnnotTooltip (boolean; default True): Whether to show a tooltip upon mousing over an annotation. -- 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") -- 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 (dict; optional): A dash callback that is activated when the 'brush' prop is used. -It will return an dictionary like so: -{'start': , 'end': , 'extent': } -where start is the left most edge, end is right most edge, and extent is the total width of -the brush. -It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with -dash.dependencies.Input. brushData has the following type: dict containing keys 'start', 'end', 'extent'. -Those keys have the following types: - - start (string; optional) - - end (string; optional) - - extent (string; optional) -- 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; default 400): The pixel height of the tallest chromosome in the ideogram -- chrMargin (number; default 10): The pixel space of margin between each chromosome. -- chrWidth (number; default 10): The pixel width of each chromosome. -- chromosomes (list of strings | dict; optional): A list of the names of chromosomes to display. Useful for depicting a subset of the -chromosomes in the genome, e.g., a single chromosome. - -If Homology (between two different species): -Ex: chromosomes={ - 'human': ['1'], - 'mouse': ['4'] -} - -General case to specify specific chromosomes: -Ex: chromosomes=['1', '2'] -- dataDir (string; default 'https://unpkg.com/ideogram@1.5.0/dist/data/bands/native/'): Absolute or relative URL of the directory containing data needed to draw banded chromosomes. -You will need to set up your own database to grab data from a custom database. -- organism (string | number; default 'human'): 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. -- localOrganism (dict; optional): Provide local JSON organism into this prop from a local user JSON file. -DataDir must not be initialized. -- homology (dict; optional): Used to compare two chromosomes. -The keys "chrOne" and "chrTwo" represent one chromosome each. Organism is the taxID or name. -Start is an array, containing start one and start two, in this order. Stop is an array, -containing stop one, and stop two, in this order. -Ex: homology={ - "chrOne": { - organism": "9606", - "start": [50000, 155701383], - "stop": [900000, 156030895] - }, - "chrTwo": { - organism": "10090", - "start": [10001, 50000000], - "stop": [2781479, 57217415] - } -}. homology has the following type: dict containing keys 'chrOne', 'chrTwo'. -Those keys have the following types: - - chrOne (dict; optional): chrOne has the following type: dict containing keys 'organism', 'start', 'stop'. -Those keys have the following types: - - organism (string; required) - - start (list of numbers; optional) - - stop (list of numbers; optional) - - chrTwo (dict; optional): chrTwo has the following type: dict containing keys 'organism', 'start', 'stop'. -Those keys have the following types: - - organism (string; required) - - start (list of numbers; optional) - - stop (list of numbers; optional) -- perspective (a value equal to: 'comparative'; optional): Use perspective: 'comparative' to enable annotations between two chromosomes, -either within the same organism or different organisms. Used for homology. -- fullChromosomeLabels (boolean; optional): Whether to include abbreviation species name in chromosome label. Used for homology. -- resolution (number; optional): The resolution of cytogenetic bands to show for each chromosome. -The quantity refers to an approximate value in bands per haploid set (bphs). -One of 450, 550, or 850. -- filterable (boolean; optional): Whether annotations should be filterable or not. -- orientation (a value equal to: 'vertical', 'horizontal'; optional): The orientation of chromosomes on the page. -- ploidy (number; default 1): The ploidy - number of chromosomes to depict for each chromosome set. -- ploidyDesc (list of dicts; optional): Description of ploidy in each chromosome set in terms of ancestry composition. -- ancestors (dict; optional): A map associating ancestor labels to colors. Used to color -chromosomes from different ancestors in polyploid genomes. -- rangeSet (list of dicts; optional): List of objects describing segments of recombination among chromosomes in a chromosome set. -- rotatable (boolean; default True): Whether chromosomes are rotatable on click. -- rotated (boolean; optional): Dash callback that returns true if rotated, and false if not. -- sex (a value equal to: 'male', 'female'; optional): Useful for omitting chromosome Y in female animals. -Currently only supported for organisms that use XY sex-determination. -- showChromosomeLabels (boolean; default True): Whether to show chromosome labels, e.g., 1, 2, 3, X, Y. -- showBandLabels (boolean; default False): Whether to show cytogenetic band labels, e.g., 1q21. -- showFullyBanded (boolean; default True): 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; default False): Whether to show non-nuclear chromosomes, -e.g., for mitochondrial (MT) and chloroplast (CP) DNA.""" + +- id (string; required): + The ID used to identify this component in Dash callbacks and used + to identify Ideogram instances. + +- ancestors (dict; optional): + A map associating ancestor labels to colors. Used to color + chromosomes from different ancestors in polyploid genomes. + +- annotationHeight (number; optional): + Not used if annotationsLayout is set to \"overlay\". The height of + histogram bars or the size of annotations tracks symbols. + +- annotationTracks (list of dicts; optional): + A list of objects with metadata for each track, e.g., id, display + name, color, shape. + +- annotations (list of dicts; 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. + + `annotations` is a list of dicts with keys: + + - chr (string; optional) + + - name (string; optional) + + - start (number; optional) + + - stop (number; optional) + +- annotationsColor (string; default '#F00'): + Color of annotations. + +- annotationsData (string; optional): + Use this prop in a dash callback to return annotationData when + hovered. It is read-only, i.e., it cannot be used with + dash.dependencies.Output but only with dash.dependencies.Input. + +- annotationsLayout (a value equal to: 'tracks', 'histogram', 'overlay'; default 'tracks'): + Layout of ideogram annotations. One of \"tracks\", \"histogram\", + or \"overlay\". \"tracks\": display annotations in tracks beside + each chromosome. \"histogram\": display annotations in a + histogram. Clusters annotations by location. Each cluster/bin is + shown as a bar, the height of which represents the number of + annotations on genomic range. \"overlay\": display annotations + directly over chromosomes. + +- annotationsPath (string; optional): + An absolute or relative URL directing to a JSON file containing + annotation objects (JSON). + +- 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; default 3): + Pixel width of histogram bars. Only used if annotationsLayout is + set to \"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, and create an interactive sliding window to other + regions. + +- brushData (dict; optional): + A dash callback that is activated when the 'brush' prop is used. + It will return an dictionary like so: {'start': , 'end': + , 'extent': } where start is the left most edge, end + is right most edge, and extent is the total width of the brush. It + is read-only, i.e., it cannot be used with + dash.dependencies.Output but only with dash.dependencies.Input. + + `brushData` is a dict with keys: + + - end (string; optional) + + - extent (string; optional) + + - start (string; optional) + +- chrHeight (number; default 400): + The pixel height of the tallest chromosome in the ideogram. + +- chrMargin (number; default 10): + The pixel space of margin between each chromosome. + +- chrWidth (number; default 10): + The pixel width of each chromosome. + +- chromosomes (list of strings | dict; optional): + A list of the names of chromosomes to display. Useful for + depicting a subset of the chromosomes in the genome, e.g., a + single chromosome. If Homology (between two different species): + Ex: chromosomes={ 'human': ['1'], 'mouse': ['4'] } + General case to specify specific chromosomes: Ex: + chromosomes=['1', '2']. + +- className (string; optional): + The CSS class of the component wrapper. + +- 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. + +- dataDir (string; default 'https://unpkg.com/ideogram@1.5.0/dist/data/bands/native/'): + Absolute or relative URL of the directory containing data needed + to draw banded chromosomes. You will need to set up your own + database to grab data from a custom database. + +- filterable (boolean; optional): + Whether annotations should be filterable or not. + +- fullChromosomeLabels (boolean; optional): + Whether to include abbreviation species name in chromosome label. + Used for homology. + +- histogramScaling (a value equal to: 'absolute', 'relative'; optional): + Scaling of histogram bars height Only used if annotationsLayout is + set to \"histogram\". One of \"absolute\" or \"relative\". + \"absolute\": sets bar height relative to tallest bar in all + chromosomes. \"relative\": sets bar height relative to tallest bar + in each chromosome. + +- homology (dict; optional): + Used to compare two chromosomes. The keys \"chrOne\" and + \"chrTwo\" represent one chromosome each. Organism is the taxID or + name. Start is an array, containing start one and start two, in + this order. Stop is an array, containing stop one, and stop two, + in this order. Ex: homology={ \"chrOne\": { + organism\": \"9606\", \"start\": [50000, 155701383], + \"stop\": [900000, 156030895] }, \"chrTwo\": { + organism\": \"10090\", \"start\": [10001, 50000000], + \"stop\": [2781479, 57217415] } }. + + `homology` is a dict with keys: + + - chrOne (dict; optional) + + `chrOne` is a dict with keys: + + - organism (string; required) + + - start (list of numbers; optional) + + - stop (list of numbers; optional) + + - chrTwo (dict; optional) + + `chrTwo` is a dict with keys: + + - organism (string; required) + + - start (list of numbers; optional) + + - stop (list of numbers; optional) + +- localOrganism (dict; optional): + Provide local JSON organism into this prop from a local user JSON + file. DataDir must not be initialized. + +- organism (string | number; default 'human'): + 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 (a value equal to: 'vertical', 'horizontal'; optional): + The orientation of chromosomes on the page. + +- perspective (a value equal to: 'comparative'; optional): + Use perspective: 'comparative' to enable annotations between two + chromosomes, either within the same organism or different + organisms. Used for homology. + +- ploidy (number; default 1): + The ploidy - number of chromosomes to depict for each chromosome + set. + +- ploidyDesc (list of dicts; optional): + Description of ploidy in each chromosome set in terms of ancestry + composition. + +- rangeSet (list of dicts; optional): + List of objects describing segments of recombination among + chromosomes in a chromosome set. + +- resolution (number; optional): + The resolution of cytogenetic bands to show for each chromosome. + The quantity refers to an approximate value in bands per haploid + set (bphs). One of 450, 550, or 850. + +- rotatable (boolean; default True): + Whether chromosomes are rotatable on click. + +- rotated (boolean; optional): + Dash callback that returns True if rotated, and False if not. + +- sex (a value equal to: 'male', 'female'; optional): + Useful for omitting chromosome Y in female animals. Currently only + supported for organisms that use XY sex-determination. + +- showAnnotTooltip (boolean; default True): + Whether to show a tooltip upon mousing over an annotation. + +- showBandLabels (boolean; default False): + Whether to show cytogenetic band labels, e.g., 1q21. + +- showChromosomeLabels (boolean; default True): + Whether to show chromosome labels, e.g., 1, 2, 3, X, Y. + +- showFullyBanded (boolean; default True): + 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; default False): + Whether to show non-nuclear chromosomes, e.g., for mitochondrial + (MT) and chloroplast (CP) DNA. + +- style (dict; optional): + The component's inline styles.""" @_explicitize_args def __init__(self, id=Component.REQUIRED, style=Component.UNDEFINED, className=Component.UNDEFINED, annotationsLayout=Component.UNDEFINED, annotations=Component.UNDEFINED, annotationsPath=Component.UNDEFINED, annotationsData=Component.UNDEFINED, annotationTracks=Component.UNDEFINED, annotationHeight=Component.UNDEFINED, annotationsColor=Component.UNDEFINED, histogramScaling=Component.UNDEFINED, barWidth=Component.UNDEFINED, showAnnotTooltip=Component.UNDEFINED, assembly=Component.UNDEFINED, brush=Component.UNDEFINED, brushData=Component.UNDEFINED, container=Component.UNDEFINED, chrHeight=Component.UNDEFINED, chrMargin=Component.UNDEFINED, chrWidth=Component.UNDEFINED, chromosomes=Component.UNDEFINED, dataDir=Component.UNDEFINED, organism=Component.UNDEFINED, localOrganism=Component.UNDEFINED, homology=Component.UNDEFINED, perspective=Component.UNDEFINED, fullChromosomeLabels=Component.UNDEFINED, resolution=Component.UNDEFINED, filterable=Component.UNDEFINED, orientation=Component.UNDEFINED, ploidy=Component.UNDEFINED, ploidyDesc=Component.UNDEFINED, ancestors=Component.UNDEFINED, rangeSet=Component.UNDEFINED, rotatable=Component.UNDEFINED, rotated=Component.UNDEFINED, sex=Component.UNDEFINED, showChromosomeLabels=Component.UNDEFINED, showBandLabels=Component.UNDEFINED, showFullyBanded=Component.UNDEFINED, showNonNuclearChromosomes=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'style', 'className', 'annotationsLayout', 'annotations', 'annotationsPath', 'annotationsData', 'annotationTracks', 'annotationHeight', 'annotationsColor', 'histogramScaling', 'barWidth', 'showAnnotTooltip', 'assembly', 'brush', 'brushData', 'container', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'dataDir', 'organism', 'localOrganism', 'homology', 'perspective', 'fullChromosomeLabels', 'resolution', 'filterable', 'orientation', 'ploidy', 'ploidyDesc', 'ancestors', 'rangeSet', 'rotatable', 'rotated', 'sex', 'showChromosomeLabels', 'showBandLabels', 'showFullyBanded', 'showNonNuclearChromosomes'] + self._prop_names = ['id', 'ancestors', 'annotationHeight', 'annotationTracks', 'annotations', 'annotationsColor', 'annotationsData', 'annotationsLayout', 'annotationsPath', 'assembly', 'barWidth', 'brush', 'brushData', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'className', 'container', 'dataDir', 'filterable', 'fullChromosomeLabels', 'histogramScaling', 'homology', 'localOrganism', 'organism', 'orientation', 'perspective', 'ploidy', 'ploidyDesc', 'rangeSet', 'resolution', 'rotatable', 'rotated', 'sex', 'showAnnotTooltip', 'showBandLabels', 'showChromosomeLabels', 'showFullyBanded', 'showNonNuclearChromosomes', 'style'] self._type = 'Ideogram' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'style', 'className', 'annotationsLayout', 'annotations', 'annotationsPath', 'annotationsData', 'annotationTracks', 'annotationHeight', 'annotationsColor', 'histogramScaling', 'barWidth', 'showAnnotTooltip', 'assembly', 'brush', 'brushData', 'container', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'dataDir', 'organism', 'localOrganism', 'homology', 'perspective', 'fullChromosomeLabels', 'resolution', 'filterable', 'orientation', 'ploidy', 'ploidyDesc', 'ancestors', 'rangeSet', 'rotatable', 'rotated', 'sex', 'showChromosomeLabels', 'showBandLabels', 'showFullyBanded', 'showNonNuclearChromosomes'] + self.available_properties = ['id', 'ancestors', 'annotationHeight', 'annotationTracks', 'annotations', 'annotationsColor', 'annotationsData', 'annotationsLayout', 'annotationsPath', 'assembly', 'barWidth', 'brush', 'brushData', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'className', 'container', 'dataDir', 'filterable', 'fullChromosomeLabels', 'histogramScaling', 'homology', 'localOrganism', 'organism', 'orientation', 'perspective', 'ploidy', 'ploidyDesc', 'rangeSet', 'resolution', 'rotatable', 'rotated', 'sex', 'showAnnotTooltip', 'showBandLabels', 'showChromosomeLabels', 'showFullyBanded', 'showNonNuclearChromosomes', 'style'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in ['id']: if k not in args: raise TypeError( diff --git a/dash_bio/Igv.py b/dash_bio/Igv.py index 281c04776..4131bdb86 100644 --- a/dash_bio/Igv.py +++ b/dash_bio/Igv.py @@ -10,36 +10,54 @@ class Igv(Component): example integration of igv.js and React (https://www.npmjs.com/package/igv). Keyword arguments: -- id (string; optional): The ID of this component, used to identify dash components in callbacks. -The ID needs to be unique across all of the components in an app. -- style (dict; optional): Generic style overrides on the plot div -- className (string; optional): className of the component div. -- genome (string; optional): String identifier defining genome (e.g. "hg19"). See https://github.com/igvteam/igv.js/wiki/Reference-Genome - for details and list of supported identifiers. Note: One (but only one) of - either genome or reference properties must be set. If both are set, - the genome property will be ignored. -- reference (dict; optional): Object defining reference genome. see https://github.com/igvteam/igv.js/wiki/Reference-Genome - Note: One (but only one) of either genome or reference properties must be set. If both are set, - the genome property will be ignored. -- locus (string; optional): Initial genomic location(s). Either a string or an array of strings. - If an array a viewport is created for each location. -- minimumBases (number; optional): Minimum window size in base pairs when zooming in -- tracks (list; optional): Array of configuration objects defining tracks initially displayed when app launches. - see https://github.com/igvteam/igv.js/wiki/Tracks-2.0""" + +- id (string; optional): + The ID of this component, used to identify dash components in + callbacks. The ID needs to be unique across all of the components + in an app. + +- className (string; optional): + className of the component div. + +- genome (string; optional): + String identifier defining genome (e.g. \"hg19\"). See + https://github.com/igvteam/igv.js/wiki/Reference-Genome for + details and list of supported identifiers. Note: One (but only + one) of either genome or reference properties must be set. If + both are set, the genome property will be ignored. + +- locus (string; optional): + Initial genomic location(s). Either a string or an array of + strings. If an array a viewport is created for each location. + +- minimumBases (number; optional): + Minimum window size in base pairs when zooming in. + +- reference (dict; optional): + Object defining reference genome. see + https://github.com/igvteam/igv.js/wiki/Reference-Genome Note: + One (but only one) of either genome or reference properties must + be set. If both are set, the genome property will be ignored. + +- style (dict; optional): + Generic style overrides on the plot div. + +- tracks (list; optional): + Array of configuration objects defining tracks initially displayed + when app launches. see + https://github.com/igvteam/igv.js/wiki/Tracks-2.0.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, genome=Component.UNDEFINED, reference=Component.UNDEFINED, locus=Component.UNDEFINED, minimumBases=Component.UNDEFINED, tracks=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'style', 'className', 'genome', 'reference', 'locus', 'minimumBases', 'tracks'] + self._prop_names = ['id', 'className', 'genome', 'locus', 'minimumBases', 'reference', 'style', 'tracks'] self._type = 'Igv' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'style', 'className', 'genome', 'reference', 'locus', 'minimumBases', 'tracks'] + self.available_properties = ['id', 'className', 'genome', 'locus', 'minimumBases', 'reference', 'style', 'tracks'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/Molecule2dViewer.py b/dash_bio/Molecule2dViewer.py index 8ae5216a0..dce9a160d 100644 --- a/dash_bio/Molecule2dViewer.py +++ b/dash_bio/Molecule2dViewer.py @@ -11,41 +11,59 @@ class Molecule2dViewer(Component): https://github.com/Autodesk/molecule-2d-for-react Keyword arguments: -- id (string; optional): The ID used to identify this component in callbacks. -- selectedAtomIds (list of numbers; optional): The selected atom IDs. -- width (number; default 500): The width of the SVG element. -- height (number; default 500): The height of the SVG element. -- modelData (dict; default { - nodes: [], - links: [], -}): Description of the molecule to display. modelData has the following type: dict containing keys 'nodes', 'links'. -Those keys have the following types: - - nodes (dict; optional): nodes has the following type: list of dicts containing keys 'id', 'atom'. -Those keys have the following types: - - id (number; optional) - - atom (string; optional) - - links (dict; optional): links has the following type: list of dicts containing keys 'id', 'source', 'target', 'bond', 'strength', 'distance'. -Those keys have the following types: - - id (number; optional) - - source (optional) - - target (optional) - - bond (number; optional) - - strength (number; optional) - - distance (number; optional)""" + +- id (string; optional): + The ID used to identify this component in callbacks. + +- height (number; default 500): + The height of the SVG element. + +- modelData (dict; default { nodes: [], links: [],}): + Description of the molecule to display. + + `modelData` is a dict with keys: + + - links (list of dicts; optional) + + `links` is a list of dicts with keys: + + - bond (number; optional) + + - distance (number; optional) + + - id (number; optional) + + - source (optional) + + - strength (number; optional) + + - target (optional) + + - nodes (list of dicts; optional) + + `nodes` is a list of dicts with keys: + + - atom (string; optional) + + - id (number; optional) + +- selectedAtomIds (list of numbers; optional): + The selected atom IDs. + +- width (number; default 500): + The width of the SVG element.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, selectedAtomIds=Component.UNDEFINED, width=Component.UNDEFINED, height=Component.UNDEFINED, modelData=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'selectedAtomIds', 'width', 'height', 'modelData'] + self._prop_names = ['id', 'height', 'modelData', 'selectedAtomIds', 'width'] self._type = 'Molecule2dViewer' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'selectedAtomIds', 'width', 'height', 'modelData'] + self.available_properties = ['id', 'height', 'modelData', 'selectedAtomIds', 'width'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/Molecule3dViewer.py b/dash_bio/Molecule3dViewer.py index 0deab7c01..2ab5759a3 100644 --- a/dash_bio/Molecule3dViewer.py +++ b/dash_bio/Molecule3dViewer.py @@ -12,50 +12,125 @@ class Molecule3dViewer(Component): https://github.com/Autodesk/molecule-3d-for-react Keyword arguments: -- id (string; optional): The ID used to identify this component in callbacks -- selectionType (a value equal to: 'atom', 'residue', 'chain'; default 'atom'): The selection type - may be atom, residue or chain -- backgroundColor (string; default '#FFFFFF'): Property to change the background color of the molecule viewer -- backgroundOpacity (number; default 0): Property to change the background opacity - ranges from 0 to 1 -- styles (dict; optional): Property that can be used to change the representation of -the molecule. Options include sticks, cartoon and sphere. styles has the following type: list of dicts containing keys 'color', 'visualization_type'. -Those keys have the following types: - - color (string; optional) - - visualization_type (a value equal to: 'cartoon', 'sphere', 'stick'; optional) -- modelData (dict; optional): The data that will be used to display the molecule in 3D -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) - - bonds (list; optional) -- atomLabelsShown (boolean; optional): Property to either show or hide labels -- selectedAtomIds (list; optional): Property that stores a list of all selected atoms -- labels (list of dicts; optional): Labels corresponding to the atoms of the molecule. -Each label has a `text` field, a string containing the label content, -and can have many other styling fields as described in -https://3dmol.csb.pitt.edu/doc/types.html#LabelSpec -- orbital (dict; optional): Add an isosurface from volumetric data provided in the `cube_file`. orbital has the following type: dict containing keys 'cube_file', 'iso_val', 'opacity', 'positiveVolumetricColor', 'negativeVolumetricColor'. -Those keys have the following types: - - cube_file (string; optional): The filepath containing raw volumetric data for vertex coloring - - iso_val (number; optional): The isovalue to draw the surface at - - opacity (number; optional): Transparency of the surface, between 0 and 1 - - positiveVolumetricColor (string; optional): Color for the positive value of the isosurface orbital - - negativeVolumetricColor (string; optional): Color for the negative value of the isosurface orbital -- shapes (list of dicts; optional): Add a predefined renderable shape objects to the molecule. -Valid shape types are Arrow, Sphere, and Cylinder.""" + +- id (string; optional): + The ID used to identify this component in callbacks. + +- atomLabelsShown (boolean; optional): + Property to either show or hide labels. + +- backgroundColor (string; default '#FFFFFF'): + Property to change the background color of the molecule viewer. + +- backgroundOpacity (number; default 0): + Property to change the background opacity - ranges from 0 to 1. + +- labels (list of dicts; optional): + Labels corresponding to the atoms of the molecule. Each label has + a `text` field, a string containing the label content, and can + have many other styling fields as described in + https://3dmol.csb.pitt.edu/doc/types.html#LabelSpec. + +- modelData (dict; optional): + The data that will be used to display the molecule in 3D The data + will be in JSON format and should have two main dictionaries - + atoms, bonds. + + `modelData` is a dict with keys: + + - atoms (list; optional) + + - bonds (list; optional) + +- orbital (dict; optional): + Add an isosurface from volumetric data provided in the + `cube_file`. + + `orbital` is a dict with keys: + + - cube_file (string; optional): + The filepath containing raw volumetric data for vertex + coloring. + + - iso_val (number; optional): + The isovalue to draw the surface at. + + - negativeVolumetricColor (string; optional): + Color for the negative value of the isosurface orbital. + + - opacity (number; optional): + Transparency of the surface, between 0 and 1. + + - positiveVolumetricColor (string; optional): + Color for the positive value of the isosurface orbital. + +- selectedAtomIds (list; optional): + Property that stores a list of all selected atoms. + +- selectionType (a value equal to: 'atom', 'residue', 'chain'; default 'atom'): + The selection type - may be atom, residue or chain. + +- shapes (list of dicts; optional): + Add a predefined renderable shape objects to the molecule. Valid + shape types are Arrow, Sphere, and Cylinder. + +- styles (list of dicts; optional): + Property that can be used to change the representation of the + molecule. Options include sticks, cartoon and sphere. + + `styles` is a list of dicts with keys: + + - color (string; optional) + + - visualization_type (a value equal to: 'cartoon', 'sphere', 'stick'; optional) + +- zoom (dict; default { factor: 0.8, animationDuration: 0, fixedPath: True,}): + Zoom the current view by a constant factor, with optional + parameters to modify the duration and motion of the zoom + animation. + + `zoom` is a dict with keys: + + - animationDuration (number; optional): + An optional parameter that denotes the duration of a zoom + animation. + + - factor (number; optional): + Magnification factor. Values greater than 1 will zoom, in, + less than one will zoom out. Default 2. + + - fixedPath (boolean; optional): + If True, animation is constrained to requested motion, + overriding updates that happen during the animation. + +- zoomTo (dict; default { sel: {}, animationDuration: 0, fixedPath: True,}): + Zoom to center of atom selection. + + `zoomTo` is a dict with keys: + + - animationDuration (number; optional): + An optional parameter that denotes the duration of a zoom + animation. + + - fixedPath (boolean; optional): + If True, animation is constrained to requested motion, + overriding updates that happen during the animation. + + - sel (dict; optional): + Selection specification specifying model and atom properties + to select. Default: all atoms in viewer.""" @_explicitize_args - def __init__(self, id=Component.UNDEFINED, selectionType=Component.UNDEFINED, backgroundColor=Component.UNDEFINED, backgroundOpacity=Component.UNDEFINED, styles=Component.UNDEFINED, modelData=Component.UNDEFINED, atomLabelsShown=Component.UNDEFINED, selectedAtomIds=Component.UNDEFINED, labels=Component.UNDEFINED, orbital=Component.UNDEFINED, shapes=Component.UNDEFINED, onRenderNewData=Component.UNDEFINED, onChangeSelection=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'selectionType', 'backgroundColor', 'backgroundOpacity', 'styles', 'modelData', 'atomLabelsShown', 'selectedAtomIds', 'labels', 'orbital', 'shapes'] + def __init__(self, id=Component.UNDEFINED, selectionType=Component.UNDEFINED, backgroundColor=Component.UNDEFINED, backgroundOpacity=Component.UNDEFINED, styles=Component.UNDEFINED, modelData=Component.UNDEFINED, atomLabelsShown=Component.UNDEFINED, selectedAtomIds=Component.UNDEFINED, labels=Component.UNDEFINED, orbital=Component.UNDEFINED, zoom=Component.UNDEFINED, zoomTo=Component.UNDEFINED, shapes=Component.UNDEFINED, onRenderNewData=Component.UNDEFINED, onChangeSelection=Component.UNDEFINED, **kwargs): + self._prop_names = ['id', 'atomLabelsShown', 'backgroundColor', 'backgroundOpacity', 'labels', 'modelData', 'orbital', 'selectedAtomIds', 'selectionType', 'shapes', 'styles', 'zoom', 'zoomTo'] self._type = 'Molecule3dViewer' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'selectionType', 'backgroundColor', 'backgroundOpacity', 'styles', 'modelData', 'atomLabelsShown', 'selectedAtomIds', 'labels', 'orbital', 'shapes'] + self.available_properties = ['id', 'atomLabelsShown', 'backgroundColor', 'backgroundOpacity', 'labels', 'modelData', 'orbital', 'selectedAtomIds', 'selectionType', 'shapes', 'styles', 'zoom', 'zoomTo'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/NeedlePlot.py b/dash_bio/NeedlePlot.py index a8b6d6be8..62626c701 100644 --- a/dash_bio/NeedlePlot.py +++ b/dash_bio/NeedlePlot.py @@ -10,99 +10,71 @@ class NeedlePlot(Component): the plot correspond to bars in a histogram. Keyword arguments: -- id (string; optional): The ID of this component, used to identify dash components -in callbacks. The ID needs to be unique across all of the -components in an app. -- mutationData (dict; default { - x: [], - y: [], - domains: [], - mutationGroups: [], -}): The data that are displayed on the plot. mutationData has the following type: dict containing keys 'x', 'y', 'mutationGroups', 'domains'. -Those keys have the following types: - - x (string | list; optional) - - y (string | list; optional) - - mutationGroups (list of strings; optional) - - domains (list; optional) -- xlabel (string; optional): Title of the x-axis. -- ylabel (string; optional): Title of the y-axis. -- rangeSlider (boolean; default False): If true, enables a rangeslider for the x-axis. -- needleStyle (dict; default { - stemColor: '#444', - stemThickness: 0.5, - stemConstHeight: false, - headSize: 5, - headColor: [ - '#e41a1c', - '#377eb8', - '#4daf4a', - '#984ea3', - '#ff7f00', - '#ffff33', - '#a65628', - '#f781bf', - '#999999', - '#e41a1c', - '#377eb8', - '#4daf4a', - '#984ea3', - '#ff7f00', - '#ffff33', - '#a65628', - '#f781bf', - '#999999', - '#e41a1c', - ], - headSymbol: 'circle', -}): Options for the needle marking single site mutations. needleStyle has the following type: dict containing keys 'stemColor', 'stemThickness', 'stemConstHeight', 'headSize', 'headColor', 'headSymbol'. -Those keys have the following types: - - stemColor (string; optional) - - stemThickness (number; optional) - - stemConstHeight (boolean; optional) - - headSize (number; optional) - - headColor (list | string; optional) - - headSymbol (list | string; optional) -- domainStyle (dict; default { - displayMinorDomains: false, - domainColor: [ - '#8dd3c7', - '#ffffb3', - '#bebada', - '#fb8072', - '#80b1d3', - '#fdb462', - '#b3de69', - '#fccde5', - '#d9d9d9', - '#bc80bd', - '#ccebc5', - '#ffed6f', - '#8dd3c7', - '#ffffb3', - '#bebada', - '#fb8072', - '#80b1d3', - '#fdb462', - '#b3de69', - ], -}): Options for the protein domain coloring. domainStyle has the following type: dict containing keys 'domainColor', 'displayMinorDomains'. -Those keys have the following types: - - domainColor (list; optional) - - displayMinorDomains (boolean; optional)""" + +- id (string; optional): + The ID of this component, used to identify dash components in + callbacks. The ID needs to be unique across all of the components + in an app. + +- domainStyle (dict; default { displayMinorDomains: False, domainColor: [ '#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9', '#bc80bd', '#ccebc5', '#ffed6f', '#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', ],}): + Options for the protein domain coloring. + + `domainStyle` is a dict with keys: + + - displayMinorDomains (boolean; optional) + + - domainColor (list; optional) + +- mutationData (dict; default { x: [], y: [], domains: [], mutationGroups: [],}): + The data that are displayed on the plot. + + `mutationData` is a dict with keys: + + - domains (list; optional) + + - mutationGroups (list of strings; optional) + + - x (string | list; optional) + + - y (string | list; optional) + +- needleStyle (dict; default { stemColor: '#444', stemThickness: 0.5, stemConstHeight: False, headSize: 5, headColor: [ '#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999', '#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999', '#e41a1c', ], headSymbol: 'circle',}): + Options for the needle marking single site mutations. + + `needleStyle` is a dict with keys: + + - headColor (list | string; optional) + + - headSize (number; optional) + + - headSymbol (list | string; optional) + + - stemColor (string; optional) + + - stemConstHeight (boolean; optional) + + - stemThickness (number; optional) + +- rangeSlider (boolean; default False): + If True, enables a rangeslider for the x-axis. + +- xlabel (string; optional): + Title of the x-axis. + +- ylabel (string; optional): + Title of the y-axis.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, mutationData=Component.UNDEFINED, xlabel=Component.UNDEFINED, ylabel=Component.UNDEFINED, rangeSlider=Component.UNDEFINED, needleStyle=Component.UNDEFINED, domainStyle=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'mutationData', 'xlabel', 'ylabel', 'rangeSlider', 'needleStyle', 'domainStyle'] + self._prop_names = ['id', 'domainStyle', 'mutationData', 'needleStyle', 'rangeSlider', 'xlabel', 'ylabel'] self._type = 'NeedlePlot' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'mutationData', 'xlabel', 'ylabel', 'rangeSlider', 'needleStyle', 'domainStyle'] + self.available_properties = ['id', 'domainStyle', 'mutationData', 'needleStyle', 'rangeSlider', 'xlabel', 'ylabel'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/NglMoleculeViewer.py b/dash_bio/NglMoleculeViewer.py index 8ad97faeb..1de3a043a 100644 --- a/dash_bio/NglMoleculeViewer.py +++ b/dash_bio/NglMoleculeViewer.py @@ -13,131 +13,146 @@ class NglMoleculeViewer(Component): https://github.com/arose/ngl Keyword arguments: -- id (string; optional): The ID of this component, used to identify dash components in callbacks. -The ID needs to be unique across all of the components in an app. -- width (string | number; default '600px'): The width (in px or as a number) of the container -in which the molecules will be displayed. -- height (string | number; default '600px'): The height (in px or as a number) of the container -in which the molecules will be displayed. -- stageParameters (dict; default { - quality: 'medium', - backgroundColor: 'white', - cameraType: 'perspective', -}): Parameters (in JSON format) for the stage object of ngl. -Currently implemented are render quality, background color and camera type -quality: auto, low, medium, high (default: auto) -backgroundColor: white / black (default: white) -cameraType: perspective / orthographic (default: perspective). stageParameters has the following type: dict containing keys 'quality', 'backgroundColor', 'cameraType'. -Those keys have the following types: - - quality (string; optional) - - backgroundColor (string; optional) - - cameraType (string; optional) -- imageParameters (dict; default { - antialias: true, - transparent: true, - trim: true, - defaultFilename: 'dash-bio_ngl_output', -}): Parameters (in JSON format) for exporting the image. imageParameters has the following type: dict containing keys 'antialias', 'transparent', 'trim', 'defaultFilename'. -Those keys have the following types: - - antialias (boolean; optional) - - transparent (boolean; optional) - - trim (boolean; optional) - - defaultFilename (string; optional) -- downloadImage (boolean; default False): flag if download image was selected -- pdbString (string; optional): Variable which defines how many molecules should be shown and/or which chain -The following format needs to be used: -pdbID1.chain:start-end@atom1,atom2_pdbID2.chain:start-end -. indicates that only one chain should be shown -: indicates that a specific amino acids range should be shown (e.g. 1-50) -@ indicates that chosen atoms should be highlighted (e.g. @50,100,150) - _ indicates that more than one protein should be shown -- data (dict; default [ - { - filename: 'placeholder', - ext: '', - selectedValue: 'placeholder', - chain: 'ALL', - aaRange: 'ALL', - chosen: { - chosenAtoms: '', - chosenResidues: '', - }, - color: 'red', - config: { - input: '', - type: 'text/plain', - }, - uploaded: false, - resetView: false, - }, -]): The data (in JSON format) that will be used to display the molecule -filename: name of the used pdb/cif file -ext: file extensions (pdb or cif) -selectedValue: pdbString -chain: ALL if the whole molecule shoud be displayed, e.g. A for showing only chain A -aaRange: ALL if the whole molecule should be displayed, e.g. 1:50 for showing only 50 atoms -color: chain color -chosen.atoms: string of the chosen Atoms, e.g. 50,100,150 - --> chosen eatoms changed to colored 'ball' -chosen.residues: string of the chosen residues, e.g. 50,100,150 - --> C alpha of chosen residue changed to colored 'ball' -config.input: content of the pdb file -config.type: format of config.input -uploaded: bool if file from local storage (false) or uploaded by user (true) -resetView: bool if the selection did not change but the view should be resettet (true). data has the following type: list of dicts containing keys 'filename', 'ext', 'selectedValue', 'chain', 'aaRange', 'color', 'chosen', 'config', 'uploaded', 'resetView'. -Those keys have the following types: - - filename (string; required) - - ext (string; optional) - - selectedValue (string; required) - - chain (string; required) - - aaRange (string; required) - - color (string; required) - - chosen (dict; optional): chosen has the following type: dict containing keys 'residues', 'atoms'. -Those keys have the following types: - - residues (string; required) - - atoms (string; required) - - config (dict; optional): config has the following type: dict containing keys 'input', 'type'. -Those keys have the following types: - - input (string; required) - - type (string; required) - - uploaded (boolean; required) - - resetView (boolean; required) -- molStyles (dict; default { - representations: ['cartoon', 'axes+box'], - chosenAtomsColor: '#ffffff', - chosenAtomsRadius: 1, - molSpacingXaxis: 100, - sideByside: false, -}): The data (in JSON format) that will be used to style the displayed molecule -representations: one or multiple selected molecule representation - - Possible molecule styles: - 'backbone,'ball+stick','cartoon', 'hyperball','licorice','line', - 'ribbon',''rope','spacefill','surface','trace','tube' - - Possible additional representations: - 'axes','axes+box','helixorient','unitcell' -chosenAtomsColor: color of the 'ball+stick' representation of the chosen atoms -chosenAtomsRadius: radius of the 'ball+stick' representation of the chosen atoms -molSpacingXaxis: distance on the xAxis between each molecule. molStyles has the following type: dict containing keys 'representations', 'chosenAtomsColor', 'chosenAtomsRadius', 'molSpacingXaxis', 'sideByside'. -Those keys have the following types: - - representations (list of strings; optional) - - chosenAtomsColor (string; required) - - chosenAtomsRadius (number; required) - - molSpacingXaxis (number; required) - - sideByside (boolean; required)""" + +- id (string; optional): + The ID of this component, used to identify dash components in + callbacks. The ID needs to be unique across all of the components + in an app. + +- data (list of dicts; default [ { filename: 'placeholder', ext: '', selectedValue: 'placeholder', chain: 'ALL', aaRange: 'ALL', chosen: { chosenAtoms: '', chosenResidues: '', }, color: 'red', config: { input: '', type: 'text/plain', }, uploaded: False, resetView: False, },]): + The data (in JSON format) that will be used to display the + molecule filename: name of the used pdb/cif file ext: file + extensions (pdb or cif) selectedValue: pdbString chain: ALL if the + whole molecule shoud be displayed, e.g. A for showing only chain A + aaRange: ALL if the whole molecule should be displayed, e.g. 1:50 + for showing only 50 atoms color: chain color chosen.atoms: string + of the chosen Atoms, e.g. 50,100,150 --> chosen + eatoms changed to colored 'ball' chosen.residues: string of the + chosen residues, e.g. 50,100,150 --> C alpha of + chosen residue changed to colored 'ball' config.input: content of + the pdb file config.type: format of config.input uploaded: bool if + file from local storage (False) or uploaded by user (True) + resetView: bool if the selection did not change but the view + should be resettet (True). + + `data` is a list of dicts with keys: + + - aaRange (string; required) + + - chain (string; required) + + - chosen (dict; optional) + + `chosen` is a dict with keys: + + - atoms (string; required) + + - residues (string; required) + + - color (string; required) + + - config (dict; optional) + + `config` is a dict with keys: + + - input (string; required) + + - type (string; required) + + - ext (string; optional) + + - filename (string; required) + + - resetView (boolean; required) + + - selectedValue (string; required) + + - uploaded (boolean; required) + +- downloadImage (boolean; default False): + flag if download image was selected. + +- height (string | number; default '600px'): + The height (in px or as a number) of the container in which the + molecules will be displayed. + +- imageParameters (dict; default { antialias: True, transparent: True, trim: True, defaultFilename: 'dash-bio_ngl_output',}): + Parameters (in JSON format) for exporting the image. + + `imageParameters` is a dict with keys: + + - antialias (boolean; optional) + + - defaultFilename (string; optional) + + - transparent (boolean; optional) + + - trim (boolean; optional) + +- molStyles (dict; default { representations: ['cartoon', 'axes+box'], chosenAtomsColor: '#ffffff', chosenAtomsRadius: 1, molSpacingXaxis: 100, sideByside: False,}): + The data (in JSON format) that will be used to style the displayed + molecule representations: one or multiple selected molecule + representation - Possible molecule styles: + 'backbone,'ball+stick','cartoon', 'hyperball','licorice','line', + 'ribbon',''rope','spacefill','surface','trace','tube' - Possible + additional representations: + 'axes','axes+box','helixorient','unitcell' chosenAtomsColor: color + of the 'ball+stick' representation of the chosen atoms + chosenAtomsRadius: radius of the 'ball+stick' representation of + the chosen atoms molSpacingXaxis: distance on the xAxis between + each molecule. + + `molStyles` is a dict with keys: + + - chosenAtomsColor (string; required) + + - chosenAtomsRadius (number; required) + + - molSpacingXaxis (number; required) + + - representations (list of strings; optional) + + - sideByside (boolean; required) + +- pdbString (string; optional): + Variable which defines how many molecules should be shown and/or + which chain The following format needs to be used: + pdbID1.chain:start-end@atom1,atom2_pdbID2.chain:start-end . + indicates that only one chain should be shown : indicates that a + specific amino acids range should be shown (e.g. 1-50) @ indicates + that chosen atoms should be highlighted (e.g. @50,100,150) _ + indicates that more than one protein should be shown. + +- stageParameters (dict; default { quality: 'medium', backgroundColor: 'white', cameraType: 'perspective',}): + Parameters (in JSON format) for the stage object of ngl. Currently + implemented are render quality, background color and camera type + quality: auto, low, medium, high (default: auto) backgroundColor: + white / black (default: white) cameraType: perspective / + orthographic (default: perspective). + + `stageParameters` is a dict with keys: + + - backgroundColor (string; optional) + + - cameraType (string; optional) + + - quality (string; optional) + +- width (string | number; default '600px'): + The width (in px or as a number) of the container in which the + molecules will be displayed.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, width=Component.UNDEFINED, height=Component.UNDEFINED, stageParameters=Component.UNDEFINED, imageParameters=Component.UNDEFINED, downloadImage=Component.UNDEFINED, pdbString=Component.UNDEFINED, data=Component.UNDEFINED, molStyles=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'width', 'height', 'stageParameters', 'imageParameters', 'downloadImage', 'pdbString', 'data', 'molStyles'] + self._prop_names = ['id', 'data', 'downloadImage', 'height', 'imageParameters', 'molStyles', 'pdbString', 'stageParameters', 'width'] self._type = 'NglMoleculeViewer' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'width', 'height', 'stageParameters', 'imageParameters', 'downloadImage', 'pdbString', 'data', 'molStyles'] + self.available_properties = ['id', 'data', 'downloadImage', 'height', 'imageParameters', 'molStyles', 'pdbString', 'stageParameters', 'width'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/OncoPrint.py b/dash_bio/OncoPrint.py index 8bbd47d06..80fe57540 100644 --- a/dash_bio/OncoPrint.py +++ b/dash_bio/OncoPrint.py @@ -16,45 +16,67 @@ class OncoPrint(Component): https://github.com/plotly/react-oncoprint Keyword arguments: -- id (string; optional): The ID of this component, used to identify dash components -in callbacks. The ID needs to be unique to the component. -- eventDatum (dict; optional): A Dash prop that returns data on clicking, hovering or resizing the viewer. -- data (list; optional): Input data, in CBioPortal format where each list entry is a dict -consisting of 'sample', 'gene', 'alteration', and 'type' -- padding (number; default 0.05): Adjusts the padding (as a proportion of whitespace) between two tracks. -Value is a ratio between 0 and 1. -Defaults to 0.05 (i.e., 5 percent). If set to 0, plot will look like a heatmap. -- colorscale (boolean | dict; optional): If not null, will override the default OncoPrint colorscale. -Default OncoPrint colorscale same as CBioPortal implementation. -Make your own colrscale as a {'mutation': COLOR} dict. -Supported mutation keys are ['MISSENSE, 'INFRAME', 'FUSION', -'AMP', 'GAIN', 'HETLOSS', 'HMODEL', 'UP', 'DOWN'] -Note that this is NOT a standard plotly colorscale. -- backgroundcolor (string; default 'rgb(190, 190, 190)'): Default color for the tracks, in common name, hex, rgb or rgba format. -If left blank, will default to a light grey rgb(190, 190, 190). -- range (list; default [null, null]): .Toogles whether or not to show a legend on the right side of the plot, -with mutation information. -- showlegend (boolean; default True): .Toogles whether or not to show a legend on the right side of the plot, -with mutation information. -- showoverview (boolean; default True): .Toogles whether or not to show a heatmap overview of the tracks. -- width (number | string; optional): Width of the OncoPrint. -Will disable auto-resizing of plots if set. -- height (number | string; default 500): Height of the OncoPrint. -Will disable auto-resizing of plots if set.""" + +- id (string; optional): + The ID of this component, used to identify dash components in + callbacks. The ID needs to be unique to the component. + +- backgroundcolor (string; default 'rgb(190, 190, 190)'): + Default color for the tracks, in common name, hex, rgb or rgba + format. If left blank, will default to a light grey rgb(190, 190, + 190). + +- colorscale (boolean | dict; optional): + If not None, will override the default OncoPrint colorscale. + Default OncoPrint colorscale same as CBioPortal implementation. + Make your own colrscale as a {'mutation': COLOR} dict. Supported + mutation keys are ['MISSENSE, 'INFRAME', 'FUSION', 'AMP', 'GAIN', + 'HETLOSS', 'HMODEL', 'UP', 'DOWN'] Note that this is NOT a + standard plotly colorscale. + +- data (list; optional): + Input data, in CBioPortal format where each list entry is a dict + consisting of 'sample', 'gene', 'alteration', and 'type'. + +- eventDatum (dict; optional): + A Dash prop that returns data on clicking, hovering or resizing + the viewer. + +- height (number | string; default 500): + Height of the OncoPrint. Will disable auto-resizing of plots if + set. + +- padding (number; default 0.05): + Adjusts the padding (as a proportion of whitespace) between two + tracks. Value is a ratio between 0 and 1. Defaults to 0.05 (i.e., + 5 percent). If set to 0, plot will look like a heatmap. + +- range (list; default [None, None]): + Toogles whether or not to show a legend on the right side of the + plot, with mutation information. + +- showlegend (boolean; default True): + Toogles whether or not to show a legend on the right side of the + plot, with mutation information. + +- showoverview (boolean; default True): + Toogles whether or not to show a heatmap overview of the tracks. + +- width (number | string; optional): + Width of the OncoPrint. Will disable auto-resizing of plots if + set.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, eventDatum=Component.UNDEFINED, data=Component.UNDEFINED, padding=Component.UNDEFINED, colorscale=Component.UNDEFINED, backgroundcolor=Component.UNDEFINED, range=Component.UNDEFINED, showlegend=Component.UNDEFINED, showoverview=Component.UNDEFINED, width=Component.UNDEFINED, height=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'eventDatum', 'data', 'padding', 'colorscale', 'backgroundcolor', 'range', 'showlegend', 'showoverview', 'width', 'height'] + self._prop_names = ['id', 'backgroundcolor', 'colorscale', 'data', 'eventDatum', 'height', 'padding', 'range', 'showlegend', 'showoverview', 'width'] self._type = 'OncoPrint' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'eventDatum', 'data', 'padding', 'colorscale', 'backgroundcolor', 'range', 'showlegend', 'showoverview', 'width', 'height'] + self.available_properties = ['id', 'backgroundcolor', 'colorscale', 'data', 'eventDatum', 'height', 'padding', 'range', 'showlegend', 'showoverview', 'width'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/Pileup.py b/dash_bio/Pileup.py index 34b5ebf82..cdc16556b 100644 --- a/dash_bio/Pileup.py +++ b/dash_bio/Pileup.py @@ -10,51 +10,87 @@ class Pileup(Component): example integration of pileup.js and React (https://www.npmjs.com/package/pileup). Keyword arguments: -- id (string; optional): The ID of this component, used to identify dash components in callbacks. -The ID needs to be unique across all of the components in an app. -- style (dict; optional): Generic style overrides on the plot div -- className (string; optional): className of the component div. -- range (dict; optional): Object defining genomic location. - Of the format: {contig: 'chr17', start: 7512384, stop: 7512544}. range has the following type: dict containing keys 'contig', 'start', 'stop'. -Those keys have the following types: - - contig (string; optional): Name of contig to display. (ie. chr17) - - start (number; optional): Start location to display - - stop (number; optional): Stop location to display -- reference (dict; optional): Object defining genomic reference. reference has the following type: dict containing keys 'label', 'url'. -Those keys have the following types: - - label (string; optional): Label to display by reference - - url (string; optional): Url of 2bit file. - https://genome.ucsc.edu/goldenPath/help/twoBit.html -- tracks (dict; optional): Array of configuration objects defining tracks initially displayed when app launches. - See https://github.com/hammerlab/pileup.js#usage. tracks has the following type: list of dicts containing keys 'viz', 'vizOptions', 'label', 'source', 'sourceOptions'. -Those keys have the following types: - - viz (optional): Name of visualization. Must be one of - (coverage, genome, genes, features, idiogram, location, scale, - variants, genotypes, or pileup) - See https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js - - vizOptions (optional): Options that define viz details. - Options depend on the viz type selected. - - label (string; optional): Label to display by track - - source (optional): Data source to visualize. Must be one of - (bam, vcf, alignmentJson, variantJson, featureJson, idiogramJson, cytoBand, - vcf, twoBit, bigBed, GAReadAlignment, GAVariant, GAFeature, GAGene) - See https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js - - sourceOptions (optional): Options that define data source. - Options depend on the source selected.""" + +- id (string; optional): + The ID of this component, used to identify dash components in + callbacks. The ID needs to be unique across all of the components + in an app. + +- className (string; optional): + className of the component div. + +- range (dict; optional): + Object defining genomic location. Of the format: {contig: + 'chr17', start: 7512384, stop: 7512544}. + + `range` is a dict with keys: + + - contig (string; optional): + Name of contig to display. (ie. chr17). + + - start (number; optional): + Start location to display. + + - stop (number; optional): + Stop location to display. + +- reference (dict; optional): + Object defining genomic reference. + + `reference` is a dict with keys: + + - label (string; optional): + Label to display by reference. + + - url (string; optional): + Url of 2bit file. + https://genome.ucsc.edu/goldenPath/help/twoBit.html. + +- style (dict; optional): + Generic style overrides on the plot div. + +- tracks (list of dicts; optional): + Array of configuration objects defining tracks initially displayed + when app launches. See + https://github.com/hammerlab/pileup.js#usage. + + `tracks` is a list of dicts with keys: + + - label (string; optional): + Label to display by track. + + - source (optional): + Data source to visualize. Must be one of (bam, + vcf, alignmentJson, variantJson, featureJson, idiogramJson, + cytoBand, vcf, twoBit, bigBed, GAReadAlignment, + GAVariant, GAFeature, GAGene) See + https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js. + + - sourceOptions (optional): + Options that define data source. Options depend on + the source selected. + + - viz (optional): + Name of visualization. Must be one of (coverage, + genome, genes, features, idiogram, location, scale, + variants, genotypes, or pileup) See + https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js. + + - vizOptions (optional): + Options that define viz details. Options depend on + the viz type selected.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, range=Component.UNDEFINED, reference=Component.UNDEFINED, tracks=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'style', 'className', 'range', 'reference', 'tracks'] + self._prop_names = ['id', 'className', 'range', 'reference', 'style', 'tracks'] self._type = 'Pileup' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'style', 'className', 'range', 'reference', 'tracks'] + self.available_properties = ['id', 'className', 'range', 'reference', 'style', 'tracks'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/SequenceViewer.py b/dash_bio/SequenceViewer.py index ae63592bd..751a96e19 100644 --- a/dash_bio/SequenceViewer.py +++ b/dash_bio/SequenceViewer.py @@ -18,75 +18,126 @@ class SequenceViewer(Component): https://github.com/FlyBase/react-sequence-viewer Keyword arguments: -- id (string; optional): The ID used to identify this component in Dash callbacks. -- sequence (string; default '-'): The amino acid sequence that will be displayed. -- showLineNumbers (boolean; default True): The option of whether or not to display line numbers. -- wrapAminoAcids (boolean; default True): 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 -charsPerLine. -- charsPerLine (number; default 40): The number of amino acids that will display per line. -- toolbar (boolean; default False): The option of whether or not to display a toolbar at the top -that allows the user to choose the number of letters per line. -- search (boolean; default True): The option of whether or not to include a search bar in -the header. This supports regex. -- title (string; default ''): A string that displays at the top of the component. -- sequenceMaxHeight (string; default '400px'): The maximum height of the sequence. -- badge (boolean; default True): 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 (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 (dict; optional): A coverage of the entire sequence; each section of the sequence -can have its own text color, background color, tooltip (on hover), -and an optional underscore. The props start and end represent the -beginning and terminating indices of the section in question. -Cannot be used at the same time as selection. coverage has the following type: list of dicts containing keys 'start', 'end', 'color', 'bgcolor', 'tooltip', 'underscore', 'onclick'. -Those keys have the following types: - - start (number; optional) - - end (number; optional) - - color (string; optional) - - bgcolor (string; optional) - - tooltip (string; optional) - - underscore (boolean; optional) - - onclick (optional) -- legend (dict; optional): A legend corresponding to the color codes above (optionally displayed). legend has the following type: list of dicts containing keys 'name', 'color', 'underscore'. -Those keys have the following types: - - name (string; optional) - - color (string; optional) - - underscore (boolean; optional) -- coverageClicked (number; optional): Contains the index of the section that was clicked last in -the coverage list supplied. -- mouseSelection (dict; 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 (dict; optional): A list of the subparts selected using the -"search" function or the "selection" property. subpartSelected has the following type: list of dicts containing keys 'start', 'end', 'sequence'. -Those keys have the following types: - - start (number; optional) - - end (number; optional) - - sequence (string; optional)""" + +- id (string; optional): + The ID used to identify this component in Dash callbacks. + +- badge (boolean; default True): + The option of whether or not to display a badge showing the amino + acid count at the top of the component beside the title. + +- charsPerLine (number; default 40): + The number of amino acids that will display per line. + +- coverage (list of dicts; optional): + A coverage of the entire sequence; each section of the sequence + can have its own text color, background color, tooltip (on hover), + and an optional underscore. The props start and end represent the + beginning and terminating indices of the section in question. + Cannot be used at the same time as selection. + + `coverage` is a list of dicts with keys: + + - bgcolor (string; optional) + + - color (string; optional) + + - end (number; optional) + + - onclick (optional) + + - start (number; optional) + + - tooltip (string; optional) + + - underscore (boolean; optional) + +- coverageClicked (number; optional): + Contains the index of the section that was clicked last in the + coverage list supplied. + +- legend (list of dicts; optional): + A legend corresponding to the color codes above (optionally + displayed). + + `legend` is a list of dicts with keys: + + - color (string; optional) + + - name (string; optional) + + - underscore (boolean; optional) + +- mouseSelection (dict; 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` is a dict with keys: + + - end (number; optional) + + - selection (string; optional) + + - start (number; optional) + +- search (boolean; default True): + The option of whether or not to include a search bar in the + header. This supports regex. + +- selection (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. + +- sequence (string; default '-'): + The amino acid sequence that will be displayed. + +- sequenceMaxHeight (string; default '400px'): + The maximum height of the sequence. + +- showLineNumbers (boolean; default True): + The option of whether or not to display line numbers. + +- subpartSelected (list of dicts; optional): + A list of the subparts selected using the \"search\" function or + the \"selection\" property. + + `subpartSelected` is a list of dicts with keys: + + - end (number; optional) + + - sequence (string; optional) + + - start (number; optional) + +- title (string; default ''): + A string that displays at the top of the component. + +- toolbar (boolean; default False): + The option of whether or not to display a toolbar at the top that + allows the user to choose the number of letters per line. + +- wrapAminoAcids (boolean; default True): + 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 + charsPerLine.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, sequence=Component.UNDEFINED, showLineNumbers=Component.UNDEFINED, wrapAminoAcids=Component.UNDEFINED, charsPerLine=Component.UNDEFINED, toolbar=Component.UNDEFINED, search=Component.UNDEFINED, title=Component.UNDEFINED, sequenceMaxHeight=Component.UNDEFINED, badge=Component.UNDEFINED, selection=Component.UNDEFINED, coverage=Component.UNDEFINED, legend=Component.UNDEFINED, coverageClicked=Component.UNDEFINED, mouseSelection=Component.UNDEFINED, subpartSelected=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'sequence', 'showLineNumbers', 'wrapAminoAcids', 'charsPerLine', 'toolbar', 'search', 'title', 'sequenceMaxHeight', 'badge', 'selection', 'coverage', 'legend', 'coverageClicked', 'mouseSelection', 'subpartSelected'] + self._prop_names = ['id', 'badge', 'charsPerLine', 'coverage', 'coverageClicked', 'legend', 'mouseSelection', 'search', 'selection', 'sequence', 'sequenceMaxHeight', 'showLineNumbers', 'subpartSelected', 'title', 'toolbar', 'wrapAminoAcids'] self._type = 'SequenceViewer' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'sequence', 'showLineNumbers', 'wrapAminoAcids', 'charsPerLine', 'toolbar', 'search', 'title', 'sequenceMaxHeight', 'badge', 'selection', 'coverage', 'legend', 'coverageClicked', 'mouseSelection', 'subpartSelected'] + self.available_properties = ['id', 'badge', 'charsPerLine', 'coverage', 'coverageClicked', 'legend', 'mouseSelection', 'search', 'selection', 'sequence', 'sequenceMaxHeight', 'showLineNumbers', 'subpartSelected', 'title', 'toolbar', 'wrapAminoAcids'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/Speck.py b/dash_bio/Speck.py index 0b42fcdcf..057d3ba9f 100644 --- a/dash_bio/Speck.py +++ b/dash_bio/Speck.py @@ -10,61 +10,99 @@ class Speck(Component): https://github.com/wwwtyro/speck Keyword arguments: -- id (string; optional): The ID used to identify this component in Dash callbacks. -- data (dict; optional): The xyz file data; a list of atoms such that each atom -has a dictionary defining the x, y, and z coordinates -along with the atom's symbol. data has the following type: list of dicts containing keys 'symbol', 'x', 'y', 'z'. -Those keys have the following types: - - symbol (string; optional) - - x (number; optional) - - y (number; optional) - - z (number; optional) -- scrollZoom (boolean; optional): The option of whether or not to allow scrolling to control -the zoom. -- view (dict; default speckView.new()): An object that determines and controls various parameters -related to how the molecule is displayed. view has the following type: dict containing keys 'aspect', 'zoom', 'translation', 'atomScale', 'relativeAtomScale', 'bondScale', 'rotation', 'ao', 'aoRes', 'brightness', 'outline', 'spf', 'bonds', 'bondThreshold', 'bondShade', 'atomShade', 'resolution', 'dofStrength', 'dofPosition', 'fxaa'. -Those keys have the following types: - - aspect (number; optional) - - zoom (number; optional) - - translation (dict; optional): translation has the following type: dict containing keys 'x', 'y'. -Those keys have the following types: - - x (number; optional) - - y (number; optional) - - atomScale (number; optional) - - relativeAtomScale (number; optional) - - bondScale (number; optional) - - rotation (dict; optional): rotation has the following type: dict containing keys . -Those keys have the following types: - - - ao (number; optional) - - aoRes (number; optional) - - brightness (number; optional) - - outline (number; optional) - - spf (number; optional) - - bonds (boolean; optional) - - bondThreshold (number; optional) - - bondShade (number; optional) - - atomShade (number; optional) - - resolution (number; optional) - - 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, -and licorice""" + +- id (string; optional): + The ID used to identify this component in Dash callbacks. + +- data (list of dicts; optional): + The xyz file data; a list of atoms such that each atom has a + dictionary defining the x, y, and z coordinates along with the + atom's symbol. + + `data` is a list of dicts with keys: + + - symbol (string; optional) + + - x (number; optional) + + - y (number; optional) + + - z (number; optional) + +- presetView (a value equal to: 'default', 'stickball', 'toon', 'licorice'; optional): + One of several pre-loaded views: default, stick-ball, toon, and + licorice. + +- scrollZoom (boolean; optional): + The option of whether or not to allow scrolling to control the + zoom. + +- view (dict; default speckView.new()): + An object that determines and controls various parameters related + to how the molecule is displayed. + + `view` is a dict with keys: + + - ao (number; optional) + + - aoRes (number; optional) + + - aspect (number; optional) + + - atomScale (number; optional) + + - atomShade (number; optional) + + - bondScale (number; optional) + + - bondShade (number; optional) + + - bondThreshold (number; optional) + + - bonds (boolean; optional) + + - brightness (number; optional) + + - dofPosition (number; optional) + + - dofStrength (number; optional) + + - fxaa (number; optional) + + - outline (number; optional) + + - relativeAtomScale (number; optional) + + - resolution (number; optional) + + - rotation (dict; optional) + + `rotation` is a dict with keys: + + + - spf (number; optional) + + - translation (dict; optional) + + `translation` is a dict with keys: + + - x (number; optional) + + - y (number; optional) + + - zoom (number; optional)""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, data=Component.UNDEFINED, scrollZoom=Component.UNDEFINED, view=Component.UNDEFINED, presetView=Component.UNDEFINED, **kwargs): - self._prop_names = ['id', 'data', 'scrollZoom', 'view', 'presetView'] + self._prop_names = ['id', 'data', 'presetView', 'scrollZoom', 'view'] self._type = 'Speck' self._namespace = 'dash_bio' self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'data', 'scrollZoom', 'view', 'presetView'] + self.available_properties = ['id', 'data', 'presetView', 'scrollZoom', 'view'] self.available_wildcard_properties = [] - _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} - for k in []: if k not in args: raise TypeError( diff --git a/dash_bio/async-moleculeviewer3.js b/dash_bio/async-moleculeviewer3.js index b18c26db9..759e407be 100644 --- a/dash_bio/async-moleculeviewer3.js +++ b/dash_bio/async-moleculeviewer3.js @@ -1,4 +1,4 @@ -(window.webpackJsonpdash_bio=window.webpackJsonpdash_bio||[]).push([[6],{43:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return d}));var n=r(1),i=r.n(n),o=r(438),a=r.n(o),s=r(17);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(){return(u=Object.assign||function(e){for(var t=1;t0&&f.container.children[0].offsetParent&&(r.resize(),clearInterval(p))}),50);this.oldModelData=this.props.modelData,this.glviewer=r}}},{key:"render",value:function(){var e=this;return s.default.createElement("div",{className:"molecule-3d",style:{width:this.props.width,height:this.props.height,position:"relative",margin:"0 auto"},ref:function(t){e.container=t}})}}]),t}(s.default.Component);p.defaultProps={atomLabelsShown:!1,backgroundOpacity:1,backgroundColor:"#73757c",height:"500px",onRenderNewData:function(){},orbital:{},selectedAtomIds:[],selectionType:f.default.ATOM,shapes:[],labels:[],styles:{},width:"500px",outlineWidth:0,outlineColor:"#000000",nearClip:null,farClip:null},p.propTypes={atomLabelsShown:l.default.bool,backgroundColor:l.default.string,backgroundOpacity:l.default.number,height:l.default.string,modelData:l.default.shape({atoms:l.default.array,bonds:l.default.array}).isRequired,onChangeSelection:l.default.func,onRenderNewData:l.default.func,orbital:l.default.shape({cube_file:l.default.string,iso_val:l.default.number,opacity:l.default.number,positiveVolumetricColor:l.default.string,negativeVolumetricColor:l.default.string}),selectedAtomIds:l.default.arrayOf(l.default.number),selectionType:l.default.oneOf([f.default.ATOM,f.default.RESIDUE,f.default.CHAIN]),shapes:l.default.arrayOf(l.default.object),labels:l.default.arrayOf(l.default.object),styles:l.default.objectOf(l.default.object),width:l.default.string,nearClip:l.default.number,farClip:l.default.number,outlineWidth:l.default.number,outlineColor:l.default.string},t.default=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={ARROW:"Arrow",SPHERE:"Sphere",CYLINDER:"Cylinder"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2));t.default=n.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(e){return e&&e.__esModule?e:{default:e}}(r(3)),o="stick",a={colorStringToNumber:function(e){if(4!==e.length&&7!==e.length)return e;if("#"!==e[0])return e;var t=parseInt(e.substr(1,e.length-1),16);return isNaN(t)?e:t},getShapeSpec:function(e,t){var r=void 0;e.color&&(r=a.colorStringToNumber(e.color));var n=Object.assign({},{alpha:.8,callback:t,clickable:!1,color:65027,radius:e.radius},e,{color:r});if(e.type===i.default.ARROW)n.start=e.start,n.end=e.end;else if(e.type===i.default.SPHERE)n.center=e.center;else{if(e.type!==i.default.CYLINDER)throw new Error("Invalid shape type.");n.fromCap=!0,n.toCap=!0,n.start=e.start,n.end=e.end}return n},getLibStyle:function(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s={},l=i.visualization_type||o;return s[l]={},Object.entries(i).forEach((function(e){var t=n(e,2),r=t[0],i=t[1];"visualization_type"!==r&&(s[l][r]=i)})),t&&(s[l].color=2094078),"string"==typeof s[l].color&&(s[l].color=a.colorStringToNumber(s[l].color)),s}};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),i=function(e){return e&&e.__esModule?e:{default:e}}(r(1)),o={modelDataToCDJSON:function(e){return{m:[{a:e.atoms.map((function(e){return{l:e.elem,x:e.positions[0],y:e.positions[1],z:e.positions[2],mass:e.mass_magnitude}})),b:e.bonds.map((function(e){return{b:e.atom1_index,e:e.atom2_index,o:e.bond_order}}))}]}},addSelection:function(e,t,r,n){var a=t.slice(),s=t.indexOf(r.serial),l=-1===s;return n===i.default.ATOM?(l?a.push(r.serial):a.splice(s,1),a):(l?e.forEach((function(e){o.isSameGroup(r,e,n)&&a.push(e.serial)})):a=a.filter((function(t){var i=e[t];return!o.isSameGroup(r,i,n)})),a)},isSameGroup:function(e,t,r){if(r===i.default.RESIDUE)return e.residue_index===t.residue_index;if(r===i.default.CHAIN)return e.chain===t.chain;throw new Error("selectionType must be either residue or chain")},modelDataEquivalent:function(e,t){if(!e||!t)return!1;var r=new n.Set(e.atoms.map((function(e){return e.serial}))),i=new n.Set(t.atoms.map((function(e){return e.serial}))),o=new n.Set(e.bonds.map((function(e){return e.atom1_index+"=>"+e.atom2_index}))),a=new n.Set(t.bonds.map((function(e){return e.atom1_index+"=>"+e.atom2_index}))),s=r.equals(i),l=o.equals(a);if(!s||!l)return!1;var u=new Map,c=!0,f=!1,h=void 0;try{for(var p,d=e.atoms[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var m=p.value;u.set(m.serial,m.positions||[])}}catch(e){f=!0,h=e}finally{try{!c&&d.return&&d.return()}finally{if(f)throw h}}return t.atoms.every((function(e){return u.get(e.serial).every((function(t,r){return(e.positions||[])[r]===t}))}))}};t.default=o},function(e,t){e.exports=r(439)},function(e,t){e.exports=r(440)},function(e,t){e.exports=r(441)},function(e,t){e.exports=r(0)},function(e,t){e.exports=r(1)}])},439:function(module,exports,__webpack_require__){(function(module){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,require,require,__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,t,e;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r0&&t-1 in e)}v.fn=v.prototype={jquery:"3.2.1",constructor:v,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=v.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return v.each(this,e)},map:function(e){return this.pushStack(v.map(this,(function(t,r){return e.call(t,r,t)})))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,r=+e+(e<0?t:0);return this.pushStack(r>=0&&r+~]|"+O+")"+O+"*"),q=new RegExp("="+O+"*([^\\]'\"]*?)"+O+"*\\]","g"),G=new RegExp(P),H=new RegExp("^"+F+"$"),W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,J=new RegExp("\\\\([\\da-f]{1,6}"+O+"?|("+O+")|.)","ig"),ee=function(e,t,r){var n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ne=function(){h()},ie=ye((function(e){return!0===e.disabled&&("form"in e||"label"in e)}),{dir:"parentNode",next:"legend"});try{L.apply(M=k.call(w.childNodes),w.childNodes),M[w.childNodes.length].nodeType}catch(e){L={apply:M.length?function(e,t){z.apply(e,k.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}function oe(e,t,n,i){var o,s,u,c,f,d,g,y=t&&t.ownerDocument,_=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return n;if(!i&&((t?t.ownerDocument||t:w)!==p&&h(t),t=t||p,m)){if(11!==_&&(f=Z.exec(e)))if(o=f[1]){if(9===_){if(!(u=t.getElementById(o)))return n;if(u.id===o)return n.push(u),n}else if(y&&(u=y.getElementById(o))&&b(t,u)&&u.id===o)return n.push(u),n}else{if(f[2])return L.apply(n,t.getElementsByTagName(e)),n;if((o=f[3])&&r.getElementsByClassName&&t.getElementsByClassName)return L.apply(n,t.getElementsByClassName(o)),n}if(r.qsa&&!S[e+" "]&&(!v||!v.test(e))){if(1!==_)y=t,g=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(te,re):t.setAttribute("id",c=x),s=(d=a(e)).length;s--;)d[s]="#"+c+" "+ge(d[s]);g=d.join(","),y=Q.test(e)&&me(t.parentNode)||t}if(g)try{return L.apply(n,y.querySelectorAll(g)),n}catch(e){}finally{c===x&&t.removeAttribute("id")}}}return l(e.replace(B,"$1"),t,n,i)}function ae(){var e=[];return function t(r,i){return e.push(r+" ")>n.cacheLength&&delete t[e.shift()],t[r+" "]=i}}function se(e){return e[x]=!0,e}function le(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var r=e.split("|"),i=r.length;i--;)n.attrHandle[r[i]]=t}function ce(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function de(e){return se((function(t){return t=+t,se((function(r,n){for(var i,o=e([],r.length,t),a=o.length;a--;)r[i=o[a]]&&(r[i]=!(n[i]=r[i]))}))}))}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in r=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},h=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(d=(p=a).documentElement,m=!o(p),w!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ne,!1):i.attachEvent&&i.attachEvent("onunload",ne)),r.attributes=le((function(e){return e.className="i",!e.getAttribute("className")})),r.getElementsByTagName=le((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),r.getElementsByClassName=K.test(p.getElementsByClassName),r.getById=le((function(e){return d.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length})),r.getById?(n.filter.ID=function(e){var t=e.replace(J,ee);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var r=t.getElementById(e);return r?[r]:[]}}):(n.filter.ID=function(e){var t=e.replace(J,ee);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var r,n,i,o=t.getElementById(e);if(o){if((r=o.getAttributeNode("id"))&&r.value===e)return[o];for(i=t.getElementsByName(e),n=0;o=i[n++];)if((r=o.getAttributeNode("id"))&&r.value===e)return[o]}return[]}}),n.find.TAG=r.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):r.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,n=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;r=o[i++];)1===r.nodeType&&n.push(r);return n}return o},n.find.CLASS=r.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},g=[],v=[],(r.qsa=K.test(p.querySelectorAll))&&(le((function(e){d.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+O+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+O+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+x+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||v.push(".#.+[+~]")})),le((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+O+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(r.matchesSelector=K.test(y=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&le((function(e){r.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",P)})),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),t=K.test(d.compareDocumentPosition),b=t||K.test(d.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return f=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!r.sortDetached&&t.compareDocumentPosition(e)===n?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:c?I(c,e)-I(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return f=!0,0;var r,n=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:c?I(c,e)-I(c,t):0;if(i===o)return ce(e,t);for(r=e;r=r.parentNode;)a.unshift(r);for(r=t;r=r.parentNode;)s.unshift(r);for(;a[n]===s[n];)n++;return n?ce(a[n],s[n]):a[n]===w?-1:s[n]===w?1:0},p):p},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),t=t.replace(q,"='$1']"),r.matchesSelector&&m&&!S[t+" "]&&(!g||!g.test(t))&&(!v||!v.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return oe(t,p,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var i=n.attrHandle[t.toLowerCase()],o=i&&T.call(n.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==o?o:r.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,re)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],i=0,o=0;if(f=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(E),f){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return c=null,e},i=oe.getText=function(e){var t,r="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)r+=i(t);return r},(n=oe.selectors={cacheLength:50,createPseudo:se,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(J,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return W.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&G.test(r)&&(t=a(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=A[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&A(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,r){return function(n){var i=oe.attr(n,e);return null==i?"!="===t:!t||(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i.replace(j," ")+" ").indexOf(r)>-1:"|="===t&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,n,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===n&&0===i?function(e){return!!e.parentNode}:function(t,r,l){var u,c,f,h,p,d,m=o!==a?"nextSibling":"previousSibling",v=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(v){if(o){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;d=m="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?v.firstChild:v.lastChild],a&&y){for(b=(p=(u=(c=(f=(h=v)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===_&&u[1])&&u[2],h=p&&v.childNodes[p];h=++p&&h&&h[m]||(b=p=0)||d.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[_,p,b];break}}else if(y&&(b=p=(u=(c=(f=(h=t)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===_&&u[1]),!1===b)for(;(h=++p&&h&&h[m]||(b=p=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++b||(y&&((c=(f=h[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[_,b]),h!==t)););return(b-=i)===n||b%n==0&&b/n>=0}}},PSEUDO:function(e,t){var r,i=n.pseudos[e]||n.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(r=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?se((function(e,r){for(var n,o=i(e,t),a=o.length;a--;)e[n=I(e,o[a])]=!(r[n]=o[a])})):function(e){return i(e,0,r)}):i}},pseudos:{not:se((function(e){var t=[],r=[],n=s(e.replace(B,"$1"));return n[x]?se((function(e,t,r,i){for(var o,a=n(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,n(t,null,o,r),t[0]=null,!r.pop()}})),has:se((function(e){return function(t){return oe(e,t).length>0}})),contains:se((function(e){return e=e.replace(J,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),lang:se((function(e){return H.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(J,ee).toLowerCase(),function(t){var r;do{if(r=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:de((function(){return[0]})),last:de((function(e,t){return[t-1]})),eq:de((function(e,t,r){return[r<0?r+t:r]})),even:de((function(e,t){for(var r=0;r=0;)e.push(n);return e})),gt:de((function(e,t,r){for(var n=r<0?r+t:r;++n1?function(t,r,n){for(var i=e.length;i--;)if(!e[i](t,r,n))return!1;return!0}:e[0]}function xe(e,t,r,n,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s-1&&(o[u]=!(a[u]=f))}}else g=xe(g===a?g.splice(d,g.length):g),i?i(null,a,g,l):L.apply(a,g)}))}function _e(e){for(var t,r,i,o=e.length,a=n.relative[e[0].type],s=a||n.relative[" "],l=a?1:0,c=ye((function(e){return e===t}),s,!0),f=ye((function(e){return I(t,e)>-1}),s,!0),h=[function(e,r,n){var i=!a&&(n||r!==u)||((t=r).nodeType?c(e,r,n):f(e,r,n));return t=null,i}];l1&&be(h),l>1&&ge(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(B,"$1"),r,l0,i=e.length>0,o=function(o,a,s,l,c){var f,d,v,g=0,y="0",b=o&&[],x=[],w=u,D=o||i&&n.find.TAG("*",c),A=_+=null==w?1:Math.random()||.1,C=D.length;for(c&&(u=a===p||a||c);y!==C&&null!=(f=D[y]);y++){if(i&&f){for(d=0,a||f.ownerDocument===p||(h(f),s=!m);v=e[d++];)if(v(f,a||p,s)){l.push(f);break}c&&(_=A)}r&&((f=!v&&f)&&g--,o&&b.push(f))}if(g+=y,r&&y!==g){for(d=0;v=t[d++];)v(b,x,a,s);if(o){if(g>0)for(;y--;)b[y]||x[y]||(x[y]=$.call(l));x=xe(x)}L.apply(l,x),c&&!o&&x.length>0&&g+t.length>1&&oe.uniqueSort(l)}return c&&(_=A,u=w),b};return r?se(o):o}(o,i))).selector=e}return s},l=oe.select=function(e,t,r,i){var o,l,u,c,f,h="function"==typeof e&&e,p=!i&&a(e=h.selector||e);if(r=r||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&m&&n.relative[l[1].type]){if(!(t=(n.find.ID(u.matches[0].replace(J,ee),t)||[])[0]))return r;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=W.needsContext.test(e)?0:l.length;o--&&(u=l[o],!n.relative[c=u.type]);)if((f=n.find[c])&&(i=f(u.matches[0].replace(J,ee),Q.test(l[0].type)&&me(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&ge(l)))return L.apply(r,i),r;break}}return(h||s(e,p))(i,t,!m,r,!t||Q.test(e)&&me(t.parentNode)||t),r},r.sortStable=x.split("").sort(E).join("")===x,r.detectDuplicates=!!f,h(),r.sortDetached=le((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),le((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||ue("type|href|height|width",(function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),r.attributes&&le((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ue("value",(function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),le((function(e){return null==e.getAttribute("disabled")}))||ue(R,(function(e,t,r){var n;if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),oe}(e);v.find=_,(v.expr=_.selectors)[":"]=v.expr.pseudos,v.uniqueSort=v.unique=_.uniqueSort,v.text=_.getText,v.isXMLDoc=_.isXML,v.contains=_.contains,v.escapeSelector=_.escape;var D=function(e,t,r){for(var n=[],i=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&v(e).is(r))break;n.push(e)}return n},A=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r},C=v.expr.match.needsContext;function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,T=/^.[^:#\[\.,]*$/;function M(e,t,r){return v.isFunction(t)?v.grep(e,(function(e,n){return!!t.call(e,n,e)!==r})):t.nodeType?v.grep(e,(function(e){return e===t!==r})):"string"!=typeof t?v.grep(e,(function(e){return l.call(t,e)>-1!==r})):T.test(t)?v.filter(t,e,r):(t=v.filter(t,e),v.grep(e,(function(e){return l.call(t,e)>-1!==r&&1===e.nodeType})))}v.filter=function(e,t,r){var n=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?v.find.matchesSelector(n,e)?[n]:[]:v.find.matches(e,v.grep(t,(function(e){return 1===e.nodeType})))},v.fn.extend({find:function(e){var t,r,n=this.length,i=this;if("string"!=typeof e)return this.pushStack(v(e).filter((function(){for(t=0;t1?v.uniqueSort(r):r},filter:function(e){return this.pushStack(M(this,e||[],!1))},not:function(e){return this.pushStack(M(this,e||[],!0))},is:function(e){return!!M(this,"string"==typeof e&&C.test(e)?v(e):e||[],!1).length}});var $,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(v.fn.init=function(e,t,r){var i,o;if(!e)return this;if(r=r||$,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:z.exec(e))||!i[1]&&t)return!t||t.jquery?(t||r).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof v?t[0]:t,v.merge(this,v.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:n,!0)),E.test(i[1])&&v.isPlainObject(t))for(i in t)v.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=n.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v.isFunction(e)?void 0!==r.ready?r.ready(e):e(v):v.makeArray(e,this)}).prototype=v.fn,$=v(n);var L=/^(?:parents|prev(?:Until|All))/,k={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}v.fn.extend({has:function(e){var t=v(e,this),r=t.length;return this.filter((function(){for(var e=0;e-1:1===r.nodeType&&v.find.matchesSelector(r,e))){o.push(r);break}return this.pushStack(o.length>1?v.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(v(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(v.uniqueSort(v.merge(this.get(),v(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),v.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return D(e,"parentNode")},parentsUntil:function(e,t,r){return D(e,"parentNode",r)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return D(e,"nextSibling")},prevAll:function(e){return D(e,"previousSibling")},nextUntil:function(e,t,r){return D(e,"nextSibling",r)},prevUntil:function(e,t,r){return D(e,"previousSibling",r)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return S(e,"iframe")?e.contentDocument:(S(e,"template")&&(e=e.content||e),v.merge([],e.childNodes))}},(function(e,t){v.fn[e]=function(r,n){var i=v.map(this,t,r);return"Until"!==e.slice(-5)&&(n=r),n&&"string"==typeof n&&(i=v.filter(n,i)),this.length>1&&(k[e]||v.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var R=/[^\x20\t\r\n\f]+/g;function O(e){return e}function F(e){throw e}function N(e,t,r,n){var i;try{e&&v.isFunction(i=e.promise)?i.call(e).done(t).fail(r):e&&v.isFunction(i=e.then)?i.call(e,t,r):t.apply(void 0,[e].slice(n))}catch(e){r.apply(void 0,[e])}}v.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return v.each(e.match(R)||[],(function(e,r){t[r]=!0})),t}(e):v.extend({},e);var t,r,n,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,n=t=!0;a.length;s=-1)for(r=a.shift();++s-1;)o.splice(r,1),r<=s&&s--})),this},has:function(e){return e?v.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=r="",this},disabled:function(){return!o},lock:function(){return i=a=[],r||t||(o=r=""),this},locked:function(){return!!i},fireWith:function(e,r){return i||(r=[e,(r=r||[]).slice?r.slice():r],a.push(r),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},v.extend({Deferred:function(t){var r=[["notify","progress",v.Callbacks("memory"),v.Callbacks("memory"),2],["resolve","done",v.Callbacks("once memory"),v.Callbacks("once memory"),0,"resolved"],["reject","fail",v.Callbacks("once memory"),v.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return v.Deferred((function(t){v.each(r,(function(r,n){var i=v.isFunction(e[n[4]])&&e[n[4]];o[n[1]]((function(){var e=i&&i.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[n[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,n,i){var o=0;function a(t,r,n,i){return function(){var s=this,l=arguments,u=function(){var e,u;if(!(t=o&&(n!==F&&(s=void 0,l=[e]),r.rejectWith(s,l))}};t?c():(v.Deferred.getStackHook&&(c.stackTrace=v.Deferred.getStackHook()),e.setTimeout(c))}}return v.Deferred((function(e){r[0][3].add(a(0,e,v.isFunction(i)?i:O,e.notifyWith)),r[1][3].add(a(0,e,v.isFunction(t)?t:O)),r[2][3].add(a(0,e,v.isFunction(n)?n:F))})).promise()},promise:function(e){return null!=e?v.extend(e,i):i}},o={};return v.each(r,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){n=s}),r[3-e][2].disable,r[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,r=t,n=Array(r),i=o.call(arguments),a=v.Deferred(),s=function(e){return function(r){n[e]=this,i[e]=arguments.length>1?o.call(arguments):r,--t||a.resolveWith(n,i)}};if(t<=1&&(N(e,a.done(s(r)).resolve,a.reject,!t),"pending"===a.state()||v.isFunction(i[r]&&i[r].then)))return a.then();for(;r--;)N(i[r],s(r),a.reject);return a.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;v.Deferred.exceptionHook=function(t,r){e.console&&e.console.warn&&t&&P.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,r)},v.readyException=function(t){e.setTimeout((function(){throw t}))};var j=v.Deferred();function B(){n.removeEventListener("DOMContentLoaded",B),e.removeEventListener("load",B),v.ready()}v.fn.ready=function(e){return j.then(e).catch((function(e){v.readyException(e)})),this},v.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--v.readyWait:v.isReady)||(v.isReady=!0,!0!==e&&--v.readyWait>0||j.resolveWith(n,[v]))}}),v.ready.then=j.then,"complete"===n.readyState||"loading"!==n.readyState&&!n.documentElement.doScroll?e.setTimeout(v.ready):(n.addEventListener("DOMContentLoaded",B),e.addEventListener("load",B));var U=function e(t,r,n,i,o,a,s){var l=0,u=t.length,c=null==n;if("object"===v.type(n))for(l in o=!0,n)e(t,r,l,n[l],!0,a,s);else if(void 0!==i&&(o=!0,v.isFunction(i)||(s=!0),c&&(s?(r.call(t,i),r=null):(c=r,r=function(e,t,r){return c.call(v(e),r)})),r))for(;l1,null,!0)},removeData:function(e){return this.each((function(){H.remove(this,e)}))}}),v.extend({queue:function(e,t,r){var n;if(e)return t=(t||"fx")+"queue",n=G.get(e,t),r&&(!n||Array.isArray(r)?n=G.access(e,t,v.makeArray(r)):n.push(r)),n||[]},dequeue:function(e,t){var r=v.queue(e,t=t||"fx"),n=r.length,i=r.shift(),o=v._queueHooks(e,t);"inprogress"===i&&(i=r.shift(),n--),i&&("fx"===t&&r.unshift("inprogress"),delete o.stop,i.call(e,(function(){v.dequeue(e,t)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return G.get(e,r)||G.access(e,r,{empty:v.Callbacks("once memory").add((function(){G.remove(e,[t+"queue",r])}))})}}),v.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length\x20\t\r\n\f]+)/i,se=/^$|\/(?:java|ecma)script/i,le={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ue(e,t){var r;return r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?v.merge([e],r):r}function ce(e,t){for(var r=0,n=e.length;r-1)i&&i.push(o);else if(u=v.contains(o.ownerDocument,o),a=ue(f.appendChild(o),"script"),u&&ce(a),r)for(c=0;o=a[c++];)se.test(o.type||"")&&r.push(o);return f}fe=n.createDocumentFragment().appendChild(n.createElement("div")),(he=n.createElement("input")).setAttribute("type","radio"),he.setAttribute("checked","checked"),he.setAttribute("name","t"),fe.appendChild(he),d.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML="",d.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue;var me=n.documentElement,ve=/^key/,ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ye=/^([^.]*)(?:\.(.+)|)/;function be(){return!0}function xe(){return!1}function we(){try{return n.activeElement}catch(e){}}function _e(e,t,r,n,i,o){var a,s;if("object"==_typeof(t)){for(s in"string"!=typeof r&&(n=n||r,r=void 0),t)_e(e,s,r,n,t[s],o);return e}if(null==n&&null==i?(i=r,n=r=void 0):null==i&&("string"==typeof r?(i=n,n=void 0):(i=n,n=r,r=void 0)),!1===i)i=xe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return v().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=v.guid++)),e.each((function(){v.event.add(this,t,i,n,r)}))}v.event={global:{},add:function(e,t,r,n,i){var o,a,s,l,u,c,f,h,p,d,m,g=G.get(e);if(g)for(r.handler&&(r=(o=r).handler,i=o.selector),i&&v.find.matchesSelector(me,i),r.guid||(r.guid=v.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return void 0!==v&&v.event.triggered!==t.type?v.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(R)||[""]).length;u--;)p=m=(s=ye.exec(t[u])||[])[1],d=(s[2]||"").split(".").sort(),p&&(f=v.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=v.event.special[p]||{},c=v.extend({type:p,origType:m,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&v.expr.match.needsContext.test(i),namespace:d.join(".")},o),(h=l[p])||((h=l[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,n,d,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),v.event.global[p]=!0)},remove:function(e,t,r,n,i){var o,a,s,l,u,c,f,h,p,d,m,g=G.hasData(e)&&G.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(R)||[""]).length;u--;)if(p=m=(s=ye.exec(t[u])||[])[1],d=(s[2]||"").split(".").sort(),p){for(f=v.event.special[p]||{},h=l[p=(n?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&m!==c.origType||r&&r.guid!==c.guid||s&&!s.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(e,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,d,g.handle)||v.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)v.event.remove(e,p+t[u],r,n,!0);v.isEmptyObject(l)&&G.remove(e,"handle events")}},dispatch:function(e){var t,r,n,i,o,a,s=v.event.fix(e),l=new Array(arguments.length),u=(G.get(this,"events")||{})[s.type]||[],c=v.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},r=0;r-1:v.find(i,this,null,[u]).length),a[i]&&o.push(n);o.length&&s.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Te(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&v(">tbody",e)[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function $e(e){var t=Se.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ze(e,t){var r,n,i,o,a,s,l,u;if(1===t.nodeType){if(G.hasData(e)&&(o=G.access(e),a=G.set(t,o),u=o.events))for(i in delete a.handle,a.events={},u)for(r=0,n=u[i].length;r1&&"string"==typeof g&&!d.checkClone&&Ce.test(g))return e.each((function(i){var o=e.eq(i);y&&(t[0]=g.call(this,i,o.html())),ke(o,t,r,n)}));if(h&&(o=(i=de(t,e[0].ownerDocument,!1,e,n)).firstChild,1===i.childNodes.length&&(i=o),o||n)){for(l=(s=v.map(ue(i,"script"),Me)).length;f")},clone:function(e,t,r){var n,i,o,a,s=e.cloneNode(!0),l=v.contains(e.ownerDocument,e);if(!(d.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||v.isXMLDoc(e)))for(a=ue(s),n=0,i=(o=ue(e)).length;n0&&ce(a,!l&&ue(e,"script")),s},cleanData:function(e){for(var t,r,n,i=v.event.special,o=0;void 0!==(r=e[o]);o++)if(V(r)){if(t=r[G.expando]){if(t.events)for(n in t.events)i[n]?v.event.remove(r,n):v.removeEvent(r,n,t.handle);r[G.expando]=void 0}r[H.expando]&&(r[H.expando]=void 0)}}}),v.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return U(this,(function(e){return void 0===e?v.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ke(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Te(this,e).appendChild(e)}))},prepend:function(){return ke(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Te(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ke(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ke(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(v.cleanData(ue(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return v.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},r=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!le[(ae.exec(e)||["",""])[1].toLowerCase()]){e=v.htmlPrefilter(e);try{for(;r1)}}),v.Tween=Ke,Ke.prototype={constructor:Ke,init:function(e,t,r,n,i,o){this.elem=e,this.prop=r,this.easing=i||v.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(v.cssNumber[r]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,r=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):Ke.propHooks._default.set(this),this}},Ke.prototype.init.prototype=Ke.prototype,Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=v.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[v.cssProps[e.prop]]&&!v.cssHooks[e.prop]?e.elem[e.prop]=e.now:v.style(e.elem,e.prop,e.now+e.unit)}}},Ke.propHooks.scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},(v.fx=Ke.prototype.init).step={};var Ze,Qe,Je=/^(?:toggle|show|hide)$/,et=/queueHooks$/;function tt(){Qe&&(!1===n.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(tt):e.setTimeout(tt,v.fx.interval),v.fx.tick())}function rt(){return e.setTimeout((function(){Ze=void 0})),Ze=v.now()}function nt(e,t){var r,n=0,i={height:e};for(t=t?1:0;n<4;n+=2-t)i["margin"+(r=Q[n])]=i["padding"+r]=e;return t&&(i.opacity=i.width=e),i}function it(e,t,r){for(var n,i=(ot.tweeners[t]||[]).concat(ot.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){v.removeAttr(this,e)}))}}),v.extend({attr:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?v.prop(e,t,r):(1===o&&v.isXMLDoc(e)||(i=v.attrHooks[t.toLowerCase()]||(v.expr.match.bool.test(t)?at:void 0)),void 0!==r?null===r?void v.removeAttr(e,t):i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:(e.setAttribute(t,r+""),r):i&&"get"in i&&null!==(n=i.get(e,t))?n:null==(n=v.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&"radio"===t&&S(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}},removeAttr:function(e,t){var r,n=0,i=t&&t.match(R);if(i&&1===e.nodeType)for(;r=i[n++];)e.removeAttribute(r)}}),at={set:function(e,t,r){return!1===t?v.removeAttr(e,r):e.setAttribute(r,r),r}},v.each(v.expr.match.bool.source.match(/\w+/g),(function(e,t){var r=st[t]||v.find.attr;st[t]=function(e,t,n){var i,o,a=t.toLowerCase();return n||(o=st[a],st[a]=i,i=null!=r(e,t,n)?a:null,st[a]=o),i}}));var lt=/^(?:input|select|textarea|button)$/i,ut=/^(?:a|area)$/i;function ct(e){return(e.match(R)||[]).join(" ")}function ft(e){return e.getAttribute&&e.getAttribute("class")||""}v.fn.extend({prop:function(e,t){return U(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[v.propFix[e]||e]}))}}),v.extend({prop:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&v.isXMLDoc(e)||(t=v.propFix[t]||t,i=v.propHooks[t]),void 0!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:e[t]=r:i&&"get"in i&&null!==(n=i.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=v.find.attr(e,"tabindex");return t?parseInt(t,10):lt.test(e.nodeName)||ut.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(v.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),v.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){v.propFix[this.toLowerCase()]=this})),v.fn.extend({addClass:function(e){var t,r,n,i,o,a,s,l=0;if(v.isFunction(e))return this.each((function(t){v(this).addClass(e.call(this,t,ft(this)))}));if("string"==typeof e&&e)for(t=e.match(R)||[];r=this[l++];)if(i=ft(r),n=1===r.nodeType&&" "+ct(i)+" "){for(a=0;o=t[a++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");i!==(s=ct(n))&&r.setAttribute("class",s)}return this},removeClass:function(e){var t,r,n,i,o,a,s,l=0;if(v.isFunction(e))return this.each((function(t){v(this).removeClass(e.call(this,t,ft(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(R)||[];r=this[l++];)if(i=ft(r),n=1===r.nodeType&&" "+ct(i)+" "){for(a=0;o=t[a++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");i!==(s=ct(n))&&r.setAttribute("class",s)}return this},toggleClass:function(e,t){var r=_typeof(e);return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):v.isFunction(e)?this.each((function(r){v(this).toggleClass(e.call(this,r,ft(this),t),t)})):this.each((function(){var t,n,i,o;if("string"===r)for(n=0,i=v(this),o=e.match(R)||[];t=o[n++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==r||((t=ft(this))&&G.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":G.get(this,"__className__")||""))}))},hasClass:function(e){var t,r,n=0;for(t=" "+e+" ";r=this[n++];)if(1===r.nodeType&&(" "+ct(ft(r))+" ").indexOf(t)>-1)return!0;return!1}});var ht=/\r/g;v.fn.extend({val:function(e){var t,r,n,i=this[0];return arguments.length?(n=v.isFunction(e),this.each((function(r){var i;1===this.nodeType&&(null==(i=n?e.call(this,r,v(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=v.map(i,(function(e){return null==e?"":e+""}))),(t=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=v.valHooks[i.type]||v.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(i,"value"))?r:"string"==typeof(r=i.value)?r.replace(ht,""):null==r?"":r:void 0}}),v.extend({valHooks:{option:{get:function(e){var t=v.find.attr(e,"value");return null!=t?t:ct(v.text(e))}},select:{get:function(e){var t,r,n,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(n=o<0?l:a?o:0;n-1)&&(r=!0);return r||(e.selectedIndex=-1),o}}}}),v.each(["radio","checkbox"],(function(){v.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=v.inArray(v(e).val(),t)>-1}},d.checkOn||(v.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var pt=/^(?:focusinfocus|focusoutblur)$/;v.extend(v.event,{trigger:function(t,r,i,o){var a,s,l,u,c,h,p,d=[i||n],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(s=l=i=i||n,3!==i.nodeType&&8!==i.nodeType&&!pt.test(m+v.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(t=t[v.expando]?t:new v.Event(m,"object"==_typeof(t)&&t)).isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),r=null==r?[t]:v.makeArray(r,[t]),p=v.event.special[m]||{},o||!p.trigger||!1!==p.trigger.apply(i,r))){if(!o&&!p.noBubble&&!v.isWindow(i)){for(u=p.delegateType||m,pt.test(u+m)||(s=s.parentNode);s;s=s.parentNode)d.push(s),l=s;l===(i.ownerDocument||n)&&d.push(l.defaultView||l.parentWindow||e)}for(a=0;(s=d[a++])&&!t.isPropagationStopped();)t.type=a>1?u:p.bindType||m,(h=(G.get(s,"events")||{})[t.type]&&G.get(s,"handle"))&&h.apply(s,r),(h=c&&s[c])&&h.apply&&V(s)&&(t.result=h.apply(s,r),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(d.pop(),r)||!V(i)||c&&v.isFunction(i[m])&&!v.isWindow(i)&&((l=i[c])&&(i[c]=null),v.event.triggered=m,i[m](),v.event.triggered=void 0,l&&(i[c]=l)),t.result}},simulate:function(e,t,r){var n=v.extend(new v.Event,r,{type:e,isSimulated:!0});v.event.trigger(n,null,t)}}),v.fn.extend({trigger:function(e,t){return this.each((function(){v.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var r=this[0];if(r)return v.event.trigger(e,t,r,!0)}}),v.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){v.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}})),v.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),d.focusin="onfocusin"in e,d.focusin||v.each({focus:"focusin",blur:"focusout"},(function(e,t){var r=function(e){v.event.simulate(t,e.target,v.event.fix(e))};v.event.special[t]={setup:function(){var n=this.ownerDocument||this,i=G.access(n,t);i||n.addEventListener(e,r,!0),G.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=G.access(n,t)-1;i?G.access(n,t,i):(n.removeEventListener(e,r,!0),G.remove(n,t))}}}));var dt=e.location,mt=v.now(),vt=/\?/;v.parseXML=function(t){var r;if(!t||"string"!=typeof t)return null;try{r=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){r=void 0}return r&&!r.getElementsByTagName("parsererror").length||v.error("Invalid XML: "+t),r};var gt=/\[\]$/,yt=/\r?\n/g,bt=/^(?:submit|button|image|reset|file)$/i,xt=/^(?:input|select|textarea|keygen)/i;function wt(e,t,r,n){var i;if(Array.isArray(t))v.each(t,(function(t,i){r||gt.test(e)?n(e,i):wt(e+"["+("object"==_typeof(i)&&null!=i?t:"")+"]",i,r,n)}));else if(r||"object"!==v.type(t))n(e,t);else for(i in t)wt(e+"["+i+"]",t[i],r,n)}v.param=function(e,t){var r,n=[],i=function(e,t){var r=v.isFunction(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==r?"":r)};if(Array.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,(function(){i(this.name,this.value)}));else for(r in e)wt(r,e[r],t,i);return n.join("&")},v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=v.prop(this,"elements");return e?v.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!v(this).is(":disabled")&&xt.test(this.nodeName)&&!bt.test(e)&&(this.checked||!oe.test(e))})).map((function(e,t){var r=v(this).val();return null==r?null:Array.isArray(r)?v.map(r,(function(e){return{name:t.name,value:e.replace(yt,"\r\n")}})):{name:t.name,value:r.replace(yt,"\r\n")}})).get()}});var _t=/%20/g,Dt=/#.*$/,At=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,St=/^(?:GET|HEAD)$/,Et=/^\/\//,Tt={},Mt={},$t="*/".concat("*"),zt=n.createElement("a");function Lt(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var n,i=0,o=t.toLowerCase().match(R)||[];if(v.isFunction(r))for(;n=o[i++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(r)):(e[n]=e[n]||[]).push(r)}}function kt(e,t,r,n){var i={},o=e===Mt;function a(s){var l;return i[s]=!0,v.each(e[s]||[],(function(e,s){var u=s(t,r,n);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function It(e,t){var r,n,i=v.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&v.extend(!0,e,n),e}zt.href=dt.href,v.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:dt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":v.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?It(It(e,v.ajaxSettings),t):It(v.ajaxSettings,e)},ajaxPrefilter:Lt(Tt),ajaxTransport:Lt(Mt),ajax:function(t,r){"object"==_typeof(t)&&(r=t,t=void 0);var i,o,a,s,l,u,c,f,h,p,d=v.ajaxSetup({},r=r||{}),m=d.context||d,g=d.context&&(m.nodeType||m.jquery)?v(m):v.event,y=v.Deferred(),b=v.Callbacks("once memory"),x=d.statusCode||{},w={},_={},D="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Ct.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=_[e.toLowerCase()]=_[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)A.always(e[A.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||D;return i&&i.abort(t),C(0,t),this}};if(y.promise(A),d.url=((t||d.url||dt.href)+"").replace(Et,dt.protocol+"//"),d.type=r.method||r.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(R)||[""],null==d.crossDomain){u=n.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=zt.protocol+"//"+zt.host!=u.protocol+"//"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=v.param(d.data,d.traditional)),kt(Tt,d,r,A),c)return A;for(h in(f=v.event&&d.global)&&0==v.active++&&v.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!St.test(d.type),o=d.url.replace(Dt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(_t,"+")):(p=d.url.slice(o.length),d.data&&(o+=(vt.test(o)?"&":"?")+d.data,delete d.data),!1===d.cache&&(o=o.replace(At,"$1"),p=(vt.test(o)?"&":"?")+"_="+mt+++p),d.url=o+p),d.ifModified&&(v.lastModified[o]&&A.setRequestHeader("If-Modified-Since",v.lastModified[o]),v.etag[o]&&A.setRequestHeader("If-None-Match",v.etag[o])),(d.data&&d.hasContent&&!1!==d.contentType||r.contentType)&&A.setRequestHeader("Content-Type",d.contentType),A.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$t+"; q=0.01":""):d.accepts["*"]),d.headers)A.setRequestHeader(h,d.headers[h]);if(d.beforeSend&&(!1===d.beforeSend.call(m,A,d)||c))return A.abort();if(D="abort",b.add(d.complete),A.done(d.success),A.fail(d.error),i=kt(Mt,d,r,A)){if(A.readyState=1,f&&g.trigger("ajaxSend",[A,d]),c)return A;d.async&&d.timeout>0&&(l=e.setTimeout((function(){A.abort("timeout")}),d.timeout));try{c=!1,i.send(w,C)}catch(e){if(c)throw e;C(-1,e)}}else C(-1,"No Transport");function C(t,r,n,s){var u,h,p,w,_,D=r;c||(c=!0,l&&e.clearTimeout(l),i=void 0,a=s||"",A.readyState=t>0?4:0,u=t>=200&&t<300||304===t,n&&(w=function(e,t,r){for(var n,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(i in s)if(s[i]&&s[i].test(n)){l.unshift(i);break}if(l[0]in r)o=l[0];else{for(i in r){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),r[o]}(d,A,n)),w=function(e,t,r,n){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(r[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(d,w,A,u),u?(d.ifModified&&((_=A.getResponseHeader("Last-Modified"))&&(v.lastModified[o]=_),(_=A.getResponseHeader("etag"))&&(v.etag[o]=_)),204===t||"HEAD"===d.type?D="nocontent":304===t?D="notmodified":(D=w.state,h=w.data,u=!(p=w.error))):(p=D,!t&&D||(D="error",t<0&&(t=0))),A.status=t,A.statusText=(r||D)+"",u?y.resolveWith(m,[h,D,A]):y.rejectWith(m,[A,D,p]),A.statusCode(x),x=void 0,f&&g.trigger(u?"ajaxSuccess":"ajaxError",[A,d,u?h:p]),b.fireWith(m,[A,D]),f&&(g.trigger("ajaxComplete",[A,d]),--v.active||v.event.trigger("ajaxStop")))}return A},getJSON:function(e,t,r){return v.get(e,t,r,"json")},getScript:function(e,t){return v.get(e,void 0,t,"script")}}),v.each(["get","post"],(function(e,t){v[t]=function(e,r,n,i){return v.isFunction(r)&&(i=i||n,n=r,r=void 0),v.ajax(v.extend({url:e,type:t,dataType:i,data:r,success:n},v.isPlainObject(e)&&e))}})),v._evalUrl=function(e){return v.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},v.fn.extend({wrapAll:function(e){var t;return this[0]&&(v.isFunction(e)&&(e=e.call(this[0])),t=v(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v.isFunction(e)?this.each((function(t){v(this).wrapInner(e.call(this,t))})):this.each((function(){var t=v(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v.isFunction(e);return this.each((function(r){v(this).wrapAll(t?e.call(this,r):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){v(this).replaceWith(this.childNodes)})),this}}),v.expr.pseudos.hidden=function(e){return!v.expr.pseudos.visible(e)},v.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},v.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Rt={0:200,1223:204},Ot=v.ajaxSettings.xhr();d.cors=!!Ot&&"withCredentials"in Ot,d.ajax=Ot=!!Ot,v.ajaxTransport((function(t){var r,n;if(d.cors||Ot&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);r=function(e){return function(){r&&(r=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Rt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=r(),n=s.onerror=r("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){r&&n()}))},r=r("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(r)throw e}},abort:function(){r&&r()}}})),v.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),v.ajaxTransport("script",(function(e){var t,r;if(e.crossDomain)return{send:function(i,o){t=v("