Class: BioMap

Set name of reference sequence for BioMap object


NewObj = setReference(BioObj, Reference)


NewObj = setReference(BioObj, Reference) returns NewObj, a new BioMap object, constructed from BioObj, an existing BioMap object, with the Reference property set to Reference, a string specifying the name of the reference sequence.


Rename the reference sequence of an existing BioMap object, by using the same object as the input BioObj and the output NewObj.

Input Arguments


Object of the BioMap class.


String specifying the name of the reference sequence.

Output Arguments


Object of the BioMap class.


Construct a BioMap object, and then set the reference sequence to a new sequence:

% Construct a BioMap object from a SAM file 
BMObj1 = BioMap('ex1.sam');
% Create a random reference sequence
newRefSeq = randseq(50);
% Set the Reference property of the object
BMObj1 = setReference(BMObj1, newRefSeq);


An alternative to using the setReference method to update an existing object is to use dot indexing with the Reference property:

BioObj.Reference = NewReference

In the previous syntax, NewReference is a string of single-letter codes specifying a reference sequence.

Was this topic helpful?