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

I/O parsers #6

Open
7 tasks
wilzbach opened this issue Jul 6, 2015 · 0 comments
Open
7 tasks

I/O parsers #6

wilzbach opened this issue Jul 6, 2015 · 0 comments

Comments

@wilzbach
Copy link
Member

wilzbach commented Jul 6, 2015

I found a bit of time to play with different ways to integrate BioJS I/O parser as web components: https://github.com/greenify/biojs3-parser-test

This is not (yet) a nice library that can be reused, but the following already works:

(for simplicity I have used just a whitespace splitter and not a real FASTA parser)

Basic custom elements

Using the url attribute

<biojs-vis-msa>
    <biojs-io-fasta url="./foo.fasta" />
</biojs-vis-msa>

Note: custom elements always need to be closed.
However once the parent gets closed, they will be closed too :)

Using textContent

<biojs-vis-msa>
    <biojs-io-fasta>
       some inner text
    </biojs-io-fasta>
</biojs-vis-msa>

Data binding between components (with Polymer)

Putting the parser as child of one visualization

<template is="dom-bind">
    <biojs-vis-msa id="msa1" seqs="{{seqs}}">
        <biojs-io-fasta url="./foo.fasta" />
    </biojs-vis-msa>

    <biojs-vis-msa id="msa2" seqs="{{seqs}}"></biojs-vis-msa>
</template>

Having the parser on the same level

<template is="dom-bind">

    <biojs-vis-msa id="msa1" seqs="{{seqs}}"></biojs-vis-msa>
    <biojs-vis-msa id="msa2" seqs="{{seqs}}"></biojs-vis-msa>

    <biojs-io-fasta url="./foo.fasta" data="{{seqs}}"/>
</template>

What is missing?

  • handling of output (aka "reverse-parsing")
  • making it more generic (as a Polymer behavior, a normal factory, ...)
  • wrapping the same functionality of the original parser
  • maybe using iron-async instead of xhr
  • adding as setup to distribute the parser on bower as well as npm
  • maybe we can create the io parser lib without Polymer
  • maybe for convenience we want to support url directly in the component (e.g. msa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant