From dbcf749edb267e86198d8bc772dbc7be8f4e9f8c Mon Sep 17 00:00:00 2001 From: Vilax Date: Fri, 27 Oct 2023 16:37:54 +0200 Subject: [PATCH] updating --- xmipptomo/protocols/protocol_cltomo.py | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/xmipptomo/protocols/protocol_cltomo.py b/xmipptomo/protocols/protocol_cltomo.py index a86e4b4..37b14b2 100644 --- a/xmipptomo/protocols/protocol_cltomo.py +++ b/xmipptomo/protocols/protocol_cltomo.py @@ -32,6 +32,7 @@ from xmipp3 import Plugin from pwem.protocols import EMProtocol from tomo.protocols import ProtTomoBase +from tomo.objects import SetOfSubTomograms from xmipp3.convert import readSetOfVolumes, readSetOfClassesVol, writeSetOfVolumes @@ -44,29 +45,29 @@ class XmippProtCLTomo(EMProtocol, ProtTomoBase): # --------------------------- DEFINE param functions -------------------------------------------- def _defineParams(self, form): form.addSection(label='General parameters') - form.addParam('inputVolumes', PointerParam, pointerClass="SetOfVolumes", label='Set of volumes', - help="Set of volumes to align") + form.addParam('inputVolumes', PointerParam, pointerClass="SetOfSubTomograms", label='Subtomograms', + help="Set of subtomograms to align") form.addParam('numberOfReferences', IntParam, label='Number of references', default=3, help="How many references are computed at the end of the process") form.addParam('numberOfIterations', IntParam, label='Number of iterations', default=15, expertLevel=LEVEL_ADVANCED, help="How many iterations at each of the Clustering levels") - form.addParam('generateAligned', BooleanParam, default=True, label='Generate aligned subvolumes', + form.addParam('generateAligned', BooleanParam, default=True, label='Generate aligned subtomograms', help="If set to true, it will be created a new set of volumes with all of them aligned") form.addParam('align', BooleanParam, default=True, label="Align", - help="Do not align if volumes are already aligned, only classify") + help="Do not align if subtomograms are already aligned, only classify") form.addSection(label='Initial references') form.addParam('doGenerateInitial', BooleanParam, default=True, label='Generate initial volume', help="Let CLTomo to automatically generate the initial references") form.addParam('numberOfReferences0', IntParam, label='Number of initial references', default=1, condition="doGenerateInitial", - help="How many initial volumes. If set to 1, all subvolumes are aligned to a single reference, " \ + help="How many initial subtomograms. If set to 1, all subtomograms are aligned to a single reference, " \ "and then they are classified") form.addParam('randomizeOrientation', BooleanParam, default=False, label='Randomize orientation', condition="doGenerateInitial", - help="Use this option if all the input volumes have the same missing wedge or if they have not been previously aligned.") - form.addParam('referenceList', PointerParam, pointerClass="SetOfVolumes", label='Set of initial volumes', - condition="not doGenerateInitial", help="Set of initial volumes") + help="Use this option if all the input subtomograms have the same missing wedge or if they have not been previously aligned.") + form.addParam('referenceList', PointerParam, pointerClass="SetOfVolumes", label='Set of initial subtomograms', + condition="not doGenerateInitial", help="Set of initial subtomograms") form.addSection(label='Constraints') form.addParam('symmetry', StringParam, default='c1', label='Symmetry group', @@ -156,9 +157,9 @@ def _summary(self): if self.doGenerateInitial.get(): messages.append('Number of initial references: %d' % self.numberOfReferences0.get()) if self.randomizeOrientation.get(): - messages.append('Input subvolume orientations were randomized') + messages.append('Input subtomograms orientations were randomized') if not self.align: - messages.append('Input subvolumes were assumed to be already aligned') + messages.append('Input subtomograms were assumed to be already aligned') messages.append('Number of output references: %d' % self.numberOfReferences.get()) return messages @@ -166,7 +167,7 @@ def _validate(self): errors = [] (Xdim1, Ydim1, Zdim1) = self.inputVolumes.get().getDimensions() if Xdim1 != Ydim1 or Ydim1 != Zdim1: - errors.append("Input subvolumes are not cubic") + errors.append("Input subtomograms are not cubic") N0 = -1 if not self.doGenerateInitial.get(): if not self.referenceList.hasValue(): @@ -174,9 +175,9 @@ def _validate(self): else: (Xdim2, Ydim2, Zdim2) = self.referenceList.get().getDimensions() if Xdim2 != Ydim2 or Ydim2 != Zdim2: - errors.append("Reference subvolumes are not cubic") + errors.append("Reference subtomograms are not cubic") if Xdim1 != Xdim2: - errors.append("Input and reference subvolumes are of different size") + errors.append("Input and reference subtomograms are of different size") else: N0 = self.numberOfReferences0.get() if N0 > 0 and N0 > self.numberOfReferences.get():