Skip to content

Commit

Permalink
Don't use escape in VCFFeature model
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 18, 2018
1 parent 012dc4c commit ed42b22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/JBrowse/Model/VCFFeature.js
Expand Up @@ -11,8 +11,8 @@ function (Util) {
this._id = args.id;
this.data = this.dataFromVariant(this.variant);
},
get(field) {

get(field) {
return this._get(field) || this._get(field.toLowerCase())
},

Expand Down Expand Up @@ -97,7 +97,7 @@ function (Util) {
start: start,
end: end,
seq_id: variant.CHROM,
description: Util.escapeHTML( description ),
description: description,
type: SO_term,
reference_allele: ref
};
Expand Down Expand Up @@ -128,7 +128,7 @@ function (Util) {
meta: {
description: 'VCF ALT field, list of alternate non-reference alleles called on at least one of the samples'
},
values: alt.map( Util.escapeHTML )
values: alt
};
}

Expand Down Expand Up @@ -250,7 +250,7 @@ function (Util) {

_getSOAndDescByExamination: function (ref, alt) {
if (ref.length == 1 && alt.length == 1) {
// use SNV because SO definition of SNP says abundance must be at
// use SNV because SO definition of SNP says abundance must be at
// least 1% in population, and can't be sure we meet that
return [
'SNV',
Expand Down
6 changes: 3 additions & 3 deletions tests/js_tests/spec/VCF.spec.js
Expand Up @@ -62,7 +62,7 @@ describe('VCF store', function() {
);
runs(function() {
expect(features.length).toEqual( 7 );
expect(features[2].get('alternative_alleles').values).toEqual([ "TC", "<*>" ]);
expect(features[2].get('alternative_alleles').values).toEqual([ "TC", "<*>" ]);
});


Expand Down Expand Up @@ -122,7 +122,7 @@ describe('VCF store', function() {
);
runs(function() {
expect(features.length).toEqual( 37 );
expect(features[0].get('alternative_alleles').values).toEqual([ '&lt;NON_REF&gt;' ]);
expect(features[0].get('alternative_alleles').values).toEqual([ '<NON_REF>' ]);
});
});

Expand Down Expand Up @@ -191,7 +191,7 @@ describe('VCF store', function() {
start: 1206810422,
end: 1206810423,
seq_id: '1',
description: 'SNV T -&gt; A',
description: 'SNV T -> A',
type: 'SNV',
reference_allele: 'T',
score: 25,
Expand Down

0 comments on commit ed42b22

Please sign in to comment.