Skip to content

Commit

Permalink
Add test for search-by-Ensembl-ID, remove redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
eweitz committed Dec 6, 2024
1 parent d296e2b commit c6ff512
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions test/online/related-genes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,16 @@ describe('Ideogram related genes kit', function() {
const ideogram = Ideogram.initRelatedGenes(config);
});

it('handles gene with no interacting genes and no paralogs', done => {
it('handles search by Ensembl ID', done => {

async function callback() {
const ideo = this;

await ideogram.plotRelatedGenes('BRCA1');
// Ensembl ID for gene "LPL"
await ideo.plotRelatedGenes('ENSG00000175445');

const related = ideo.getRelatedGenesByType();

const numParalogs = related.paralogous.length;
const numInteractingGenes = related.interacting.length;

assert.equal(numInteractingGenes, 0);
assert.equal(numParalogs, 0);
const chr10ParalogNeighborhoods = ideo.annotsOther['9'].annots;
assert.equal(chr10ParalogNeighborhoods.length, 1);

done();
}
Expand All @@ -292,7 +288,7 @@ describe('Ideogram related genes kit', function() {
}

var config = {
organism: 'Macaca mulatta', // Also tests standard, non-slugged name
organism: 'Homo sapiens', // Also tests standard, non-slugged name
onLoad: callback,
dataDir: '/dist/data/bands/native/',
cacheDir: '/dist/data/cache/',
Expand All @@ -303,6 +299,7 @@ describe('Ideogram related genes kit', function() {
});

it('handles gene with no interacting genes and no paralogs', done => {

async function callback() {
const ideo = this;

Expand All @@ -324,16 +321,16 @@ describe('Ideogram related genes kit', function() {
}

var config = {
organism: 'Macaca mulatta',
organism: 'Macaca mulatta', // Also tests standard, non-slugged name
onLoad: callback,
dataDir: '/dist/data/bands/native/',
cacheDir: '/dist/data/cache/',
onClickAnnot
};

const ideogram = Ideogram.initRelatedGenes(config);
});


it('handles gene that is unknown', done => {

async function callback() {
Expand Down

0 comments on commit c6ff512

Please sign in to comment.