Commit 8f75e96d authored by David Hoksza's avatar David Hoksza
Browse files

updated format for variants

parent 4de4b4ad
Pipeline #10492 canceled with stage
in 10 minutes and 32 seconds
This diff is collapsed.
......@@ -37,7 +37,7 @@
"mkdirp": "^0.5.1",
"mocha": "^3.5.3",
"mock-local-storage": "^1.1.8",
"molart": "1.3.1",
"molart": "1.3.2",
"stream-to-blob": "^1.0.1",
"uglifyjs": "^2.4.10"
},
......
......@@ -157,7 +157,7 @@ MolArt.prototype._activate = function (uniprotId) {
var customDataSources = [];
for (var i = 0; i < variants.length; i++) {
customDataSources.push({
source: 'MINERVA overlay <br/>' + variants[i].overlayName,
source: 'MINERVA: ' + variants[i].overlayName,
useExtension: false,
data: constructVariantsData(sequence, variants[i].variants)
});
......@@ -251,15 +251,19 @@ var processGeneVariant = function(minervaVariant) {
// nonsynonymous_SNV TRIB3:NM_001301188:exon2:c.G82A:p.E28K,TRIB3:NM_001301190:exon2:c.G82A:p.E28K,TRIB3:NM_001301193:exon2:c.G82A:p.E28K,TRIB3:NM_001301196:exon2:c.G82A:p.E28K,TRIB3:NM_021158:exon2:c.G82A:p.E28K,TRIB3:NM_001301201:exon3:c.G163A:p.E55K
// frameshift insertion: LRRK2:NM_198578:exon1:c.151_152insCCTCCAAGTTATTTCAAGGCAAAAATATCCATGTGCCTCT:p.A51fs
// frameshift insertion: p.A51fsins
// frameshift insertion: NCOA3:NM_001174087:exon22:c.4171_4172insG:p.M1391fs,NCOA3:NM_001174088:exon22:c.4147_4148insG:p.M1383fs,NCOA3:NM_006534:exon22:c.4162_4163insG:p.M1388fs,NCOA3:NM_181659:exon22:c.4174_4175insG:p.M1392fs
// nonframeshift_insertion LRRK2:NM_198578:exon27:c.3777_3778insATTCCTCCT:p.E1259delinsEIPP
// nonframeshift_insertion p.E1259delinsEIPP
// nonframeshift_insertion SYNJ1:NM_001160306:exon28:c.3957_3958insAATACT:p.L1320delinsNTL,SYNJ1:NM_003895:exon32:c.4215_4216insAATACT:p.L1406delinsNTL
// frameshift_deletion LRRK2:NM_198578:exon17:c.2069_2070del:p.Q690fs
// frameshift_deletion ESF1:NM_001276380:exon14:c.2519_2520del:p.E840fs,ESF1:NM_016649:exon14:c.2519_2520del:p.E840fs
// frameshift_deletion p.Q690fsdel
// frameshift_deletion ESF1:NM_001276380:exon14:c.2519_2520del:p.E840fs,ESF1:NM_016649:exon14:c.2519_2520del:p.E840fsins
// nonframeshift_deletion LRRK2:NM_198578:exon9:c.1099_1101del:p.367_367del
// nonframeshift_deletion p.367_367del
// nonframeshift_deletion RRBP1:NM_004587:exon15:c.2022_2024del:p.674_675del,RRBP1:NM_001042576:exon16:c.2022_2024del:p.674_675del
......@@ -270,35 +274,45 @@ var processGeneVariant = function(minervaVariant) {
for (var i =0; i < sChange.length; i++) {
var aaChange = sChange[i].split('.').slice(-1)[0]; // LRRK2:NM_198578:exon1:c.T45C:p.T15T
var variant = new Variant();
try {
if (aaChange.endsWith('del') > 0) {
var m = aaChange.match( /(\d+)_(\d+)/ );
[, variant.posFrom, variant.posTo] = m;
variant.varType = 'Nonframeshift deletion'
} else if (aaChange.endsWith('fs') || aaChange.indexOf('delins') >=0) {
var m = aaChange.match( /([A-Z])(\d+)/ );
[ ,variant.aaFrom, variant.posFrom] = m;
if (change.indexOf('delins') >= 0 ) variant.varType = 'Nonframeshift insertion';
else if (change.indexOf('del') >= 0) variant.varType = 'Frameshift deletion';
else variant.varType = 'Frameshift insertion';
} else {
var aaChange = sChange[i].split('.').slice(-1)[0]; // LRRK2:NM_198578:exon1:c.T45C:p.T15T
var variant = new Variant();
var m = aaChange.match( /([a-zA-Z]+)(\d+)([a-zA-Z])+/ );
if (!m || m.length != 4) continue;
if (aaChange.endsWith('del') > 0) {
var m = aaChange.match( /(\d+)_(\d+)/ );
[, variant.posFrom, variant.posTo] = m;
variant.varType = 'Nonframeshift deletion'
}else if (aaChange.indexOf('delins') >=0) {
var m = aaChange.match( /([A-Z])(\d+)delins([A-Z]+)/ );
[ ,variant.aaFrom, variant.posFrom, variant.aaTo] = m;
variant.aaTo = 'delins: ' + variant.aaTo; //This is because ProtVista can't handle insertions so we need to prefix it by 'd' which will place the variant into the 'd' line
variant.varType = 'Nonframeshift insertion';
}
else if (aaChange.endsWith('fs')) {
var m = aaChange.match( /([A-Z])(\d+)/ );
[ ,variant.aaFrom, variant.posFrom] = m;
if (change.indexOf('del') >= 0) variant.varType = 'Frameshift deletion';
else variant.varType = 'Frameshift insertion';
} else {
[ ,variant.aaFrom, variant.posFrom, variant.aaTo] = m;
variant.varType = variant.aaFrom == variant.aaTo ? 'Synonymous SNV' : 'Nonsynonymous SNV';
var m = aaChange.match( /([a-zA-Z]+)(\d+)([a-zA-Z])+/ );
if (!m || m.length != 4) continue;
[ ,variant.aaFrom, variant.posFrom, variant.aaTo] = m;
variant.varType = variant.aaFrom == variant.aaTo ? 'Synonymous SNV' : 'Nonsynonymous SNV';
}
vars.push(variant);
} catch (err) {
console.error("Problem with parsing variant " + minervaVariant.getAminoAcidChange(), err);
}
vars.push(variant);
}
return vars;
......
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