Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

protvista-coloured-sequence

Package Overview
Dependencies
Maintainers
5
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protvista-coloured-sequence - npm Package Compare versions

Comparing version 2.1.0-alpha.2 to 2.1.0

6

package.json
{
"name": "protvista-coloured-sequence",
"version": "2.1.0-alpha.2+ebb6e2a",
"version": "2.1.0",
"description": "Track that colors each base by a given function. The default funcion is hidrophobicity",

@@ -15,3 +15,3 @@ "files": [

"dependencies": {
"protvista-sequence": "^2.1.0-alpha.2+ebb6e2a",
"protvista-sequence": "^2.1.0",
"protvista-utils": "^2.0.4"

@@ -25,3 +25,3 @@ },

},
"gitHead": "ebb6e2a22389fb7e847e970cbf5a47997b2c42ee"
"gitHead": "85cdbc047a7088159a757bccd2d3c0907c768c7c"
}

@@ -99,2 +99,12 @@ import { select, scaleLinear } from "d3";

}
const colorScale = scaleLinear();
if (this._color_range) {
const customColorScale = ColorScaleParser(this._color_range);
colorScale
.domain(customColorScale.domain)
.range(customColorScale.range);
} else {
colorScale.domain(defaultScale.domain).range(defaultScale.range);
}
const ftWidth = this.getSingleBaseWidth();

@@ -109,3 +119,11 @@ const first = Math.round(Math.max(0, this._displaystart - 2));

.map((aa, i) => {
return { start: 1 + first + i, end: 1 + first + i, aa: aa };
// use 0 if the base is not in the given scale
const value = aa.toUpperCase() in scale ? scale[aa.toUpperCase()] : 0;
return {
start: 1 + first + i,
end: 1 + first + i,
aa,
value,
colour: colorScale(value)
};
});

@@ -117,12 +135,2 @@

const colorScale = scaleLinear();
if (this._color_range) {
const customColorScale = ColorScaleParser(this._color_range);
colorScale
.domain(customColorScale.domain)
.range(customColorScale.range);
} else {
colorScale.domain(defaultScale.domain).range(defaultScale.range);
}
this.residues

@@ -137,7 +145,3 @@ .enter()

.attr("width", ftWidth)
.attr("fill", ({ aa }) => {
return colorScale(
aa.toUpperCase() in scale ? scale[aa.toUpperCase()] : 0 // if the base is not in the given scale
);
})
.attr("fill", ({ colour }) => colour)
.attr("x", ({ start }) => this.getXFromSeqPosition(start))

@@ -144,0 +148,0 @@ .call(this.bindEvents, this);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc