You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The range (min, max) is computed multiple times. It should be computed only once. One of the following conditions also seems redundant: (r[1] == 0) && (r[2] == 0)), as min == max.
Also, inserting a space between "#" and the comments greatly increases readability.
### Helper functions for the analysis
# MIN-MAX normalisation based on the input array
MINMAX_normalisation_func = function(array) {
# input = numeric array;
# returns normalised array values;
# check for cases where all B-factor values are 0;
r = range(array);
if((r[2] - r[1] == 0) && (r[1] == 0) && (r[2] == 0)) { return (0); }
return ((array - r[1]) / (r[2] - r[1]));
}
The text was updated successfully, but these errors were encountered:
Helper function MINMAX_normalisation_func
The range (min, max) is computed multiple times. It should be computed only once. One of the following conditions also seems redundant: (r[1] == 0) && (r[2] == 0)), as min == max.
Also, inserting a space between "#" and the comments greatly increases readability.
The text was updated successfully, but these errors were encountered: