Quantcast

Documentation Center

  • Trial Software
  • Product Updates

setReference

Class: BioMap

Set name of reference sequence for BioMap object

Syntax

NewObj = setReference(BioObj, Reference)

Description

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.

Tips

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

Input Arguments

BioObj

Object of the BioMap class.

Reference

String specifying the name of the reference sequence.

Output Arguments

NewObj

Object of the BioMap class.

Examples

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);

Alternatives

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.

See Also

|

How To

Related Links

Was this topic helpful?