MSA 基因序列对比差异化 相关使用
MSA 相关使用
引入官方的 js 脚本后,遇到的问题
- Invalid regular expression: /['鈥橾/g: Unterminated character class (at index.js:575:16)
出现的原因是:正则表达式写法错误,字符集 […] 没有正确闭合,或者包含了非法字符(如“鈥橾”是乱码,通常是文件编码或拷贝粘贴出错导致)。
解决办法:找到相关代码
mn = "['鈥橾",修改为mn = "['\"]",即可
- TypeError: t.on is not a function
解决办法: 找到 9583 行代码
if (((this.seqs = []), !t instanceof Array || "at" in t))把 at 改成 on 即可
if (((this.seqs = []), !t instanceof Array || "on" in t))
官网 issue https://github.com/wilzbach/msa/issues/257 ,请参照 guignonv 开发者的回答。
demo
<!DOCTYPE html>
<html><head><metaname="description"content="Example of loading MSAViewer from a string"/><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>JS Bin</title><script src="./index.js"></script></head><body><div id="msa-container"></div><script>var rootDiv = document.getElementById("msa-container");var m = msa({el: rootDiv,zoomer: {labelNameLength: 100,labelIdLength: 100,},});msa.io.clustal.read("https://raw.githubusercontent.com/wilzbach/msa/master/test/dummy/samples/p53.clustalo.clustal",function (err, seqs) {m.seqs.reset(seqs);m.render();});</script></body>
</html>
取消序列颜色 (取消dna键的背景颜色)
取消每个字母的背景色即可
m.g.colorscheme.addStaticScheme("own", {// A: "orange",// C: "red",// G: "green",// T: "blue",// M: "white",});m.g.colorscheme.set("scheme", "own");Ï
