Skip to content

Commit

Permalink
Release of version 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mpschr committed Dec 12, 2014
1 parent 1a169fd commit 4d178af
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 23 deletions.
9 changes: 5 additions & 4 deletions build/muts-needle-plot.js

Large diffs are not rendered by default.

Binary file modified build/muts-needle-plot.min.gz.js
Binary file not shown.
3 changes: 2 additions & 1 deletion build/muts-needle-plot.min.js

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions how-to-publish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,29 @@ Make sure you have npm installed.
--------------------------------------


1. Check and increment the version in the `package.json` file. E.g. version "0.4.0"
1. Pull from repository:

2. Check if examples are working fine
git pull

npm install (or gulp build)
npm run sniper
2. Check and increment the version in the `package.json` file. E.g. version "0.4.1"

access http://localhost:9090/snippets/ and see the examples
3. Check if examples are working fine

3. Pull from repository:
npm install (or gulp build)
npm run sniper

git pull
access http://localhost:9090/snippets/ and see the examples


4. Add a git tag with the same version as in the package.json file.
git tag -a v0.4.0 -m 'version 0.4.0'
4. Publish the npm-module as 'bbglab' follow the instructions given by the publish command

npm publish

5. Publish the npm-module as 'bbglab' follow the instructions given by the publish command

npm publish
5. Commit all changes, push to repository

6. Commit all changes, push to repository
git commit -a -m "Release of version 0.4.0"
git push
git push origin --tags
git commit -a -m "Release of version 0.4.1"
git tag -a v0.4.1 -m 'version 0.4.1'
git push
git push origin --tags

Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"vinyl-source-stream": "^1.0.0",
"watchify": "^1.0.6"
},
"biojs": {
"logo": "/"
},
"sniper": {
"js": [
"/build/muts-needle-plot.js",
Expand Down
43 changes: 43 additions & 0 deletions snippets/LOGO.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// BioJS-Sniper creates the DOM-element yourDiv by default
yourDiv.innerHTML = '';

// d3 & underscore are imported through the header
// import our plot-library
var mutneedles = require("muts-needle-plot");

var target = yourDiv; // autmically generated in snippets examples

var muts = [
{ coord: "148", category : "neutral", value: 3 },
{ coord: "150", category : "severe", value: 44 },
{ coord: "150", category : "mild", value: 8 },
{ coord: "152", category : "neutral", value: 2 },
{ coord: "154", category : "neutral", value: 1 },
{ coord: "155", category : "neutral", value: 3 },
{ coord: "160", category : "mild", value: 4 },
{ coord: "170", category : "severe", value: 2 },
{ coord: "171", category : "mild", value: 30 },
{ coord: "172", category : "mild", value: 50 }
];

var regions = {
"cluster 1": "145-155",
"cluster 2": "170-172"
};

var legends = {x: "Mutations Needle Plot", y: "# Mutations"}


var colorMap = {
// mutation categories
"mild": "orange",
"severe": "red",
"neutral": "lightblue",
"cluster 1": "marine",
"cluster 2": "olive"
};

var config = {maxCoord: 220, minCoord: 130, mutationData: muts, regionData: regions, target: target, legends: legends, colorMap: colorMap }

var plot1 = new mutneedles(config);

7 changes: 4 additions & 3 deletions src/js/MutsNeedlePlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function MutsNeedlePlot (config) {
.attr('class', 'd3-tip')
.offset([-10, 0])
.html(function(d) {
return "<span>" + d.value + " " + d.category + " at " + d.coordString + "</span>";
return "<span>" + d.value + " " + d.category + " at coord. " + d.coordString + "</span>";
});

var svg = d3.select(targetElement).append("svg")
Expand Down Expand Up @@ -94,6 +94,7 @@ function MutsNeedlePlot (config) {
MutsNeedlePlot.prototype.drawRegions = function(svg, regionData) {

var maxCoord = this.maxCoord;
var minCoord = this.minCoord;
var buffer = this.buffer;
var colors = this.colorMap;
var y = this.y;
Expand Down Expand Up @@ -134,9 +135,9 @@ MutsNeedlePlot.prototype.drawRegions = function(svg, regionData) {
.insert("g", ":first-child")
.attr("class", "regionsBG")
.append("rect")
.attr("x", x(0) )
.attr("x", x(minCoord) )
.attr("y", y(0) + bg_offset )
.attr("width", x(maxCoord) - x(0) )
.attr("width", x(maxCoord) - x(minCoord) )
.attr("height", 10);


Expand Down

0 comments on commit 4d178af

Please sign in to comment.