Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

pileup.js component #543

Merged
merged 24 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export(dashbioCircos)
export(dashbioFornaContainer)
export(dashbioIdeogram)
export(dashbioIgv)
export(dashbioPileup)
export(dashbioMolecule2dViewer)
export(dashbioMolecule3dViewer)
export(dashbioNeedlePlot)
Expand Down
59 changes: 59 additions & 0 deletions dash_bio/Pileup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# AUTO GENERATED FILE - DO NOT EDIT

from dash.development.base_component import Component, _explicitize_args


class Pileup(Component):
"""A Pileup component.
The Pileup component is a genome visualization component
developed by the the Hammerlab. It uses an
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', 'stop'.
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
- stop (number; optional): Stop location to display
- 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.
(ie coverage, genome, genes, etc.)
- vizOptions (optional): Options that define viz defails.
Options depend on the viz type selected.
- label (string; optional): Label to display by track
- source (optional): Data source to visualize.
(ie bam, vcf, alignmentJson, GAVariant, etc.)
- sourceOptions (optional): Options that define data source.
Options depend on the source 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._type = 'Pileup'
self._namespace = 'dash_bio'
self._valid_wildcard_attributes = []
self.available_properties = ['id', 'style', 'className', 'range', 'reference', '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(
'Required argument `' + k + '` was not specified.')
super(Pileup, self).__init__(**args)
1 change: 1 addition & 0 deletions dash_bio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'circos',
'ideogram',
'igv',
'pileup',
'moleculeviewer2',
'moleculeviewer3',
'needle',
Expand Down
2 changes: 2 additions & 0 deletions dash_bio/_imports_.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .NeedlePlot import NeedlePlot
from .NglMoleculeViewer import NglMoleculeViewer
from .OncoPrint import OncoPrint
from .Pileup import Pileup
from .SequenceViewer import SequenceViewer
from .Speck import Speck

Expand All @@ -22,6 +23,7 @@
"NeedlePlot",
"NglMoleculeViewer",
"OncoPrint",
"Pileup",
"SequenceViewer",
"Speck"
]
1,235 changes: 1,172 additions & 63 deletions dash_bio/async-alignment.js

Large diffs are not rendered by default.

40 changes: 37 additions & 3 deletions dash_bio/async-circos.js

Large diffs are not rendered by default.

28 changes: 26 additions & 2 deletions dash_bio/async-ideogram.js

Large diffs are not rendered by default.

79 changes: 26 additions & 53 deletions dash_bio/async-igv.js

Large diffs are not rendered by default.

5,642 changes: 5,641 additions & 1 deletion dash_bio/async-moleculeviewer2.js

Large diffs are not rendered by default.

84 changes: 59 additions & 25 deletions dash_bio/async-moleculeviewer3.js

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion dash_bio/async-needle.js

Large diffs are not rendered by default.

137 changes: 47 additions & 90 deletions dash_bio/async-nglmoleculeviewer.js

Large diffs are not rendered by default.

64 changes: 63 additions & 1 deletion dash_bio/async-onco.js

Large diffs are not rendered by default.

7,770 changes: 7,770 additions & 0 deletions dash_bio/async-pileup.js

Large diffs are not rendered by default.

173 changes: 148 additions & 25 deletions dash_bio/async-sequence.js

Large diffs are not rendered by default.

27 changes: 26 additions & 1 deletion dash_bio/async-speck.js

Large diffs are not rendered by default.

4,634 changes: 4,633 additions & 1 deletion dash_bio/bundle.js

Large diffs are not rendered by default.

128 changes: 127 additions & 1 deletion dash_bio/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2289,6 +2289,132 @@
}
}
},
"src/lib/components/Pileup.react.js": {
"description": "The Pileup component is a genome visualization component\ndeveloped by the the Hammerlab. It uses an\nexample integration of pileup.js and React (https://www.npmjs.com/package/pileup).",
"displayName": "Pileup",
"methods": [],
"props": {
"id": {
"type": {
"name": "string"
},
"required": false,
"description": "The ID of this component, used to identify dash components in callbacks.\nThe ID needs to be unique across all of the components in an app."
},
"setProps": {
"type": {
"name": "func"
},
"required": false,
"description": "Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."
},
"style": {
"type": {
"name": "object"
},
"required": false,
"description": "Generic style overrides on the plot div"
},
"className": {
"type": {
"name": "string"
},
"required": false,
"description": "className of the component div."
},
"range": {
"type": {
"name": "exact",
"value": {
"contig": {
"name": "string",
"description": "Name of contig to display. (ie. chr17)",
"required": false
},
"start": {
"name": "number",
"description": "Start location to display",
"required": false
},
"stop": {
"name": "number",
"description": "Stop location to display",
"required": false
}
}
},
"required": false,
"description": "Object defining genomic location.\n Of the format: {contig: 'chr17', start: 7512384, stop: 7512544}"
},
"reference": {
"type": {
"name": "shape",
"value": {
"label": {
"name": "string",
"description": "Label to display by reference",
"required": false
},
"url": {
"name": "string",
"description": "Url of 2bit file.\n https://genome.ucsc.edu/goldenPath/help/twoBit.html",
"required": false
},
"stop": {
"name": "number",
"description": "Stop location to display",
"required": false
}
}
},
"required": false,
"description": "Object defining genomic reference."
},
"tracks": {
"type": {
"name": "arrayOf",
"value": {
"name": "shape",
"value": {
"viz": {
"name": "enum",
"computed": true,
"value": "PILEUP_VIZ_TYPES",
"description": "Name of visualization.\n (ie coverage, genome, genes, etc.)",
"required": false
},
"vizOptions": {
"name": "custom",
"raw": "PropTypes.Object",
"description": "Options that define viz defails.\n Options depend on the viz type selected.",
"required": false
},
"label": {
"name": "string",
"description": "Label to display by track",
"required": false
},
"source": {
"name": "enum",
"computed": true,
"value": "PILEUP_SOURCE_TYPES",
"description": "Data source to visualize.\n (ie bam, vcf, alignmentJson, GAVariant, etc.)",
"required": false
},
"sourceOptions": {
"name": "custom",
"raw": "PropTypes.Object",
"description": "Options that define data source.\n Options depend on the source selected.",
"required": false
}
}
}
},
"required": false,
"description": "Array of configuration objects defining tracks initially displayed when app launches.\n see https://github.com/hammerlab/pileup.js#usage"
}
}
},
"src/lib/components/SequenceViewer.react.js": {
"description": "The sequence viewer component is used to display sequences\nthat represent proteins, strands of genomic information, and\nmore. It can apply a coverage to the sequence supplied (with\nclickable coverage sections that can display specific information,\nand an optional legend to describe the color codes used),\nsearch through the sequence for specific regex, capture\nmouse selection events of subparts of the sequence, display a\ncount of the number of nucleotides or amino acids in the\nsequence,\nRead more about the component here:\nhttps://github.com/FlyBase/react-sequence-viewer",
"displayName": "SequenceViewer",
Expand Down Expand Up @@ -2730,4 +2856,4 @@
}
}
}
}
}
95 changes: 1 addition & 94 deletions dash_bio/package-info.json
Original file line number Diff line number Diff line change
@@ -1,94 +1 @@
{
"name": "dash-bio",
"version": "0.6.1",
"description": "Dash components for bioinformatics",
"repository": {
"type": "git",
"url": "[email protected]:plotly/dash-bio.git"
},
"bugs": {
"url": "https://github.com/plotly/dash-bio/issues"
},
"homepage": "https://github.com/plotly/dash-bio",
"main": "build/index.js",
"scripts": {
"format:test": "prettier --config .prettierrc --list-different \"{src/**/, src/lib/components/}*.js\"",
"format": "prettier --config .prettierrc --write \"{src/**/, src/lib/components/}*.js\"",
"lint:test": "eslint src",
"lint": "eslint src --fix",
"test": "npm run lint:test && npm run format:test && npm run test-unit",
"test-unit": "jest",
"build:js-dev": "webpack --mode development",
"build:js": "npm run lint && npm run format && webpack --mode production",
"build:py": "node ./extract-meta src/lib/components > dash_bio/metadata.json && python get_version_info.py && python -c \"import dash; dash.development.component_loader.generate_classes('dash_bio', 'dash_bio/metadata.json')\"",
"build:r": "dash-generate-components ./src/lib/components dash_bio -p package-info.json --r-prefix='dashbio' --r-imports='dash' --r-depends='manhattanly'",
"build": "npm run build:js && npm run build:py",
"build:all": "npm run build && npm run build:r",
"postbuild": "es-check es5 dash_bio/*.js",
"build:dev": "npm run build:js-dev && npm run build:py"
},
"author": "The Plotly Team <[email protected]>",
"maintainer": "Ryan Patrick Kyle <[email protected]>",
"license": "MIT",
"dependencies": {
"circos": "git+https://github.com/plotly/circosJS.git#matthewchan15-zoom-pan-svg",
"fast-memoize": "^2.5.1",
"fornac": "git://github.com/plotly/fornac.git#6b1b84740d35bf37ca7d251e665039a87b4c2ea9",
"ideogram": "git+https://github.com/eweitz/ideogram.git#7d9b2ab91b91ef35db93bdeb529d4760de63292f",
"igv": "2.6.8",
"molecule-2d-for-react": "git://github.com/plotly/molecule-2d-for-react.git",
"molecule-3d-for-react": "git://github.com/plotly/molecule-3d-for-react.git",
"ngl": "^0.10.4",
"plotly.js": "^1.52.2",
"ramda": "^0.26.0",
"react": "16.13.0",
"react-alignment-viewer": "^0.5.5",
"react-dom": "16.13.0",
"react-oncoprint": "^1.2.3",
"react-plotly.js": "^2.4.0",
"react-sequence-viewer": "git://github.com/plotly/react-sequence-viewer.git",
"speck": "git://github.com/plotly/speck.git"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.8.4",
"@babel/preset-react": "^7.8.3",
"@plotly/webpack-dash-dynamic-import": "^1.1.5",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.5.0",
"babel-loader": "^8.0.6",
"copyfiles": "^2.2.0",
"css-loader": "^3.4.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"es-check": "^5.0.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.3",
"jest": "^24.5.0",
"jest-canvas-mock": "^2.2.0",
"jest-raw-loader": "^1.0.1",
"prettier": "^1.19.1",
"react-docgen": "^3.0.0",
"react-test-renderer": "^16.12.0",
"style-loader": "^0.23.0",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-serve": "^3.2.0"
},
"peerDependencies": {
"react": ">=0.14",
"react-dom": ">=0.14"
},
"files": [
"dash_bio/bundle.js",
"dash_bio/async~*.js"
],
"engines": {
"node": ">=8.11.0",
"npm": ">=6.1.0"
}
}
{"name": "dash_bio", "version": "0.6.1", "author": "The Plotly Team <[email protected]>"}
Loading