web4bio / webgen

WebGen Vertically Integrated Project
https://web4bio.github.io/webgen/main/html/
11 stars 26 forks source link

Fix "Number of samples" label #326

Closed enemeth19 closed 2 years ago

enemeth19 commented 3 years ago

Previously, there was a sorting issue resulting in mismatched cohort and counts in label when tumor types were not selected by user in alphabetical order. See linked issue for example screenshots. This is now resolved.

kaczmarj commented 3 years ago

@enemeth19 - there is a merge conflict because of https://github.com/web4bio/webgen/pull/329. it might be easier to create a new branch from current development, make the changes, and create a new pr.

the changes look good to me. just one minor suggestion. you can replace

if (order.indexOf(A) > order.indexOf(B)) {
  return 1;
} else {
  return -1;
}

with this

order.indexOf(A) > order.indexOf(B) ? 1 : -1
adit-anand commented 2 years ago

The wrong variable was being used when concatenating a tumor name with the number of samples. This has been updated to display the correct tumor type next to each sample count.