Skip to content

NaN values in Score in Peptide mode toggels curve off in dashboard #52

Description

@FloBay

Add an OR NaN ==> True, here to make the dashboard more robust:

// Function to compute the product of p1 and p2
function is_within_limits(value, limit) {
return (value >= limit[0]) && (value <= limit[1]);
}
// Select data to show
if (reg_filter > 0){
// Deep copy required as it would otherwise overwrite the original values and only work once
for(var i = 0; i < n_rows; i++){
pEC50_mask = is_within_limits(pEC50s[i], pec50_limit);
signal_mask = is_within_limits(Signals[i], signal_limit);
score_mask = is_within_limits(Scores[i], score_limit);
toggle_value = (significant_indicator[i] == reg_filter) && pEC50_mask && signal_mask && score_mask;
view.filters[0].booleans[i] = toggle_value;
};
} else {
for(var i = 0; i < n_rows; i++){
pEC50_mask = is_within_limits(pEC50s[i], pec50_limit);
signal_mask = is_within_limits(Signals[i], signal_limit);
score_mask = is_within_limits(Scores[i], score_limit);
toggle_value = pEC50_mask && signal_mask && score_mask;
view.filters[0].booleans[i] = toggle_value;
};
};

Alternatively, could you make an extra toggle or overwrite np.nan with a constant value?

Could you add a user warning that NaN values exist in a filterable column (As this is not expected)? Likely, users are unaware of their own NaNs.

For more information, look at the Internal BUG-list: NK_not_curve_difference_v1&2

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions