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

Searching data on HumanMine (issue #3 required) #8

Closed
AdrianBZG opened this issue May 6, 2018 · 20 comments

Comments

@AdrianBZG
Copy link
Owner

commented May 6, 2018

Searching data on HumanMine (issue #3 required)

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 6, 2018

Potential classes:

  • Gene
  • Protein
@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 9, 2018

Most important attributes: we can assume that the ones given by Summary are the most important ones for each class.

@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 9, 2018

To fetch summary fields using im.js, you just need to create a service, then run fetchSummaryFields() on the service object, like this:

      var service = new imjs.Service({
         root: 'http://www.flymine.org/flymine/service'
     });
      service.fetchSummaryFields().then(function(response) {
        console.log(response)
      });

Working demo: http://jsbin.com/vipujej/edit?html,console

@AdrianBZG

This comment has been minimized.

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 20, 2018

HumanMine - Genes class: makes sense to use the fields Organism name, Gene name, and Gene symbol for the faceted search.

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 20, 2018

HumanMine - Proteins class: makes sense to use the field Organism name for the faceted search. Primary identifier and primary accession seem to be unique, so it doesn't make sense to use them as a filter.

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 20, 2018

@yochannah About my latest two comments to this issue, what do you think? With faceted search I mean, for instance, the boxes at the left that you can see in https://dcc.icgc.org/search.

@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 20, 2018

Hmmm, there isn't any easy way to tell this from the model. For Genes - name and symbol mostly unique, so they probably don't need be sidebar filters. Organism will always be interesting as a filter. I'll ask the team on monday morning if there are any other facets that they think might be interesting!

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 20, 2018

@yochannah Thanks! Also, do you know a way (using IMjs maybe), to query for the number of elements per value on a certain attribute of a class? Basically, what I want is what you can see in the following screenshot:

image

Mus musculus ... X
Homo sapiens ... Y
... and so on

Thanks!

@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 20, 2018

given any single query you can request a count of results like this: https://codepen.io/yochannah/pen/YLBGwa?editors=1012 but I'm not sure if that's what imtables is doing in the screenshot - it might be doing something a little bit smarter that doesn't require multiple http requests. I'll try to have a look when I'm at work tomorrow (pm, probably, since we have a team meeting in the morning) if you can wait 'til then?

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 20, 2018

@yochannah Of course! Thank you very much 😄

@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 21, 2018

I was right! It took some sleuthing, but here you go: https://codepen.io/yochannah/pen/MGLqyY?editors=1010

var service = new imjs.Service({
  root: "https://yeastmine.yeastgenome.org/yeastmine/service"
});
var query = {
  from: "Gene",
  select: ["primaryIdentifier"],
  model: {name : "genomic"}
};

var q = new imjs.Query(query,service);

q.summarize("Gene.homologues.homologue.organism.shortName")
  .then(function(response) {
  console.log(response);
});
@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 21, 2018

it returns something like this:
image

@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 21, 2018

The docs aren't always the most useful, but here is the reference for the summarise method: http://alexkalderimis.github.io/imjs/classes/Query.html#summarise-instance

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 21, 2018

@yochannah Perfect! Thanks 👍

@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 21, 2018

@yochannah One question, if you take a look at the right side bar in http://im-browser-prototype.herokuapp.com/, and click on Organism short names for instance, it displays each organism and the number of instances with that organism (currently is just a placeholder). My main concern is the following:

  • Should this sidebar be used as a filtering option for the table data in the view or maybe, since the im-table already has the filtering options, we can use this sidebar to show top 5 elements (according to counts) ?

Thanks!

@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 22, 2018

Looking good! I think we like top 5 elements for organism, but probably we don't need gene name as a filter on the left.

AdrianBZG added a commit that referenced this issue May 24, 2018
AdrianBZG added a commit that referenced this issue May 25, 2018
@AdrianBZG

This comment has been minimized.

Copy link
Owner Author

commented May 25, 2018

Hi @yochannah , the filter by organism name is working, if you have some time can you please check it and tell me if I can close this issue?

http://im-browser-prototype.herokuapp.com

Thanks!

AdrianBZG added a commit that referenced this issue May 26, 2018
@yochannah

This comment has been minimized.

Copy link
Collaborator

commented May 30, 2018

The way the left filter works is great! it should probably be more integrated with the pie chart though - see #24

AdrianBZG added a commit that referenced this issue Jun 2, 2018
@yochannah

This comment has been minimized.

Copy link
Collaborator

commented Jun 4, 2018

looks good now

@yochannah yochannah closed this Jun 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.