Skip to content

Commit

Permalink
Remove deprecated gencode bedfile name parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Jan 25, 2019
1 parent a7fbb2d commit d23ee28
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions js/feature/featureParsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,19 +524,20 @@ var igv = (function (igv) {

if (tokens.length > 3) {
// Note: these are very special rules for the gencode gene files.
tmp = tokens[3].replace(/"/g, '');
idName = tmp.split(';');
for (var i = 0; i < idName.length; i++) {
var kv = idName[i].split('=');
if (kv[0] == "gene_id") {
id = kv[1];
}
if (kv[0] == "gene_name") {
name = kv[1];
}
}
feature.id = id ? id : tmp;
feature.name = name ? name : tmp;
// tmp = tokens[3].replace(/"/g, '');
// idName = tmp.split(';');
// for (var i = 0; i < idName.length; i++) {
// var kv = idName[i].split('=');
// if (kv[0] == "gene_id") {
// id = kv[1];
// }
// if (kv[0] == "gene_name") {
// name = kv[1];
// }
// }
// feature.id = id ? id : tmp;
// feature.name = name ? name : tmp;
feature.name = name;
}

if (tokens.length > 4) {
Expand Down

0 comments on commit d23ee28

Please sign in to comment.