import jalview.analysis.AlignSeq;
import jalview.api.StructureSelectionManagerProvider;
+import jalview.bin.Cache;
import jalview.bin.Console;
import jalview.commands.CommandI;
import jalview.commands.EditCommand;
import jalview.datamodel.SequenceI;
import jalview.ext.jmol.JmolParser;
import jalview.gui.IProgressIndicator;
+import jalview.gui.Preferences;
import jalview.io.AppletFormatAdapter;
import jalview.io.DataSourceType;
import jalview.io.StructureFile;
{
if (mappings.isEmpty())
{
- jalview.bin.Console.errPrintln("reportMapping: No PDB/Sequence mappings.");
+ jalview.bin.Console
+ .errPrintln("reportMapping: No PDB/Sequence mappings.");
}
else
{
int i = 0;
for (StructureMapping sm : mappings)
{
- jalview.bin.Console.errPrintln("mapping " + i++ + " : " + sm.pdbfile);
+ jalview.bin.Console
+ .errPrintln("mapping " + i++ + " : " + sm.pdbfile);
}
}
}
pdbFile, sourceType, tft, paeFilename, true);
}
-
/**
* create sequence structure mappings between each sequence and the given
* pdbFile (retrieved via the given protocol). Either constructs a mapping
* - structure data resource
* @param sourceType
* - how to resolve data from resource
- * @param tft - specify how to interpret the temperature factor column in the atom data
- * @param paeFilename - when not null, specifies a filename containing a matrix formatted in JSON using one of the known PAE formats
- * @param doXferSettings - when true, transfer annotation to mapped sequences in sequenceArray
+ * @param tft
+ * - specify how to interpret the temperature factor column in the
+ * atom data
+ * @param paeFilename
+ * - when not null, specifies a filename containing a matrix
+ * formatted in JSON using one of the known PAE formats
+ * @param doXferSettings
+ * - when true, transfer annotation to mapped sequences in
+ * sequenceArray
* @return null or the structure data parsed as a pdb file
*/
synchronized public StructureFile setMapping(boolean forStructureView,
* @param IProgressIndicator
* reference to UI component that maintains a progress bar for the
* mapping operation
- * @param tft - specify how to interpret the temperature factor column in the atom data
- * @param paeFilename - when not null, specifies a filename containing a matrix formatted in JSON using one of the known PAE formats
- * @param doXferSettings - when true, transfer annotation to mapped sequences in sequenceArray
+ * @param tft
+ * - specify how to interpret the temperature factor column in the
+ * atom data
+ * @param paeFilename
+ * - when not null, specifies a filename containing a matrix
+ * formatted in JSON using one of the known PAE formats
+ * @param doXferSettings
+ * - when true, transfer annotation to mapped sequences in
+ * sequenceArray
* @return null or the structure data parsed as a pdb file
*/
synchronized public StructureFile computeMapping(boolean forStructureView,
return pdbIdFileName;
}
+ public static void doConfigureStructurePrefs(
+ StructureSelectionManager ssm)
+ {
+ doConfigureStructurePrefs(ssm,
+ Cache.getDefault(Preferences.ADD_SS_ANN, true),
+ Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true),
+ Cache.getDefault(Preferences.STRUCT_FROM_PDB, true),
+ Cache.getDefault(Preferences.USE_RNAVIEW, false));
+ }
+
+ public static void doConfigureStructurePrefs(
+ StructureSelectionManager ssm, boolean add_ss_ann,
+ boolean add_tempfact_ann, boolean struct_from_pdb,
+ boolean use_rnaview)
+ {
+ if (add_ss_ann)
+ {
+ ssm.setAddTempFacAnnot(add_tempfact_ann);
+ ssm.setProcessSecondaryStructure(struct_from_pdb);
+ // JAL-3915 - RNAView is no longer an option so this has no effect
+ ssm.setSecStructServices(use_rnaview);
+ }
+ else
+ {
+ ssm.setAddTempFacAnnot(false);
+ ssm.setProcessSecondaryStructure(false);
+ ssm.setSecStructServices(false);
+ }
+ }
+
}