*/
package jalview.analysis;
+import jalview.bin.Cache;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.PDBEntry;
import java.util.Objects;
import java.util.Optional;
import java.util.Vector;
+import static java.lang.String.format;
public class SeqsetUtils
{
sq.setDescription(sqinfo.description.get());
if (sqinfo.dataset.isPresent())
{
- assert sqinfo.features.isEmpty() :
- "Setting dataset sequence for a sequence which has sequence features. " +
- "Dataset sequence features will not be visible.";
+ if (sqinfo.features.isPresent())
+ {
+ Cache.log.warn("Setting dataset sequence for a sequence which has " +
+ "sequence features. Dataset sequence features will not be visible.");
+ assert false;
+ }
sq.setDatasetSequence(sqinfo.dataset.get());
}
if (sqinfo.hmm.isPresent())
{
if (!quiet)
{
- System.err.println("Can't find '" + ((String) key)
- + "' in uniquified alignment");
+ Cache.log.warn(format("Can't find '%s' in uniquified alignment",
+ key));
}
}
} catch (ClassCastException ccastex) {
if (!quiet)
{
- System.err.println("Unexpected object in SeqSet map : "+key.getClass());
+ Cache.log.error("Unexpected object in SeqSet map : "+ key.getClass());
}
}
}
if (unmatched.size() > 0 && !quiet)
{
- System.err.println("Did not find matches for :");
- for (Enumeration<SequenceI> i = unmatched.elements();
- i.hasMoreElements();)
+ StringBuilder sb = new StringBuilder("Did not find match for sequences: ");
+ Enumeration<SequenceI> i = unmatched.elements();
+ sb.append(i.nextElement().getName());
+ for (; i.hasMoreElements();)
{
- System.out.println(((SequenceI) i.nextElement()).getName());
+ sb.append(", " + i.nextElement().getName());
}
+ Cache.log.warn(sb.toString());
return false;
}