-
Notifications
You must be signed in to change notification settings - Fork 64
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
Dynamically generated vcf content #420
Conversation
…o attach dynamically generated data (instead from files it will be taken from a string source that represents content of the file)
* AbstractFile is an abstract representation of a file. There are two implementation: | ||
* 1. RemoteFile - representation of a file on a remote server which can be | ||
* fetched in chunks, e.g. using a Range request. | ||
* 2. LoclaStringFile is a representation of a file that was created from input string. |
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.
Locla -> Local
@piotr-gawron: again — this is great, thanks! I have a few comments and suggestions here and there before we merge this in. Let me know if you need more clarification on any of these. |
@armish I agree with all of them. Thanks for checking my code. I inlcuded your comments in the PR (I'm not sure if you wanted me to do it or not :)). |
@piotr-gawron: cool - thanks for addressing those comments! Two minor things to address before we call this a merge:
|
|
||
return createFromVcfFile(new VcfFile(new RemoteFile(url))); | ||
function create(data: {url?: string, content?: string}): VcfDataSource { |
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.
thanks for adding this implementation in. Can you remove the old one from the source code?
@armish I hope I fixed it properly this time. |
@piotr-gawron How is this functionality used? Can you add example code? I have a JSON file that I'd like to load into pileup.js and it seems like the easiest way is to transform the JSON into a VCF File and then load it into pileup.js in memory. Thanks! |
This pull request contains simple functionality that allows to visualize vcf files that were dynamically created in memory by javascript code.
Ideally it would be great to have possibility to create dynamic content for variant track. Here I provide a simple tool that allows it to some extend. When creating variant track there is possibility to intialize it with the content of vcf file instead of url.
Of course it should be used for small dynamic content.
Some technical comments:
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)