Pas de code dépendant de la germline dans clone.js / model.js
Le code ci-dessous, et plus généralement tout ce qui est hardcodé en fonction de la germline, devrait être dans une fonction shortenName(xxx) (prenant éventuellement la germline) dans un fichier à part (germline-xxxx.js ?) :
- if (typeof (this.getSequence()) != 'undefined' && typeof (this.name) != 'undefined') {
-
this.shortName = this.name.replace(new RegExp('IGHV', 'g'), "VH");
-
this.shortName = this.shortName.replace(new RegExp('IGHD', 'g'), "DH");
-
this.shortName = this.shortName.replace(new RegExp('IGHJ', 'g'), "JH");
-
this.shortName = this.shortName.replace(new RegExp('TRG', 'g'), "");
-
this.shortName = this.shortName.replace(new RegExp('\\*..', 'g'), "");
- }
Tatiana, c'est peut-être lié (ou pas) aussi à ce qu'on discutait vendredi dernier.
Lien avec export Fasta ?