graph-genome / Schematize

Visualization component of Pangenome Schematics for 1,000s of individuals and gigabase genomes.
http://graphgenome.org
Apache License 2.0
10 stars 8 forks source link

Integrate metadata (like provenance) #67

Open joehagmann opened 4 years ago

joehagmann commented 4 years ago

I started a beginner's integration of metadata from a json file for now, and for now present only the provenance as a toggle. This is just to let you know, in case someone started already, or wants to follow up.

I'd suggest following things to do in that order:

image

tiny mock-up metadata file for the B1phi1 dataset (should be placed into public/test_data/run1.B1phi1.i1.seqwish.w100/metadata.json):

[
 {
   "Accession": "1630",
   "Release_Date": "2020-01-13T00:00:00Z",
   "Species": "Severe acute respiratory syndrome-related coronavirus",
   "Length": 29903,
   "Geo_Location": "China",
   "Host": "Homo sapiens",
   "Isolation_Source": "",
   "Collection_Date": "2019-12",
   "GenBank_Title": "Severe acute respiratory syndrome coronavirus 2 isolate Wuhan-Hu-1, complete genome"
 }
]
josiahseaman commented 4 years ago

@superjox I like having some metadata coloring. I'm concerned that if we let your branch sit around it will be too difficult to merge in and you might have to start from scratch. Would you like to propose a minimal feature that we can merge in to master? i67 is now 34 commits behind master. I would be especially happy if this does not require a version change in our core json chunks. Maybe we have separate optional metadata files we bring in. They could be placed in an annotation folder inside of the data source (bin2file.json) folder.

It seems to me that colorings are mutually exclusive. What would you think of adding all annotation options as a new dropdown option inside "Color By:". One option would always be "Color By: Copy Number and Inversion". Metadata files would add to this list.

joehagmann commented 4 years ago

@josiahseaman it works right now that it reads in a separate metadata.json in the dataset folder, if present. I agree with the dropdown menu, this was planned bullet point 4 in the 1st comment above. Adding inversions etc is a good idea. I'll try to work on 1. merging master into the branch and PR this week, and 2. on the dropdown menu in the following week. If someone else has time to do it quicker, please go ahead.

josiahseaman commented 4 years ago

From Andrea: The mock metadata are present only for 3 individuals.

image