pombase / website

PomBase website v2
MIT License
6 stars 1 forks source link

Constrain phenotypes by multiple conditions #1462

Closed kimrutherford closed 7 months ago

kimrutherford commented 4 years ago

Now #56 is done do we want to be able to constrain by multiple phenotype conditions?

kimrutherford commented 4 years ago

The server side code supports this so to implement this we just need to decide what the user interface should look like.

ValWood commented 2 years ago

Could this look like Canto Condition selection?

Screenshot 2021-12-30 at 16 35 37
ValWood commented 2 years ago

See also https://github.com/pombase/website/issues/1463 for alleles that do not have a particular condition.

kimrutherford commented 2 years ago

Could this look like Canto Condition selection?

I wasn't able to implement that in the same way as Canto, but I've done something similar. It's all working, but I won't deploy the change until we've all had a chance to test it and discuss it. We might need help text and a documentation update.

image

kimrutherford commented 2 years ago

Is this on dev? I don't see it looking like this.

It was tricky to enable just for the dev site so it's only available on my desktop at the moment: https://desktop.kmr.nz

kimrutherford commented 1 year ago

I think this change is ready to go. I've done some more testing and it all seems OK.

It's running on my desktop if you'd like to give it a try: https://desktop.kmr.nz/

ValWood commented 1 year ago

I couldn't test because the phenotype search box doesn't appear to be working?

kimrutherford commented 1 year ago

Sorry, I was working on something else. It should be OK now.

kimrutherford commented 1 year ago

I think this change is ready to go. I've done some more testing and it all seems OK.

I decided that the easiest plan is to release the change to the dev server: http://dev.pombase.kmr.nz/query

If it's all OK, I'll update the main site.

ValWood commented 1 year ago

All seems to be working fine.

It feels a bit strange that excluded conditions display differently :

Screenshot 2022-11-28 at 07 03 53
kimrutherford commented 1 year ago

The excluded conditions are dev-site only because they aren't working properly. It's still using the old system.

ValWood commented 1 year ago

OK! I was on dev. So you still need to make the excluded conditions behave like the present conditions? Also we need different headers , they are all constraints:

Constrain conditions Present Excluded ?

kimrutherford commented 1 year ago

So you still need to make the excluded conditions behave like the present conditions?

Yep.

I'd like to have a chat on Zoom about excluding conditions to make sure it's useful before implementing it.

ValWood commented 12 months ago

It might also be useful to constrain on allele type (i.e. deletion) so that you can retrieve all annotations to a phenotype without, for example over-expression.

kimrutherford commented 10 months ago

The remaining question is how things should work if multiple conditions are excluded. For example if you exclude "high temperature" and "+ NaCl" should that filter out an annotation with just "high temperature" as a condition? Or should it only filter out annotations with both "high temperature" and "+ NaCl" as conditions?

But maybe I'm overthinking this. :-)

ValWood commented 10 months ago

I think it should be both, but let's chat about it

ValWood commented 8 months ago

I just tried and I don't thin the advances search is working on your desktop (tried FYPO and GO)

kimrutherford commented 8 months ago

I just tried and I don't thin the advances search is working on your desktop (tried FYPO and GO)

If you need to test the excludes constraints, the dev site is a better bet.

kimrutherford commented 8 months ago

For Kim:

ValWood commented 8 months ago

Proposed documentation:

The “Constrain condition” option restricts the results to include only genes that have phenotype annotations including the specified condition. The search uses the same condition descriptors as Canto and the PomBase web pages. Start typing, then choose from the autocomplete options.

Note that the results will include any gene with phenotype annotations for the phenotype of interest, including the specified condition, for any allele. Queries that include conditions can be combined using the AND, NOT, or OR operators like any other, but the result of any combination of phenotype queries will likely include annotations for different alleles. There may not be any individual annotation in which both/all of multiple conditions co-occur.

Use case: Query FYPO phenotype (FYPO:0000001) (i.e. any phenotype) and condition + phloxine B" to retrieve all genes with a phenotype assay using phloxine B as a condition.

Use case: Query FYPO inviable vegetative cell population(FYPO:0002061) + high temperature (FYECO:0000004) to retrieve all genes inviable at high temperature (the subtract all "viable vegetative cell population/FYPO:0002060 standard temperature (FYECO:0000005). If you want to restrict this output to likely temperature-sensitive alleles you could make a new query for all "viable vegetative cell population" (FYPO:0002060) standard temperature (FYECO:0000005), and subtract this query from the previous query.

Note that for many sensitivity phenotype, you do not need to constrain on condition, because the terms are precomposed i.e. FYPO:0000089 sensitive to methyl methanesulfonate and in these cases the condition may not always be explicitly curated.

The “Exclude condition” option restricts the results to exclude any gene with phenotype annotations to the phenotype term of interest including the specified condition, for any allele, but only where they are not present with another condition. This means, for example, if you exclude "high temperature" for a specific phenotype, the gene will remain in your output list if it has another annotation to the same term without a recorded condition, or "standard temperature". Start typing, then choose from the autocomplete options.

Warning: Condition constraint and exclusion should be used with caution, and will be more successful for non-standard conditions like "high temperature" and "low temperature" "low glucose" because standard conditions and media are not always explicitly recorded.

PLEASE CHECK CAREFULLY THAT I GOT IT!

kimrutherford commented 8 months ago
  • disable constraining on multiple conditions
  • enable exclude constraints

Done.

kimrutherford commented 8 months ago

Thanks!

The “Exclude condition” option restricts the results to exclude any gene with phenotype annotations to the phenotype term of interest including the specified condition, for any allele, but only where they are not present with another condition.

I think we should re-word this slightly to be clear that we exclude annotations not genes.

How's this: The “Exclude condition” option excludes from the results any annotations to the phenotype term of interest that include the specified condition

for any allele, but only where they are not present with another condition.

I don't understand that bit.

ValWood commented 8 months ago

Let's refine tomorrow...

ValWood commented 8 months ago

The “Exclude condition” option excludes from the results any annotations to the phenotype term of interest that include the specified condition (note: annotations to the same gene with a different condition, or no condition specified, will retained in the gene result list).

kimrutherford commented 8 months ago

The docs now have the changes we discussed on Zoom.

kimrutherford commented 7 months ago

I think this is done?

ValWood commented 7 months ago

Yep, one small suggestion. Would it be possible to have a "I" icon right next to the "contain condition" option linking to the appropriate place in the docs, since its a bit complicated?

kimrutherford commented 7 months ago

Would it be possible to have a "I" icon right next to the "contain condition" option linking to the appropriate place in the docs, since its a bit complicated?

Good plan. I've made that change to the code. The main site will be updated in 30 minutes or so.

kimrutherford commented 7 months ago

Good plan. I've made that change to the code. The main site will be updated in 30 minutes or so.

Done.