*/
public SequenceGroup(SequenceGroup seqsel)
{
+ this(seqsel, true);
+ }
+
+ /**
+ * copy constructor
+ *
+ * @param seqsel
+ * @param keepsequences
+ * if false do not add sequences from seqsel to new instance
+ */
+ public SequenceGroup(SequenceGroup seqsel, boolean keepsequences)
+ {
this();
+
if (seqsel != null)
{
sequences = new ArrayList<>();
- sequences.addAll(seqsel.sequences);
+ if (keepsequences)
+ {
+ sequences.addAll(seqsel.sequences);
+ }
if (seqsel.groupName != null)
{
groupName = new String(seqsel.groupName);
ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus;
hmmIgnoreBelowBackground = seqsel.hmmIgnoreBelowBackground;
hmmUseInfoLetterHeight = seqsel.hmmUseInfoLetterHeight;
- if (seqsel.conservationData != null)
+ if (keepsequences && seqsel.conservationData != null)
{
+ // todo avoid doing this if we don't actually want derived calculations
+ // !
recalcConservation(); // safer than
// aaFrequency = (Vector) seqsel.aaFrequency.clone(); // ??
}