Commit a07b4635 authored by Mathieu Giraud's avatar Mathieu Giraud

js/clone.js: .getShortName(), forget alleles

IGHV3-11*03 becomes IGHV3-11
TODO: this should be optional, controled by some item in the 'settings' menu
parent cdc12cd9
......@@ -80,6 +80,7 @@ Clone.prototype = {
REGEX_N: /^(\d*)\/([ACGT]*)\/(\d*)$/, // 6/ACCAT/
REGEX_GENE: /(IGH|IGK|IGL|TRA|TRB|TRG|TRD)([\w-*]*)$/, // IGHV3-11*03
REGEX_GENE_IGNORE_ALLELE: /(IGH|IGK|IGL|TRA|TRB|TRG|TRD)([\w-]*)[\w-*]*$/, // IGHV3-11*03 (ignore *03)
getShortName: function () {
......@@ -94,7 +95,8 @@ Clone.prototype = {
console.log('>' + s);
// Shorten IGHV3-11*03 ... IGHD6-13*01 ... IGHJ4*02 into IGHV3-11*03 ... D6-13*01 ... J4*02
z = s.match(this.REGEX_GENE);
// z = s.match(this.REGEX_GENE);
z = s.match(this.REGEX_GENE_IGNORE_ALLELE);
if (z)
{
locus = (z[1] == last_locus) ? '' : z[1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment