This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


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 character vector 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.


Character vector 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 character vector of single-letter codes specifying a reference sequence.

Was this topic helpful?