Skip to content

Commit

Permalink
Merge pull request #194 from I2PC/release-3.24.06
Browse files Browse the repository at this point in the history
Release 3.24.06
  • Loading branch information
albertmena authored Jun 12, 2024
2 parents 8f983c5 + 9862666 commit 75e8d46
Show file tree
Hide file tree
Showing 26 changed files with 575 additions and 654 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/buildPlugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,29 @@ jobs:
build:
# Specify the machine to run the job on
runs-on: ubuntu-22.04


# Avoid send statistics
env:
SEND_INSTALLATION_STATISTICS: "False"

# Define the steps to be taken in the job
steps:
# Installing dependencies
steps:
- name: Free Disk Space (Ubuntu only)
uses: jlumbroso/free-disk-space@main

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfftw3-dev libopenmpi-dev openmpi-bin libhdf5-dev python3-numpy python3-dev libtiff5-dev unzip libsqlite3-dev default-jdk git cmake libopencv-dev libopenmpi-dev make cmake
# Installing CUDA
- name: Install CUDA
uses: Jimver/cuda-toolkit@v0.2.11
uses: Jimver/cuda-toolkit@master
id: cuda-toolkit
with:
cuda: '11.8.0'
method: network
sub-packages: '["nvcc", "toolkit"]'

# Installing Miniconda
- name: Install Miniconda
working-directory: ${{ github.workspace }}/../
run: |
Expand All @@ -38,7 +42,6 @@ jobs:
source ./miniconda/etc/profile.d/conda.sh
conda update -n base -c defaults conda -y
# Installing Scipion
- name: Install Scipion
working-directory: ${{ github.workspace }}/../
run: |
Expand All @@ -53,7 +56,6 @@ jobs:
conda activate scipion3
pip install scons
# Cloning Xmipp
- name: Cloning Xmipp
working-directory: ${{ github.workspace }}/../
run: git clone https://github.com/I2PC/xmipp.git
Expand Down Expand Up @@ -98,13 +100,20 @@ jobs:

# Check out the repository in the pull request
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@main
with:
ref: ${{ github.head_ref }}

# Install plugin from the pull request using the Scipion3 installp command

- name: Install plugin from pull request
working-directory: ${{ github.workspace }}
run: ../scipion/scipion3 installp -p . --devel

# Currently, test script is being downloaded from scipion-chem, but that should be temporary
# Ideally, the script might be included in scipion core to be able to import it,
# or maybe host it in a separate repository common with useful scripts for all scipion plugins
- name: Run tests
working-directory: ${{ github.workspace }}/${{ vars.FOLDER_WITH_VERSION }}
run: |
# Install the repository from the pull request
../scipion/scipion3 installp -p . --devel
wget https://raw.githubusercontent.com/scipion-chem/scipion-chem/devel/pwchem/runTests.py
eval "$(${{ github.workspace }}/../miniconda/bin/conda shell.bash hook)"
python runTests.py ${{ github.workspace }}/../scipion/scipion3 ${{ vars.FOLDER_WITH_VERSION }} -noGPU -testData=testData.json -j=3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.pydevproject
.classpath
.idea
.vscode

#### Python
build/
Expand Down
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## V3.24.06
- New protocols:
- apply_segmentation: Applies a segmentation to a set of tomograms.
- segment_morphology: Segments a tomogram by means of thresholding, different kind of filters and morphological operations.
- Protocols updated
- deep_misalignment: updated model, minor improvements
- extract_subtomos: improve extract subtomos readability
- Protocols fixed
- dose_filter: Dose filter, removing extract stacks
- More xmippTomo
- New xmippBase repository to manage shared protocols with Xmipp
- protocols deprecated: score_transform, denoising_confidence
- Removed tilt particles object (not used)

## V3.23.11
- Protocols updated
- applyAlignmentTS
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
scipion-em-xmipp
scipion-em-tomo
scipion-em >= 3.0.8
scipion-em >= 3.0.8
scipion-em-xmippBase
2 changes: 1 addition & 1 deletion xmipptomo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

