antigenomics / vdjdb-server

[MOVED/DEPRECATED] See vdjdb-web repository for latest version
https://github.com/antigenomics/vdjdb-web
2 stars 0 forks source link

Implement summary statistics #18

Open mikessh opened 8 years ago

mikessh commented 8 years ago

Starburst charts

To generate the summary one should call

ClonotypeSearchSummary.createForStarburst(Map<Clonotype, List<ClonotypeSearchResult>> searchResults, Sample sample)

Now we have 3 charts possible:

  1. For column names from ClonotypeSearchSummary.FIELDS_AG
  2. For column names from ClonotypeSearchSummary.FIELDS_MHC_A
  3. For column names from ClonotypeSearchSummary.FIELDS_MHC_B

Counters are stored in

final Map<String, Map<String, ClonotypeCounter>> columnSequenceCounters

Access is the following e.g. for FIELDS_AG = ["antigen.species", "antigen.gene"]:

columnSequenceCounters.getAt("antigen.species") will list species->counter (first circle of starburst), e.g. "HIV"->1

For the second circle we access columnSequenceCounters.getAt("antigen.species\tantigen.gene") that will list "HIV\tgag"->1 and "HIV\tpol"->2 counts for both genes of HIV in database.

If there is a specific JSON format for starburst I can simplify the access.


Each counter has unique, reads and frequency counts. Maybe we can make a switch to re-draw the chart under each of those options


There is also a ClonotypeSearchSummary.totalCounter (total) and ClonotypeSearchSummary.notFoundCounter (not annotated) that can be shown as bars for unique, reads and frequency at the same time.