Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface with Scipion framework #9

Open
xulabs opened this issue Jul 25, 2019 · 29 comments
Open

Interface with Scipion framework #9

xulabs opened this issue Jul 25, 2019 · 29 comments

Comments

@xulabs
Copy link
Owner

xulabs commented Jul 25, 2019

We will gradually interface AITom with the Scipion framework as a mid-term effort.

https://github.com/I2PC/scipion/wiki

https://github.com/scipion-em

https://journals.iucr.org/d/issues/2019/10/00/ic5108/index.html

@xulabs xulabs added this to To do in Interface with Scipion framework via automation Jul 25, 2019
@xulabs xulabs added the ToDo Functionality label Aug 6, 2019
@xulabs xulabs added enhancement New feature or request and removed ToDo Functionality labels Aug 22, 2019
@xulabs xulabs removed the enhancement New feature or request label Oct 10, 2019
@pconesa
Copy link
Contributor

pconesa commented Nov 16, 2019

Hi! Count with our assistance... I think now is the right timing for this. We are preparing a release of the scipion-tomo set of plugins with Eman, imod, some xmipp methods....dynamo is on board too.

@pconesa
Copy link
Contributor

pconesa commented Nov 16, 2019

Better this page, we very soon will update it

https://scipion-em.github.io/docs/docs/developer/developers.html

@xulabs
Copy link
Owner Author

xulabs commented Nov 16, 2019

@pconesa great! If you could help us with the interfacing, that would be wonderful!
The usage of current functions can be found in the following tutorials.
https://github.com/xulabs/aitom_doc/tree/master/tutorials

@pconesa
Copy link
Contributor

pconesa commented Nov 18, 2019

What would be the simplest method to integrate...my idea is to:

1.- We create a basic plugin for you with one of the methods integrated.
2.- We share it with you and start co-developing it and co-maintaining it.

How does it sound?

@xulabs
Copy link
Owner Author

xulabs commented Nov 21, 2019

Sounds good!

The simplest method we have is particle picking.
https://github.com/xulabs/aitom_doc/tree/master/tutorials/008_particle_picking

Perhaps we could start from here.

@pconesa
Copy link
Contributor

pconesa commented Nov 21, 2019 via email

@xulabs
Copy link
Owner Author

xulabs commented Nov 22, 2019

Great. Thanks.

@pconesa
Copy link
Contributor

pconesa commented Dec 5, 2019

HI @xulabs , I've pushed the scipion plugin for Aitom (a VERY basic one) to scipion-em organization.

It is perfectly ok if you want to have it here under xulabs.

You can find in the readme what do you need....there are though a few items I'd like to comment:

1.- Installation: The plugin is able to install aitom in a conda VE, but for that I needed a release (thus I forked aitom repo and just made a release to have the tar.gz files). There are better ways to do this, this is just a quick hack. The usual way to do it is to use pypi and just do pip install xxxxx.

2.- To invoke the picking I also created an entry point, so in a terminal you can run

picking pathtotomogram.mrc pathtojsonoutputfile.json

The picking script is a slight adaptation os your picking tutorial script.

3.- Picking itself....It is parsing the coordinates in the json, but ....there is no boxsize, I've hardcoded it to 100 but I'm sure this is incorrect. My doubt is if there any information about the boxsize per coordinate. How does it work?

@xulabs
Copy link
Owner Author

xulabs commented Dec 5, 2019

Thanks a lot @pconesa
Currently, almost all of the aitom developers are student volunteers, and they are busy at the end of this semester. Once they are available, I will find a student work on this.
Thanks again!

@pconesa
Copy link
Contributor

pconesa commented Dec 5, 2019

Great! We can add whoever you want to our slack channel.

@xiangruz
Copy link
Contributor

@zhuzhenxi

@zhuzhenxi
Copy link
Contributor

HI @pconesa , I successfully install 'scipion-em' in devel mode but meet some problems while testing (after running 'scipion test aitom.tests.tests_picking.TestAitomPicking'). It seems 'picking' command not found.

ERROR running protocol aitom - picking
FAILED with error: Protocol failed: Command ' conda activate aitom-0.1 && picking "/home/zzx/ScipionUserData/projects/TestAitomPicking/Runs/000002_ProtImportTomograms/extra/import_aitom_demo_single_particle_tomogram.mrc" "Runs/000064_AiTomPicking/extra/import_aitom_demo_single_particle_tomogram.mrc.json"' returned non-zero exit status 1

@pconesa
Copy link
Contributor

