import jalview.analysis.AlignmentUtils;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
-import jalview.analysis.TreeModel;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureColourI;
{
Font font;
- TreeModel currentTree = null;
-
boolean cursorMode = false;
boolean antiAlias = false;
showOccupancy = Cache.getDefault(Preferences.SHOW_OCCUPANCY, true);
}
initAutoAnnotation();
+ initInformation();
+
+
String colourProperty = alignment.isNucleotide()
? Preferences.DEFAULT_COLOUR_NUC
: Preferences.DEFAULT_COLOUR_PROT;
}
/**
- * DOCUMENT ME!
- *
- * @param tree
- * DOCUMENT ME!
- */
- public void setCurrentTree(TreeModel tree)
- {
- currentTree = tree;
- }
-
- /**
- * DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
- public TreeModel getCurrentTree()
- {
- return currentTree;
- }
-
- /**
* returns the visible column regions of the alignment
*
* @param selectedRegionOnly
.getStructureSelectionManager(Desktop.instance);
}
+ /**
+ *
+ * @param pdbEntries
+ * @return an array of SequenceI arrays, one for each PDBEntry, listing which
+ * sequences in the alignment hold a reference to it
+ */
+ public SequenceI[][] collateForPDB(PDBEntry[] pdbEntries)
+ {
+ List<SequenceI[]> seqvectors = new ArrayList<>();
+ for (PDBEntry pdb : pdbEntries)
+ {
+ List<SequenceI> choosenSeqs = new ArrayList<>();
+ for (SequenceI sq : alignment.getSequences())
+ {
+ Vector<PDBEntry> pdbRefEntries = sq.getDatasetSequence()
+ .getAllPDBEntries();
+ if (pdbRefEntries == null)
+ {
+ continue;
+ }
+ for (PDBEntry pdbRefEntry : pdbRefEntries)
+ {
+ if (pdbRefEntry.getId().equals(pdb.getId()))
+ {
+ if (pdbRefEntry.getChainCode() != null
+ && pdb.getChainCode() != null)
+ {
+ if (pdbRefEntry.getChainCode().equalsIgnoreCase(
+ pdb.getChainCode()) && !choosenSeqs.contains(sq))
+ {
+ choosenSeqs.add(sq);
+ continue;
+ }
+ }
+ else
+ {
+ if (!choosenSeqs.contains(sq))
+ {
+ choosenSeqs.add(sq);
+ continue;
+ }
+ }
+
+ }
+ }
+ }
+ seqvectors
+ .add(choosenSeqs.toArray(new SequenceI[choosenSeqs.size()]));
+ }
+ return seqvectors.toArray(new SequenceI[seqvectors.size()][]);
+ }
+
@Override
public boolean isNormaliseSequenceLogo()
{
return normaliseSequenceLogo;
}
+
public void setNormaliseSequenceLogo(boolean state)
{
normaliseSequenceLogo = state;
}
+ public void setNormaliseHMMSequenceLogo(boolean state)
+ {
+ normaliseHMMSequenceLogo = state;
+ }
+
/**
*
* @return true if alignment characters should be displayed
return validCharWidth;
}
- private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<String, AutoCalcSetting>();
+ private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<>();
public AutoCalcSetting getCalcIdSettingsFor(String calcId)
{
fr.setTransparency(featureSettings.getTransparency());
}
+ @Override
+ public boolean isNormaliseHMMSequenceLogo()
+ {
+ return normaliseHMMSequenceLogo;
+ }
+
}