classdef SeqSplitOptions < bioinfo.internal.FunctionOptions

    
    properties
        %MAXMISMATCHES specifies the maximum number of mismatches allowed
        %   during barcode matching. MAXMISMATCHES is a non-negative
        %   integer. Default is 0, i.e., exact matching is performed.
        MaxMismatches(1,1) double {mustBeNonnegative} = 0;
        
        %BARCODEFORMAT specifies the type of barcode to match. Valid
        %   choices are: 3 (corresponding to a barcode located at the 3'
        %   end of each sequence) or 5 (corresponding to a barcode located
        %   at the 5' end of each sequence). Default is 5.
        BarcodeFormat(1,1) double {mustBeNonnegative, mustBeMember(BarcodeFormat, [3, 5])} = 5;
        
        %REMOVEBARCODE specifies whether to clip off the barcode and
        %   corresponding quality information from the matched sequences.
        %   Default is true.
        RemoveBarcode(1,1) logical = true;
        
        %WRITEUNMATCHED specifies whether sequence data that does not match
        %   any barcode unambiguously is saved in the corresponding
        %   unmatched output file or not. Default is false.
        WriteUnmatched(1,1) logical = false;
        
        %OUTPUTSUFFIX specifies the suffix to use in the output file
        %   name(s) before the barcode ID and the file extension FASTQ.
        %   OUTPUTSUFFIX is an ASCII string scalar. Default is "_split".
        OutputSuffix(1,1) string = "_split";
    end
    
    methods
        function obj = SeqSplitOptions(modOptions)
            % SEQSPLITOPTIONS create a bioinfo.pipeline.options.SeqSplitOptions object.
            % 
            %  s = SEQSPLITOPTIONS creates a SEQSPLITOPTIONS object
            %  with default property values.
            %
            %  s = SEQSPLITOPTIONS(..., 'PropertyName', Value) specifies
            %  optional name-value arguments to set the object properties.
            %  To see the list of object properties, enter the following:
            %  help bioinfo.pipeline.options.SeqSplitOptions.
            %
            %  Examples:
            %
            %  % Create the object with default values.
            %  import bioinfo.pipeline.options.SeqSplitOptions
            %  s = SeqSplitOptions;
            %
            %  % Create the object with name-value arguments.
            %  s = SeqSplitOptions("MaxMismatches", 10, "WriteUnmatched", true)
            %
            % See also seqsplit, bioinfo.pipeline.blocks.SeqSplit, bioinfo.pipeline.options.SeqTrimOptions
            
            % All other construction is done in the base class
            
            arguments
                modOptions.?bioinfo.pipeline.options.SeqSplitOptions
            end
            
            obj@bioinfo.internal.FunctionOptions(modOptions);
        end
    end
end
% Copyright 2021 The MathWorks, Inc.

