Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotation overview data #15

Open
nconrad opened this issue Aug 26, 2015 · 3 comments
Open

annotation overview data #15

nconrad opened this issue Aug 26, 2015 · 3 comments

Comments

@nconrad
Copy link

nconrad commented Aug 26, 2015

I'm reporting this because I didn't understand the data organization.

From my code:

// The annotation overview structure seems to consist of hashes with
// values of "1", instead of flat arrays.  This should probably be fixed.
// Note: the 'role' structure is correct
function parseOverview(data) {
    for (var i=0; i<data.length; i++) {
        data[i].pathways = Object.keys(data[i].pathways);
        data[i].classes = Object.keys(data[i].classes);
        data[i].features = Object.keys(data[i].features);
        data[i].subsystems = Object.keys(data[i].subsystems);
        data[i].reactions = Object.keys(data[i].reactions);
    }

    return data;
}
@samseaver
Copy link
Contributor

Why is this an issue again? Does it cost more than a few milliseconds of browser time to retrieve the keys?

@nconrad
Copy link
Author

nconrad commented Aug 26, 2015

Because the data is overly complicated and larger than needed. No, it doesn't cost more than a few milliseconds. The user downloads an extra 5kb (139kb uncompressed) when visiting the annotation page, though, and I ship around 10 extra lines of code.

@nconrad
Copy link
Author

nconrad commented Aug 26, 2015

nc$ ls -lh annotation_overview*
-rw-r----- 1 nc staff 343K Aug 26 12:28 annotation_overview
-rw-r--r-- 1 nc staff 204K Aug 26 12:30 annotation_overview_parsed
-rw-r--r-- 1 nc staff 217K Aug 26 13:04 annotation_overview_spaces_removed
nc$ ls -lh gzipped/*
-rw-r----- 1 nc staff 34K Aug 26 13:07 gzipped/annotation_overview.gz
-rw-r--r-- 1 nc staff 29K Aug 26 13:07 gzipped/annotation_overview_parsed.gz
-rw-r--r-- 1 nc staff 29K Aug 26 13:07 gzipped/annotation_overview_spaces_removed.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants