Set the ancestral object of a Sequence object.
# S3 method for Sequence
setAncestral(this, value, ...)
A Sequence object.
A Sequence or a Process object.
Not used.
The new ancestral object (invisible).
For more information see Sequence
.
# NOT RUN {
# create a nucleotide sequence and a process object
s<-NucleotideSequence(string="AGCT")
p<-Process(name="MyProcess")
# set the p as the ancestral of s
setAncestral(s,p)
s$ancestral
# clone s
cs<-clone(s)
# set cs as ancestral of s via virtual field
s$ancestral<-cs
# get ancestral ids
s$ancestral$id
cs$ancestral$id
# }
Run the code above in your browser using DataLab