_logo = "xmipp_logo.png"
_references = ['delaRosaTrevin2013', 'Jimenez2022']
__version__ = "3.23.11.0" #X.YY.MM.sv
__version__ = "3.24.06.0" #X.YY.MM.sv
# X.Y.M = version of the xmipp release associated.
# sv = Set this to ".0" on each xmipp release.
# For not release version (hotfix) increase it --> ".1", ".2", ...
Expand Down
71 changes: 71 additions & 0 deletions xmipptomo/legacy/tests/test_protocol_score_transform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# **************************************************************************
# *
# * Authors: Federico P. de Isidro-Gomez
# *
# * [1] Centro Nacional de Biotecnologia, CSIC, Spain
# *
# * This program is free software; you can redistribute it and/or modify
# * it under the terms of the GNU General Public License as published by
# * the Free Software Foundation; either version 2 of the License, or
# * (at your option) any later version.
# *
# * This program is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# * GNU General Public License for more details.
# *
# * You should have received a copy of the GNU General Public License
# * along with this program; if not, write to the Free Software
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# * 02111-1307 USA
# *
# * All comments concerning this program package may be sent to the
# * e-mail address 'scipion@cnb.csic.es'
# *
# **************************************************************************
import numpy as np
from pyworkflow.tests import BaseTest, setupTestProject
from tomo.tests import DataSet

from xmipptomo.protocols import XmippProtScoreTransform
from tomo.protocols import ProtImportSubTomograms

class TestXmippTomoScoreTransform(BaseTest):
"""This class check if the protocol score_transform works properly."""

@classmethod
def setUpClass(cls):
setupTestProject(cls)
cls.dataset = DataSet.getDataSet('tomo-em')
cls.setOfSubtomograms = cls.dataset.getFile('basename.hdf')

def _runImportSubtomos(self, label):
protImport = self.newProtocol(ProtImportSubTomograms,
filesPath=self.setOfSubtomograms,
samplingRate=5,
label=label)
self.launchProtocol(protImport)
self.assertIsNotNone(protImport.outputSubTomograms,
"There was a problem with import subtomograms output")
return protImport.outputSubTomograms

def _scoreTransformations(self, firstSubtomos, secondSubtomos):
scoredTr = self.newProtocol(XmippProtScoreTransform,
firstSubtomos=firstSubtomos,
secondSubtomos=secondSubtomos,
label='Score Subtomogram Transformations')
self.launchProtocol(scoredTr)
self.assertIsNotNone(scoredTr.outputSetOfSubtomogram,
"There was a problem with score subtomograms output")
return scoredTr.outputSetOfSubtomogram

def test_scoreTransformations(self):
firstSubtomos = self._runImportSubtomos('First Subtomograms')
secondSubtomos = self._runImportSubtomos('Second Subtomograms')
scoredSubtomos = self._scoreTransformations(firstSubtomos, secondSubtomos)
self.assertTrue(scoredSubtomos.getSize() == 4)
dist = scoredSubtomos.aggregate(["MAX"], "distanceScore", ["distanceScore"])
dist = np.asarray([d["distanceScore"] for d in dist])
meanDist = np.mean(dist)
self.assertTrue(meanDist == 0)
return scoredSubtomos
File renamed without changes.
123 changes: 0 additions & 123 deletions xmipptomo/objects.py

This file was deleted.

5 changes: 2 additions & 3 deletions xmipptomo/protocols/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
from .protocol_dose_filter import XmippProtDoseFilter
from .protocol_filter_coordinates_by_map import XmippProtFilterCoordinatesByMap
from .protocol_crop_tomograms import XmippProtCropTomograms
from .protocol_denoising_confidence import XmippProtConfTomo
from .protocol_extract_particlestacks import XmippProtExtractParticleStacks
from .protocol_extract_subtomos import XmippProtExtractSubtomos
from .protocol_flexalign import XmippProtTsFlexAlign
from .protocol_peak_high_contrast import XmippProtPeakHighContrast
Expand All @@ -49,9 +47,10 @@
from .protocol_resolution_local_monotomo import XmippProtMonoTomo
from .protocol_roiIJ import XmippProtRoiIJ
from .protocol_score_coordinates import XmippProtScoreCoordinates
from .protocol_score_transform import XmippProtScoreTransform
from .protocol_splitTS import XmippProtSplitTiltSeries
from .protocol_subtraction_subtomo import XmippProtSubtractionSubtomo
from .protocol_subtomo_map_back import XmippProtSubtomoMapBack
from .protocol_half_maps_subtomos import XmippProtHalfMapsSubtomo
from .protocol_project_subtomograms import XmippProtProjectSubtomograms
from .protocol_apply_segmentation import XmippProtApplySegmentation
from .protocol_segment_morphology import XmippProtMorphology
Loading

0 comments on commit 75e8d46

Please sign in to comment.