diff --git a/src/js/modules/AjaxDataProvider.js b/src/js/modules/AjaxDataProvider.js index 7fff7c4..f3f15a5 100644 --- a/src/js/modules/AjaxDataProvider.js +++ b/src/js/modules/AjaxDataProvider.js @@ -8,9 +8,14 @@ var PeptideModifications = (function(pm){ //[iTRAQ4plex]RTLNISHNLH{S:Phospho}LLPEVSPM{K:iTRAQ4plex}NR //Returns an html formatted sequence including modifications for a list of peptide ids found in pepIDs pm.htmlFormatSequences = function (objs) { //pepIDs - objs.data.forEach(function(cv){ - let s = cv['"Sequence"']; + let s = undefined; + if (cv['"Sequence"']) { + s = cv['"Sequence"']; + } else { + s = cv['"PEPTIDE_ID"']; + } + s = s.replace(/{([A-Z]):(.+?)}/g, '$1'); s = s.replace(/\[(\S+?)\]/g, ''); @@ -19,8 +24,6 @@ var PeptideModifications = (function(pm){ s = s.replace(/([A-Z]){(.+?)}/g, '$1'); //For the olders version - - cv['"Sequence"'] = s; }); return objs;