deepCopy method
deep copy.
Implementation
NucleotideSequence deepCopy() {
List<Nucleotide> copySeq = [];
for (Nucleotide i in sequence) {
copySeq.add(i.deepCopy());
}
Map<String, NucleotideInfo>? copyNInfo;
if (nucleotideInfo != null) {
copyNInfo = {};
for (String i in nucleotideInfo!.keys) {
copyNInfo[i] = nucleotideInfo![i]!.deepCopy();
}
}
return NucleotideSequence.fromSeq(copySeq,
type: type,
id: id,
direction: direction,
description: description,
info: info != null ? {...info!} : null,
nucleotideInfo: copyNInfo);
}