diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index ba46d2139934..8ae36377742a 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -93,6 +93,14 @@ const hasFilter = computed(() => forwardFilter.value || reverseFilter.value); const strategy = ref(autoPairLCS); const duplicatePairNames = ref([]); +const canClearFilters = computed(() => { + return forwardFilter.value || reverseFilter.value; +}); + +const canAutoPair = computed(() => { + return forwardFilter.value && reverseFilter.value && pairableElements.value.length > 0; +}); + const forwardElements = computed(() => { return filterElements(workingElements.value, forwardFilter.value); }); @@ -117,7 +125,11 @@ const autoPairButton = computed(() => { let variant; let icon; let text; - if (!firstAutoPairDone.value && pairableElements.value.length > 0) { + if (!canAutoPair.value) { + variant = "secondary"; + icon = faLink; + text = localize("Specify simple filters to divide datasets into forward and reverse reads for pairing."); + } else if (!firstAutoPairDone.value && pairableElements.value.length > 0) { variant = "primary"; icon = faExclamationCircle; text = localize("Click to auto-pair datasets based on the current filters"); @@ -235,8 +247,11 @@ function initialFiltersSet() { illumina++; } }); - - if (illumina > dot12s && illumina > Rs) { + // if we cannot filter don't set an initial filter and hide all the data + if (illumina == 0 && dot12s == 0 && Rs == 0) { + forwardFilter.value = ""; + reverseFilter.value = ""; + } else if (illumina > dot12s && illumina > Rs) { changeFilters("illumina"); } else if (dot12s > illumina && dot12s > Rs) { changeFilters("dot12s"); @@ -1133,6 +1148,7 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) { @@ -1141,6 +1157,7 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) {