<commit_before>package com.biomatters.plugins.barcoding.validator.validation;

import com.biomatters.geneious.publicapi.documents.XMLSerializationException;
import org.jdom.Element;

import java.util.Arrays;

/**
 * @author <NAME>
 * Created by frank on 2/10/14.
 */
public class BarcodeConsensusValidationOptions extends ValidationOptions {

    private static final String IDENTIFIER  = "BarcodeConsensusValidationOptions";
    private static final String LABEL       = "FASTA check";
    private static final String DESCRIPTION = "Validates the provided barcode sequence (FASTA) against the consensus " +
                                                "generated by the barcode validator.";
    private static final String MATCHES       = "matches";

    @SuppressWarnings("UnusedDeclaration")
    public BarcodeConsensusValidationOptions(Element element) throws XMLSerializationException {
        super(element);
    }

    public BarcodeConsensusValidationOptions(Class cls) {
        super(cls);
        OptionValue exactValue = new OptionValue("100", "an exact match");
        OptionValue ninetyPercentValue = new OptionValue("90", "90% similar");
        OptionValue sevenPercentValue = new OptionValue("75", "75% similar");
        OptionValue fivePercentValue = new OptionValue("50", "50% similar");
        addComboBoxOption(MATCHES, "FASTA and barcode are:",
                Arrays.asList(exactValue, ninetyPercentValue, sevenPercentValue, fivePercentValue), ninetyPercentValue);
    }

    @Override
    public String getIdentifier() {
        return IDENTIFIER;
    }

    @Override
    public String getLabel() {
        return LABEL;
    }

    @Override
    public String getDescription() {
        return DESCRIPTION;
    }

    @Override
    public String getGroup() {
        return BARCODE_VALIDATION_GROUP;
    }

    public float getMatches() {
        String selected = getValueAsString(MATCHES);
        return Float.parseFloat(selected);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Matches : \t").append(getMatches()).append("%\n");
        return sb.toString();
    }
}<commit_msg>BV-39 - Pass / Fail link for Trace Validation header should select traces not barcodes -Fix compilation error<commit_after>package com.biomatters.plugins.barcoding.validator.validation;

import com.biomatters.geneious.publicapi.documents.XMLSerializationException;
import org.jdom.Element;

import java.util.Arrays;

/**
 * @author <NAME>
 * Created by frank on 2/10/14.
 */
public class BarcodeConsensusValidationOptions extends ValidationOptions {

    private static final String IDENTIFIER  = "BarcodeConsensusValidationOptions";
    private static final String LABEL       = "FASTA check";
    private static final String DESCRIPTION = "Validates the provided barcode sequence (FASTA) against the consensus " +
                                                "generated by the barcode validator.";
    private static final String MATCHES       = "matches";

    @SuppressWarnings("UnusedDeclaration")
    public BarcodeConsensusValidationOptions(Element element) throws XMLSerializationException {
        super(element);
    }

    public BarcodeConsensusValidationOptions(Class cls) {
        super(cls);
        OptionValue exactValue = new OptionValue("100", "an exact match");
        OptionValue ninetyPercentValue = new OptionValue("90", "90% similar");
        OptionValue sevenPercentValue = new OptionValue("75", "75% similar");
        OptionValue fivePercentValue = new OptionValue("50", "50% similar");
        addComboBoxOption(MATCHES, "FASTA and barcode are:",
                Arrays.asList(exactValue, ninetyPercentValue, sevenPercentValue, fivePercentValue), ninetyPercentValue);
    }

    @Override
    public String getIdentifier() {
        return IDENTIFIER;
    }

    @Override
    public String getLabel() {
        return LABEL;
    }

    @Override
    public String getDescription() {
        return DESCRIPTION;
    }

    @Override
    public ValidationGroup getGroup() {
        return ValidationGroup.BARCODE_VALIDATION_GROUP;
    }

    public float getMatches() {
        String selected = getValueAsString(MATCHES);
        return Float.parseFloat(selected);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Matches : \t").append(getMatches()).append("%\n");
        return sb.toString();
    }
}
{'fraction_non_alphanumeric': 0.090140218117071, 'fraction_numerical': 0.009347874471399956, 'mean_word_length': 3.1191567369385886, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3146871', 'n_tokens_mistral': 1215, 'n_tokens_neox': 1141, 'n_words': 311}