cBioPortal / mutation-mapper

GNU Lesser General Public License v3.0
13 stars 22 forks source link

Bug in mutationMapper.js dataFieldCount method #39

Closed pieterlukasse closed 8 years ago

pieterlukasse commented 8 years ago

While debugging I noticed that the retrieved data is available in a different format than expected by the mutationMapper.js dataFieldCount method. See screenshot. All attributes are available in an "attributes" list variable and not directly under mutations[i] (so mutations[i].attributes["uniprotAcc"] works while mutations[i]["uniprotAcc"] fails)

image

pieterlukasse commented 8 years ago

I did a quick check and it looks like the backend code MutationDataUtils.getMutationData() has not changed recently.

pieterlukasse commented 8 years ago

perhaps the fix is something like mutations.at(i).get(dataField) like changed recently elsewhere in the code? For example:

    this._updateGeneMap = function(mutations)
    {
        var mutationMap = _mutationGeneMap;

        // process raw data to group mutations by genes
        for (var i=0; i < mutations.length; i++)
        {
            var gene = mutations.at(i).get("geneSymbol");
onursumer commented 8 years ago

Thanks for reporting this @pieterlukasse! Looks like this is related to recent data field access method change on the front-end. I will try to fix this soon.