set

Class: BioRead

Set property of object

Syntax

NewObj = set(BioObj, 'PropertyName', PropertyValue)
NewObj = set(BioObj, 'Property1Name', Property1Value, 'Property2Name', Property2Value, ...)
set(BioObj, 'PropertyName')
PossVal = set(BioObj, 'PropertyName')
set(BioObj)
PropNameVal = set(BioObj)

Description

NewObj = set(BioObj, 'PropertyName', PropertyValue) returns NewObj, a new object that is a copy of BioObj, but with the specified property set to the specified value. set accepts a comma-separated property name/value pair for the BioRead or BioMap class. Specify PropertyName inside single quotes.

NewObj = set(BioObj, 'Property1Name', Property1Value, 'Property2Name', Property2Value, ...) sets multiple property values of a BioRead or BioMap object in a single statement.

set(BioObj, 'PropertyName') displays all possible values for the specified property of BioObj, a BioRead or BioMap object.

PossVal = set(BioObj, 'PropertyName') returns PossVal, a cell array containing all possible values for the specified property of BioObj, a BioRead or BioMap object. PossVal is a cell array of one or more strings or, if the property does not have a finite set of possible values, an empty cell array.

set(BioObj) displays all properties and their possible values for BioObj, a BioRead or BioMap object.

PropNameVal = set(BioObj) returns PropNameVal, a structure containing all properties and their possible values for BioObj, an object. PropNameVal is a structure whose field names are the property names, and whose values are cell arrays of one or more possible property values.

Tips

Use the set method to determine the property names and possible values before setting the properties with the set method or specific set methods such as setHeader, setSequence, and setQuality. Some of these specific set methods let you set all or a subset of a property.

Input Arguments

BioObj

Object of the BioRead or BioMap class.

    Note:   If BioObj was constructed from a BioIndexedFile object, you cannot set its properties (except for the Name and Reference properties).

PropertyName

Name of a property of the class.

PropertyValue

Value of a property of the class.

Output Arguments

NewObj

Object of the BioRead or BioMap class.

PossVal

Cell array containing all possible values for a specified property of BioObj. The cell array contains one or more strings or, if the property does not have a finite set of possible values, it is an empty cell array.

PropNameVal

Structure containing all properties and their possible values for BioObj. The structure has field names that are the property names, and whose values are cell arrays of one or more possible property values.

Examples

Construct a BioRead object and set the Name property:

% Construct a BioRead object from a FASTQ file 
BRObj = BioRead('SRR005164_1_50.fastq');
% Set the Name property of the object
BRObj = set (BRObj, 'Name', 'MyObject')
BRObj = 

  BioRead with properties:

     Quality: [50x1 File indexed property]
    Sequence: [50x1 File indexed property]
      Header: [50x1 File indexed property]
       NSeqs: 50
        Name: 'MyObject'
Was this topic helpful?