Skip to content

Commit

Permalink
Bugfix: Web: Default Cutoffs Check had error:
Browse files Browse the repository at this point in the history
This does not appear to affect search results but may affect PSM counts
if the PSM count at defaults was used when it shouldn't have been.
In DefaultCutoffsExactlyMatchAnnTypeDataToSearchData:
If all ann types with default values match the values user provided but
there were other cutoffs,
this code returned true when it should have returned false.
Now Fixed.
  • Loading branch information
danjasuw committed Oct 24, 2018
1 parent aff5b66 commit af4778c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,14 @@ private boolean processPeptideOrPSM(
}
// Process the cutoffs, ensure that ALL are default and all default in Annotation types is in the cutoffs
for ( SearcherCutoffValuesAnnotationLevel searcherCutoffValuesAnnotationLevel : cutoffValuesList ) {
Integer annotationTypeId_In_searcherCutoffValuesAnnotationLevel = searcherCutoffValuesAnnotationLevel.getAnnotationTypeId();
// Safe to do .remove(...) since this is a copy Map
AnnotationTypeDTO annotationTypeDTOWithDefaultValue = filterableAnnotationTypesWithDefaultValues.remove( searcherCutoffValuesAnnotationLevel.getAnnotationTypeId() );
if ( annotationTypeDTOWithDefaultValue != null ) { // Have ann type with default so make comparison
AnnotationTypeDTO annotationTypeDTOWithDefaultValue = filterableAnnotationTypesWithDefaultValues.remove( annotationTypeId_In_searcherCutoffValuesAnnotationLevel );
if ( annotationTypeDTOWithDefaultValue == null ) {
// Cutoff is not in default list so return false;
// return false; // EARLY EXIT
} else {
// Have ann type with default so make comparison
if ( annotationTypeDTOWithDefaultValue.getAnnotationTypeFilterableDTO().getDefaultFilterValueAtDatabaseLoad() == null ) {
// Found a default ann type and the default value on database load is null so cannot match user input cutoff
// (This property being null at this point is not normal database value)
Expand Down

0 comments on commit af4778c

Please sign in to comment.