soedinglab / BaMM_webserver

Webserver for motif discovery with higher-order Bayesian Markov Models (BaMMs)
https://bammmotif.mpibpc.mpg.de
GNU Affero General Public License v3.0
4 stars 2 forks source link

seeding workflow errors, when not at least one enriched motif found #49

Closed croth1 closed 6 years ago

croth1 commented 6 years ago

When, not a single motif is found, the peng workflow errors instead of showing a message to the user.

filterPWM.py currently expects at least one motif.

Traceback (most recent call last):
  File "/ext/filterPWMs/filterPWM.py", line 167, in <module>
    main()
  File "/ext/filterPWMs/filterPWM.py", line 57, in main
    new_models = filter_pwms(models, min_overlap)
  File "/ext/filterPWMs/utils.py", line 179, in filter_pwms
    af = AffinityPropagation(affinity='precomputed').fit(matrix_sim)
  File "/usr/local/lib/python3.5/site-packages/sklearn/cluster/affinity_propagation_.py", line 294, in fit
    X = check_array(X, accept_sparse='csr')
  File "/usr/local/lib/python3.5/site-packages/sklearn/utils/validation.py", line 462, in check_array
    context))
ValueError: Found array with 0 sample(s) (shape=(0, 0)) while a minimum of 1 is required.
croth1 commented 6 years ago

should be patched by #51