-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
pileup.js component #543
Conversation
@akmorrow13 this is looking great! Re: your question:
Most of the demo apps include data in their own subdirectory - in fact it's not clear to me if there's still any purpose to the root Here for example is what the alignment chart demo does: dash-bio/tests/dashbio_demos/dash-alignment-chart/app.py Lines 21 to 25 in 1238023
@HammadTheOne I don't get how these demos are supposed to be used locally... when I've tried that I've had to modify the demo code as it can't find
@akmorrow13 regardless, feel free to just create a normal standalone app for the demo and we can tweak it. |
Thanks @alexcjohnson for the response. The difference between pileup and the alignment-chart app is that alignment-chart reads in data files external to the app. However, pileup.js needs genomic files served through the app so it can make http calls. However, when the app is started, the data directory is not included in the app. In fact, only css files in the assets directory is included. I am sure there is a way to modify this, I just haven't found it in the documentation yet. |
Ah ok - then put these files in an |
Thanks @alexcjohnson. Any non-css files included in |
@alexcjohnson this actually works, they are just not visible in the inspector. Thanks! |
Yes, sorry for the confusion @alexcjohnson . Everything is working great now. |
# Conflicts: # dash_bio/async-nglmoleculeviewer.js # dash_bio/bundle.js # dash_bio/package-info.json
@HammadTheOne This is ready for review. I can clean up the commit history if needed when complete. @jackparmer mentioned we need documentation for the components. Where should the documentation go and what is the preferred structure for these docs? |
@akmorrow13 Thanks for the update! Just from glancing over it it looks great, but I'll do a thorough review shortly. Documentation for this component would go in the For structuring the chapter, it might be helpful to take a look at a commit I made for adding the IGV component docs recently which follows the same basic structure as most of the other components in the library. The main things we want to add are an entry to |
src/lib/components/Pileup.react.js
Outdated
|
||
const RealPileup = lazy(LazyLoader.pileup); | ||
/** | ||
* The Pileup component is an genome visualization component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The Pileup component is an genome visualization component | |
* The Pileup component is a genome visualization component |
src/lib/components/Pileup.react.js
Outdated
Object defining genomic location. | ||
Of the format: {contig: 'chr17', start: 7512384, stop: 7512544} | ||
*/ | ||
range: PropTypes.shape({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to use exact
over shape
here, unless there's any additional arbitrary keys supported by this prop. That way, we'll have explicit warnings if any extra properties are passed.
range: PropTypes.shape({ | |
range: PropTypes.exact({ |
* Name of visualization. | ||
(ie coverage, genome, genes, etc.) | ||
*/ | ||
viz: PropTypes.oneOf(PILEUP_VIZ_TYPES), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to note here that we may want to explicitly list the PILEUP_VIZ_TYPES
and PILEUP_SOURCE_TYPES
in our docs once we have a chapter for this component, so users wouldn't have to dig through the source code or external docs to find out which ones are supported.
Thanks for the feedback @HammadTheOne , these have all been resolved. |
Thanks @akmorrow, the changes look great and it's nice that you exposed the There's just a few very minor suggestions I have, but otherwise it looks good to me 💃 @alexcjohnson I think this PR is ready for a final pass from you, in case there's anything I may have missed. |
Co-authored-by: HammadTheOne <[email protected]>
Thank you @HammadTheOne for the comments, the suggestions have been applied. Will this need to be merged in before I can work on the docs locally? |
Thanks @akmorrow13! You should be able to work on the docs locally and even open a PR for them prior to merging this PR, the only caveat would be re-installing this branch of the Once this PR is merged we'll most likely make a |
Link to docs: https://github.com/plotly/dash-docs/pull/1114 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akmorrow13 this looks great! 💃 I just had two minor suggestions, and I'm trying to figure out why the CI tests aren't being triggered - @HammadTheOne I mentioned this to @rpkyle since he was working on this earlier re: circleci contexts, it would really be nice to figure this out and see the tests passing before merging.
About
Description of changes
Adding a component that uses pileup.js to visualize genomic datasets.
Current TODOs/issues:
data
folder through the app. How do you add data to the app so you can access it in the demos?