EBISPOT / gwas-ui

Apache License 2.0
5 stars 4 forks source link

Export contents of data tables in new UI #351

Closed ljwh2 closed 1 year ago

ljwh2 commented 1 year ago

As a user, I want to be able to be able to export contents of the data tables (e.g. Studies, Associations, Sumstats) from the new UI pages, as .tsv file (see note). I want to be able to do this from all tables displayed in the UI.

This feature MUST include the ability to export the full (unpaginated) contents of each table.

This feature SHOULD allow users to export filtered table contents as they can see on the screen (e.g. after applying a sort or search option)

Note the old UI export functionality exported .csv files, but since the full Catalog downloads are in .tsv format, for consistency it would be better for the table exports to be tsv as well. But if there is some technical reason why they should be csv, that's fine.

sajo-ebi commented 1 year ago

@ala-ebi the API details for download are as follows -:

EFO Page http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/efotraits//studies/download?includeBgTraits=false&includeChildTraits=true

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/efotraits//associations/download?includeBgTraits=false&includeChildTraits=true

Variant Page http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/variants//studies/download

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/variants//associations/download

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/variants//traits/download

Gene Page http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/genes//studies/download

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/genes//associations/download

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/genes//traits/download

sajo-ebi commented 1 year ago

@ala-ebi

Publications Page http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/publications//studies/download

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/publications//associations/download

Region Page http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/regions//studies/download

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/regions//associations/download

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/regions//traits/download

Studies Page http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/studies//associations/download

Summary Stats Page summaryStatistics

http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/summaryStatistics/studies/download

ljwh2 commented 1 year ago

Tested in Snoopy and found a few issues:

Sumstats tables:

Sumstats download page:

Trait page:

Santhi1901 commented 1 year ago
ljwh2 commented 1 year ago

For exporting child/background traits, I think something has got mixed up, it is exporting the opposite of what is displayed on screen. For example on the page for asthma: http://gwas-snoopy.ebi.ac.uk:9780/gwas/efotraits/MONDO_0004979

When you load the page the options are set to Bkg traits NO child traits YES Displays 3288 assoc Downloads 2655 assoc

Change to Bkg traits YES child traits NO Displays 2655 assoc Downloads 3288 assoc

Change to Bkg traits YES child traits YES Displays 3590 assoc Downloads 3590 assoc (correct)

ala-ebi commented 1 year ago

fixed inverted child/bg filters. added export to ss table

ljwh2 commented 1 year ago

@Santhi1901 could you please confirm the reported issues are fixed?