Skip to content

Commit

Permalink
adding annotations was getting tripped up by spaces after protein ids…
Browse files Browse the repository at this point in the history
… in annotatino CSV file
  • Loading branch information
colin-combe committed Mar 24, 2016
1 parent 1098103 commit ab2aacd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/controller/Init.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ xiNET.Controller.prototype.addMatches = function(matches) {
// add annotation, 'HUMAN' RESIDUE NUMBERING - STARTS AT ONE
//TODO: make start and end res last args
xiNET.Controller.prototype.addAnnotation = function(protId, annotName, startRes, endRes, colour) {
protId = protId.toString().trim();
var protein = this.proteins.get(protId);
if (protein) {
//lets just check a few things here...
Expand Down
2 changes: 1 addition & 1 deletion src/controller/ReadCSV.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ xiNET.Controller.prototype.readCSV = function(csv, fasta, annotations) {
for (var i = 0; i < accArray.length; i++) {
var id = accArray[i].trim();
if (id.trim() !== '-' && id.trim() !== 'n/a'){
var acc, name;
var acc = "", name = "";
if (accArray[i].indexOf('|') === -1) {
acc = accArray[i].trim();
}
Expand Down

0 comments on commit ab2aacd

Please sign in to comment.