Open CarlosLopezElorduy opened 4 months ago
Hardcoded data
Files implicated: www/data/js/quiz.js www/data/js/gens.js www/data/js/analysis-slider.js
Things that I understand from some testings:
Sample characteristics (type of cancer, age, risk factor 1 and risk factor 2) are truly random. You can find them in quiz.js lines 1-9.
The combination of mutations in each sample, however, is not random and is are hardcoded in gens.js. Each variable (var muta_a_1a_2a_3a... is a concatenation of a list of mutations. Each mutation has 4 different items (gen1, gen2, gen3, gen4; do not misunderstand these as genes!). Each of these items corresponds to a row in the mutations card: gen1 is Gen, gen2 is Canvi a la proteina, gen3 is Mutacio and gen4 is Tractament. You will find in quiz.js how each of the items are turned "active" as you progress through the slides (for example: w3.addClass('.gen2','active');). I don't understand yet where is the info of a mutation being driver (gen3) and the treatment (gen4) encoded. In summary, a given sample is always assigned to the same mutations. There are 27 possible combinations of mutations per cancer type.
Driver mutations are also hardcoded in www/data/js/analysis-slider.js line 31. I think this checks if mutations in each sample are included in the hardcoded list of driver mutations. Then computes which sample has more driver mutations or if they are equal.
Next steps I'd like to work on (wk 13th May): 1) understand how all info is encoded, 2) Review drivers, passengers and treatments, 3) Add more combinations?
Actions:
gens.js
, following the same structure.
Identify how samples are encoded and see which ones are hardcoded and which ones are truly random.