Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to skip generating colors for a particular attribute? high unique values=very long runtime #7

Open
e-t-k opened this issue Mar 16, 2019 · 1 comment

Comments

@e-t-k
Copy link

e-t-k commented Mar 16, 2019

I added a new attribute to my most recent TumorMap which is an alternate sample ID field that is applicable to most samples. That is to say -- it's categorical rather than continuous but it has a huge quantity of unique values ( 10904 unique values for 11454 samples).

Is there an argument to tell Tumormap "do not generate/display colors for this attribute?" -- None came close except possibly the mysterious --attributeTags, but that didn't appear to have an effect.

I ask because adding this attribute caused Tumormap creation time to run to upwards of 7 hours before I interrupted it (see traceback); in testing, it always appears to be stuck in the color picker. Removing the attribute resulted in complete map generation in 20 minutes.

It would be nice to be able to have this attribute present so users could filter on it, or even to color it as N/A vs (any value).

Thank you!

Traceback (most recent call last):
  File "compute/calc/layout.py", line 1866, in <module>
    sys.exit(main(sys.argv[1:]))
  File "compute/calc/layout.py", line 1864, in main
    makeMapUIfiles(arg_obj, args)
  File "compute/calc/layout.py", line 1308, in makeMapUIfiles
    attrsfile=os.path.join(options.directory,'allAttributes.tab')
  File "/data/data/featureSpace/Treehouse/TreehousePEDv9/compute/calc/process_categoricals.py", line 640, in create_colormaps_file
    newColor =  colorPicker(colors)
  File "/data/data/featureSpace/Treehouse/TreehousePEDv9/compute/calc/process_categoricals.py", line 114, in colorPicker
    distances.append(delta_e_cmc(newcolor,havecolor))
  File "/data/env/lib/python2.7/site-packages/colormath/color_diff.py", line 99, in delta_e_cmc
    color1_vector, color2_matrix, pl=pl, pc=pc)[0]
  File "/data/env/lib/python2.7/site-packages/colormath/color_diff_matrix.py", line 72, in delta_e_cmc
    C_2 = numpy.sqrt(numpy.sum(numpy.power(lab_color_matrix[:, 1:], 2), axis=1))
KeyboardInterrupt
@terraswat
Copy link
Collaborator

There is no way currently to skip generating colors for an attribute, however this is a good enhancement request, so thank you for all the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants