legumeinfo / mine-issues

Report ALL issues on LIS mines here! Regardless of which mine you found it on!
2 stars 0 forks source link

GlycineMine genetics searches failing #141

Closed StevenCannon-USDA closed 8 months ago

StevenCannon-USDA commented 8 months ago

The GlycineMine templated "Trait -> GWAS" and "Trait -> GWAS Studies" searches give "No Results" for the example queries.

Tested with GlycineMine v5.1.0.3, 2023-12-13

adf-ncgr commented 8 months ago

Good catch- looks like the identifiers have underscores instead of spaces so the examples ought to be updated to "R8_full_maturity" and "Seed_weight"; @sammyjava I don't think I'm a superuser in Glycinemine anymore, not sure if that would allow me to fix it or if it needs to be done in the config?

sammyjava commented 8 months ago

Ah, yeah, Trait.name is now the thing you want to look for. I updated the templates. (Trait.identifier is now a unique underscored glob with the GWAS/QTLStudy prefix.)

StevenCannon-USDA commented 8 months ago

Thanks for the quick fix. Here's what I'd like to do - and I think I'll need your help, @sammyjava: Find the base URL for the result of a Trait -> GWAS or Trait -> QTL search (though maybe it would need to be handled as the generated javascript code?)

This may be obviated by the immanent trait search component; but we would also like to maintain a page of available traits, and to link from those traits to an intermediate GWAS or QTL report.

adf-ncgr commented 8 months ago

Not sure if this is even close to what you're after Steven, but something like this might be a start?: https://mines.legumeinfo.org/glycinemine/service/query/results?query=%3Cquery+name%3D%22%22+model%3D%22genomic%22+view%3D%22Trait.name+Trait.description+Trait.qtlStudy.primaryIdentifier+Trait.gwas.primaryIdentifier%22+longDescription%3D%22%22+sortOrder%3D%22Trait.name+asc%22%3E%3Cjoin+path%3D%22Trait.gwas%22+style%3D%22OUTER%22%2F%3E%3Cjoin+path%3D%22Trait.qtlStudy%22+style%3D%22OUTER%22%2F%3E%3C%2Fquery%3E

this comes out of using the query builder, then grabbing the "web service URL" and tweaking just a bit (dropping the format=tab so that it doesn't try to download a file, but maybe that wouldn't be needed in the context you envision).

StevenCannon-USDA commented 8 months ago

@adf-ncgr That's useful as a list of all traits; but I am really looking for a link to the intermediate InterMine results page for a given query -- one that lists and links to the relevant studies. It may be that this should really just be handled as a Component; but I thought that a link to a query result at the mines would be a cheap intermediate solution in some cases.

adf-ncgr commented 8 months ago

I see, I thought you wanted to add your own markup around the query results; @sammyjava may well know something I don't, but AFAIK you can't link directly to an Intermine query results page, though you can make a list from the results of a query and link to that. It would be nice to be able to specify URLs for query results pages, though, so hopefully we'll both learn something from @sammyjava here...

StevenCannon-USDA commented 8 months ago

Probably a better solution in this case will be to link to a populated query in the "trait association" search Web Component. For example: https://dev.soybase.org/tools/search/gene.html?page=1&genus=Glycine&species=max&strain=Wm82&identifier=Glyma.13G357700&description=&family=

Why do this at all? Basically because there are so many traits, and it's hard to guess what terms will pan out.

adf-ncgr commented 8 months ago

Yes, the trait search web component probably will do something closer to what you wanted. In theory, you might be able to use the Intermine keyword search restricted to Traits, like this: https://mines.legumeinfo.org/glycinemine/keywordSearchResults.do?searchTerm=*&searchBag=&facet_Category=Trait but for some reason the Trait restriction is causing it to error. https://mines.legumeinfo.org/glycinemine/keywordSearchResults.do?searchTerm=*&searchBag=&facet_Category=GWAS works but isn't really what you want in this instance

sammyjava commented 8 months ago

I see, I thought you wanted to add your own markup around the query results; @sammyjava may well know something I don't, but AFAIK you can't link directly to an Intermine query results page, though you can make a list from the results of a query and link to that. It would be nice to be able to specify URLs for query results pages, though, so hopefully we'll both learn something from @sammyjava here...

A template IS essentially a query results page, just with the constraints presented in form fields. But no, you can't create a URL that takes you directly the results of a path query. You have to use the XML and punch it in on the website, or use the XML in a standalone curl request.

And, as you know, I recommend against using keyword search for anything that matters. It's an extra layer away from the mine and can be problematic.

Bottom line is you can get anything you want about a Trait or a GWAS or a QTL Study with a graphql-server query and that's where we're implementing custom searches. :) But I'm happy to cook a mine template where it makes sense.