pconesa commented Jan 16, 2020

We have seen many issues when we run conda apps.
What has better worked for us is to:
1.- Do not have conda in the path (remove any conda initiatization in the bash.rc or equivalent.
2.- Tell Scipion how to activate conda by setting the variable CONDA_ACTIVATION_CMD to something like:
I have this working for my laptop in my <SCIPION_HOME>/config/scipion.conf , under [BUILD] section :
CONDA_ACTIVATION_CMD= eval "$(/extra/miniconda3/bin/conda shell.bash hook)"

Note that you need to adapt at least the path or even the shell type (in case you don't use bash))

@pconesa
Copy link
Contributor

pconesa commented Jan 16, 2020

@zhuzhenxi when you say scipion-em .....what actually do you mean?
We are working on scipion 3 (in python3) and the latest released version of scipion is scipion2.0.

Which one have you installed. The plugin I initiated targets Scipion 2.0, so python 2.7

@zhuzhenxi
Copy link
Contributor

Thanks a lot @pconesa , I will try again.

@zhuzhenxi
Copy link
Contributor

Conda seems to work, but 'picking' is still 'command not found'(non-zero exit status 127). @pconesa
image

@pconesa
Copy link
Contributor

pconesa commented Jan 20, 2020

Hi @zhuzhenxi , that might be because I changed slightly your code to have an entry point for the picking. Please do not take it literally it was just an approach that worked for me:
master...pconesa:master

I find it very easy to have those entry points, so the user/scipion does not need to know where the scripts are, they are available as commands.

@zhuzhenxi
Copy link
Contributor

Hi @pconesa , the plugin works pretty well, thanks a lot.
A release is available (https://github.com/xulabs/aitom/releases) and code with entry point has been merged (https://github.com/xulabs/aitom/tree/master/aitom/bin). Is it possible now for the plugin to install AITom automatically?

@pconesa
Copy link
Contributor

pconesa commented Jan 27, 2020

Nice! It should work, I actually did it getting the release from my fork, but now that you have your own it should be a matter of pointing to your release.

@zhuzhenxi
Copy link
Contributor

Actually, I manually install AITom in conda VE 'aitom-0.1'. So how can I depend on the release and maybe install AITom automatically like other Scipion plugins(more friendly to users)?

@pconesa
Copy link
Contributor

pconesa commented Jan 27, 2020

Yep, I've added you as admin of the plugin repository.

This line is the one grabbing the aitom release from my fork, just need to be adapted to take your url.

https://github.com/scipion-em/scipion-em-aitom/blob/devel/aitom/__init__.py#L133

@pconesa
Copy link
Contributor

pconesa commented Jan 27, 2020

Your release url should be this one: https://github.com/xulabs/aitom/archive/0.1.tar.gz

Optionally you can deploy aitom to pipy and then the installation will become a "pip install aitom"

@zhuzhenxi
Copy link
Contributor

Ok, I will discuss with Xu for further development.

@xulabs
Copy link
Owner Author

xulabs commented Jan 27, 2020

@zhuzhenxi yes we may deploy it to pipy. Please check how to do it and let me know. Thanks.

@pconesa
Copy link
Contributor

pconesa commented Jan 27, 2020

You are almost there, your code is ready to be deploy, you just need an account and push it.

We have some instructions for our plugins but there is nothing specific to Scipion there, all is standard pypi.org commands:

https://scipion-em.github.io/docs/docs/developer/creating-a-plugin#create-and-upload-distribution

Except fo the -c "scipion-2.0" (you don't need that for uploading aitom.)

@xulabs
Copy link
Owner Author

xulabs commented Jan 27, 2020

@pconesa got it. Will do. Thank you.

@xulabs
Copy link
Owner Author

xulabs commented Jan 30, 2020

@pconesa @zhuzhenxi the code is now available at
https://test.pypi.org/project/aitom/0.0.1

@zhuzhenxi I have modified the version from 0.1 to 0.01 because it is a very alpha release. Please change the related code and tutorial accordingly if needed.

@pconesa
Copy link
Contributor

pconesa commented Jan 30, 2020

Great, now we just need to do the pip install using it, not sure how to use a pip package from test.pipy but should be documented somewhere...I can make a PR with that change.

@pconesa
Copy link
Contributor

pconesa commented Jan 17, 2022

Hi, this completely went out of my radar.

We even organized a tomo course and didn't mention this integration effort.

Maybe is a good time to catch up? How are things going? Do you need any assistance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

4 participants