Permalink
Browse files

using afra's sequence track instead of JBrowse's native sequence track

  • Loading branch information...
1 parent 8255bdd commit 15fe1976cbbbbcab9a38e0aa0a36fa81862fbe3d @aniarya82 committed Aug 24, 2017
@@ -99,3 +99,73 @@ div.track_edit {
-webkit-box-sizing: border-box;
-ms-box-sizing: border-box;
}
+
+/*Styles for the reference sequence*/
+div.sequence {
+ z-index: 10;
+ display: table;
+ position: absolute;
+ pointer-events: none;
+}
+
+div.sequence > div {
+ display: table-row;
+}
+
+div.sequence > div > span {
+ display: table-cell;
+}
+
+div.sequence .aa.frame0 {
+ background-color: #999999;
+}
+
+div.sequence .aa.frame1 {
+ background-color: #BBBBBB;
+}
+
+div.sequence .aa.frame2 {
+ background-color: #DDDDDD;
+}
+
+.frame_highlight {
+ background-color: #85BB90 !important;
+}
+
+span.aa, span.nt {
+ color: black;
+ font-family: monospace;
+ font-size: 10px;
+ text-align: center;
+ text-transform: capitalize;
+}
+
+.aa_\* {
+ background: #B35252;
+}
+
+.aa_M {
+ background: #008B5E;
+}
+
+.base_n {
+ background-color: #C6C6C6;
+}
+.base_a {
+ background-color: #00BF00;
+}
+.base_c {
+ background-color: #4747ff;
+}
+.base_t {
+ background-color: #f00;
+}
+.base_g {
+ background-color: #d5bb04;
+}
+.base_reference {
+ background-color: #bbb;
+}
+.base_deletion {
+ background-color: #999;
+}
@@ -0,0 +1,107 @@
+define(function () {
+
+var CodonTable = {
+ "TCA" : "S",
+ "TCC" : "S",
+ "TCG" : "S",
+ "TCT" : "S",
+ "TTC" : "F",
+ "TTT" : "F",
+ "TTA" : "L",
+ "TTG" : "L",
+ "TAC" : "Y",
+ "TAT" : "Y",
+ "TAA" : "*",
+ "TAG" : "*",
+ "TGC" : "C",
+ "TGT" : "C",
+ "TGA" : "*",
+ "TGG" : "W",
+ "CTA" : "L",
+ "CTC" : "L",
+ "CTG" : "L",
+ "CTT" : "L",
+ "CCA" : "P",
+ "CCC" : "P",
+ "CCG" : "P",
+ "CCT" : "P",
+ "CAC" : "H",
+ "CAT" : "H",
+ "CAA" : "Q",
+ "CAG" : "Q",
+ "CGA" : "R",
+ "CGC" : "R",
+ "CGG" : "R",
+ "CGT" : "R",
+ "ATA" : "I",
+ "ATC" : "I",
+ "ATT" : "I",
+ "ATG" : "M",
+ "ACA" : "T",
+ "ACC" : "T",
+ "ACG" : "T",
+ "ACT" : "T",
+ "AAC" : "N",
+ "AAT" : "N",
+ "AAA" : "K",
+ "AAG" : "K",
+ "AGC" : "S",
+ "AGT" : "S",
+ "AGA" : "R",
+ "AGG" : "R",
+ "GTA" : "V",
+ "GTC" : "V",
+ "GTG" : "V",
+ "GTT" : "V",
+ "GCA" : "A",
+ "GCC" : "A",
+ "GCG" : "A",
+ "GCT" : "A",
+ "GAC" : "D",
+ "GAT" : "D",
+ "GAA" : "E",
+ "GAG" : "E",
+ "GGA" : "G",
+ "GGC" : "G",
+ "GGG" : "G",
+ "GGT" : "G"
+};
+
+
+/**
+ * take CodonTable above and generate larger codon table that includes
+ * all permutations of upper and lower case nucleotides
+ */
+var tempCodonTable = {};
+for (var codon in CodonTable) {
+ // looping through codon table, make sure not hitting generic properties...
+ if (CodonTable.hasOwnProperty(codon)) {
+ var aa = CodonTable[codon];
+ // console.log("Codon: ", codon, ", aa: ", aa);
+ var nucs = [];
+ for (var i=0; i<3; i++) {
+ var nuc = codon.charAt(i);
+ nucs[i] = [];
+ nucs[i][0] = nuc.toUpperCase();
+ nucs[i][1] = nuc.toLowerCase();
+ }
+ for (var i=0; i<2; i++) {
+ var n0 = nucs[0][i];
+ for (var j=0; j<2; j++) {
+ var n1 = nucs[1][j];
+ for (var k=0; k<2; k++) {
+ var n2 = nucs[2][k];
+ var triplet = n0 + n1 + n2;
+ tempCodonTable[triplet] = aa;
+ // console.log("triplet: ", triplet, ", aa: ", aa );
+ }
+ }
+ }
+ }
+}
+
+tempCodonTable.START_CODON = 'atg';
+tempCodonTable.STOP_CODONS = ['tga', 'tag', 'taa'];
+
+return tempCodonTable;
+});
Oops, something went wrong.

0 comments on commit 15fe197

Please sign in to comment.