A bundle of different biological color schemes.
npm install msa-colorschemes --save
var schemes = require("msa-colorschemes");
// pure mappings
var Clustal = schemes.getScheme("clustal");
> {A: "orange", B: "#fff", ...}
// dynamic color management
var schemeMgr = new schemes();
var Clustal = schemeMgr.getScheme("clustal");
> { default: "#ffffff",
type: "static",
map: {A: "orange", ... },
getColor = function(letter)
}
Clustal.getColor("B")
> "#fff"
schemeMgr.addStaticScheme("bscheme", {B: "#bbb"})
schemeMgr.getScheme("bscheme").getColor("B")
> "#bbb"
var fun = schemeMgr.addDynScheme("fscheme", function(letter,info){
return info.pos % 2 == 0 ? "#ccc" : "#ddd";
})
var scheme = schemeMgr.getScheme("dscheme")
scheme.type
> "dyn"
scheme.getColor("A", {pos: 1})
> "#ccc"
scheme.getColor("A", {pos: 2})
> "#ddd"
Have a look in the source code.
buried_index
(akaburied
)cinema
clustal2
clustal
helix_propensity
(akahelix
)hydro
lesk
mae
nucleotide
purine_pyrimidine
(akapurine
)strand_propensity
(akastrand
)taylor
turn_propensity
(akaturn
)zappo
You have another color scheme or want to improve this package - contributions are highly welcome.