npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

biojs2galaxy

v0.0.7

Published

Continous integration of BioJS components into Galay

Downloads

8

Readme

biojs2galaxy

NPM version

A fast tool to convert BioJS components into Galaxy visualization plugins.

Warning: This tool is in a ALPHA stage. Use at your own risk.

It was tested so far with the

How to add a (BioJS) Plugin

  1. Define your data types in the package.json
  "galaxy": {
    "datatypes": ["sequence.Fasta", "sequences", "msa.clustal"]
  }
  1. Add the galaxy-vis keyword to your package.json

So your keyword list could look like this.

keywords = ["biojs", "galaxy-vis"]
  1. Define a custom galaxy.mako (package root)
galaxy.getData(response){
	galaxy.el.textContent = response;
	console.log("datatype", galaxy.dataType);
});
  1. Check whether you have defined correct sniper settings.

There are some predefined variables in the galaxy namespace.

  • url raw URL to your data file
  • dataType dataType of your file
  • config galaxy config parameters (e.g. id)
  • meta galaxy meta information (e.g. timestamps)
  • el an existing div for your component
  • relativeURL URL to your galaxy vis plugin
  • jsonURL URL to your data file (wrapped in a JSON object - only use this if the API throws an error for the raw file

TODO: read more settings like a data provider from the package.json

How does it work

  1. Query npm: "give me all package with the "galaxy-vis tag"
  2. For every package (async)
    a) Download the package and install its dependencies
    b) Browserify the package and copy the output to /static/{{name}}
    c) Copy the js and css resources defined in the biojs sniper settings to static (http links are downloaded)
    d) Copy the galaxy.mako into a mako template
    e) Generate a config file based on the specified data types

How to run

Install:

npm install -g biojs2galaxy

Run:

biojs2galaxy

Specify a specific output folder (default: $(pwd)/build

biojs2galaxy <folder>

(You need npm & node, of course)

How to use

  Usage: biojs2galaxy [packages]

  Automated import of biojs components into galaxy

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -v, --verbose          Increase verbosity
    -a, --all              Download all packages from npm
    -o, --output [folder]  Output folder
    -p, --path [path]      Path to local package
    -r, --remove           Clear output folder

Download packages:

biojs2galaxy msa,biojs-vis-sequence

Download all packages:

biojs2galaxy --all

Local mode (for development):

biojs2galaxy -p ../msa

How to develop

git clone https://github.com/biojs/biojs2galaxy
cd biojs2galaxy
npm install
node biojs2galaxy.js