GithubHelp home page GithubHelp logo

linajea's Introduction

Linajea

Publications

Linajea

This is the main software repository for the linajea cell tracking project. It includes tools and infrastructure for running a pipeline that starts from 3d+time light sheet data and ends in extracted cell lineage tracks.

Installation

git clone https://github.com/funkelab/linajea.git
cd linajea
conda create --name linajea python pytorch pylp -c pytorch -c funkey
conda activate linajea
pip install numpy cython jupyter
pip install -r requirements.txt
pip install -e .

Versioning

The main branch contains the current version of the code. New features and bugfixes will be developed in separate branches before being merged into main. The experiments in the Nature Biotechnology paper have been conducted with v1.3, the experiments in the MICCAI paper with v1.4 (see tags). For the public release we refactored major parts of the code, breaking backwards compatibility. A separate repository (https://github.com/linajea/linajea_experiments) contains all the scripts necessary to replicate the paper results, using the appropriate release.

Use

Have a look at the jupyter notebook examples or look at the run scripts directly.

Contributing

If you make any improvements to the software, please fork, create a new branch named descriptively for the feature you are upgrading or bug you are fixing, commit your changes to that branch, and create a pull request asking for permission to merge. Help is always appreciated!

Other

If you have any questions and can't find the answers you need in the examples or in the code documentation, feel free to contact us!

linajea's People

Contributors

abred avatar cmalinmayor avatar funkey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

linajea's Issues

Could not run the example_basic and example_advanced

Hi,
We found your repo very interesting and wanted to reproduce the numbers. As a newbie in this area, I tried to run the run_basic.ipynb and run_advanced.ipynb files. However, both give errors. Here are the details.

For run_basic.ipynb:

raise ServerSelectionTimeoutError(pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 64133448037fa0fadb53aa9a, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>
2023-03-16 19:23:48,952 daisy.scheduler ERROR pre_check() exception for block ('linajea_prediction', 12336)
Traceback (most recent call last):
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/src/daisy/daisy/scheduler.py", line 199, in __precheck
return self.task_map[block.task_id].check_function(block)
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 153, in
else lambda b: all([f(b) for f in cf])),
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 153, in
else lambda b: all([f(b) for f in cf])),
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 139, in
cf.append(lambda b: check_function(
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/daisy_check_functions.py", line 17, in check_function
result = daisy_coll.find_one({'_id': block.block_id[1]})
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/collection.py", line 1491, in find_one
for result in cursor.limit(-1):
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/cursor.py", line 1280, in next
if len(self.__data) or self._refresh():
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/cursor.py", line 1165, in _refresh
self.__session = self.__collection.database.client._ensure_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2027, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1976, in __start_session
server_session = self._get_server_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2013, in _get_server_session
return self._topology.get_server_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 525, in get_server_session
session_timeout = self._check_session_support()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 507, in _check_session_support
self._select_servers_loop(
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 226, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 64133466037fa0fadb53aa9b, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>
2023-03-16 19:24:19,528 daisy.scheduler ERROR pre_check() exception for block ('linajea_prediction', 14360)
Traceback (most recent call last):
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/src/daisy/daisy/scheduler.py", line 199, in __precheck
return self.task_map[block.task_id].check_function(block)
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 153, in
else lambda b: all([f(b) for f in cf])),
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 153, in
else lambda b: all([f(b) for f in cf])),
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 139, in
cf.append(lambda b: check_function(
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/daisy_check_functions.py", line 17, in check_function
result = daisy_coll.find_one({'_id': block.block_id[1]})
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/collection.py", line 1491, in find_one
for result in cursor.limit(-1):
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/cursor.py", line 1280, in next
if len(self.__data) or self._refresh():
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/cursor.py", line 1165, in _refresh
self.__session = self.__collection.database.client._ensure_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2027, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1976, in __start_session
server_session = self._get_server_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2013, in _get_server_session
return self._topology.get_server_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 525, in get_server_session
session_timeout = self._check_session_support()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 507, in _check_session_support
self._select_servers_loop(
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 226, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 64133485037fa0fadb53aa9c, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>
2023-03-16 19:24:50,114 daisy.scheduler ERROR pre_check() exception for block ('linajea_prediction', 16660)
Traceback (most recent call last):
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/src/daisy/daisy/scheduler.py", line 199, in __precheck
return self.task_map[block.task_id].check_function(block)
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 153, in
else lambda b: all([f(b) for f in cf])),
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 153, in
else lambda b: all([f(b) for f in cf])),
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 139, in
cf.append(lambda b: check_function(
File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/daisy_check_functions.py", line 17, in check_function
result = daisy_coll.find_one({'_id': block.block_id[1]})
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/collection.py", line 1491, in find_one
for result in cursor.limit(-1):
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/cursor.py", line 1280, in next
if len(self.__data) or self._refresh():
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/cursor.py", line 1165, in _refresh
self.__session = self.__collection.database.client._ensure_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2027, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1976, in __start_session
server_session = self._get_server_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2013, in _get_server_session
return self._topology.get_server_session()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 525, in get_server_session
session_timeout = self._check_session_support()
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 507, in _check_session_support
self._select_servers_loop(
File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 226, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 641334a4037fa0fadb53aa9d, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>

Execution Summary

Task linajea_prediction:

num blocks : 240
completed ✔: 0 (skipped 0)
failed    ✗: 240
orphaned  ∅: 0

Traceback (most recent call last):

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/run_basic.py", line 212, in
predict_blockwise(val_config)

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/process_blockwise/predict_blockwise.py", line 161, in predict_blockwise
cand_db = CandidateDatabase(

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/linajea/utils/candidate_database.py", line 63, in init
super().init(

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/src/daisy/daisy/persistence/mongodb_graph_provider.py", line 141, in init
raise e

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/linajea-master/src/daisy/daisy/persistence/mongodb_graph_provider.py", line 103, in init
if self.db_name not in self.client.list_database_names():

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2128, in list_database_names
return [doc["name"] for doc in self.list_databases(session, nameOnly=True)]

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2110, in list_databases
res = admin._retryable_read_command(cmd, session=session)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/database.py", line 870, in _retryable_read_command
return self.__client._retryable_read(_cmd, read_preference, session)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1606, in _retryable_read
server = self._select_server(read_pref, session, address=address)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1436, in _select_server
server = topology.select_server(server_selector)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 250, in select_server
return random.choice(self.select_servers(selector, server_selection_timeout, address))

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 211, in select_servers
server_descriptions = self._select_servers_loop(selector, server_timeout, address)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 226, in _select_servers_loop
raise ServerSelectionTimeoutError(

ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 641334c2037fa0fadb53aa9e, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>

Similary for run_advanced.ipynb:

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/test/run_advanced.py", line 244, in
for inf_config in linajea.utils.getNextInferenceData(val_args):

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/test/linajea/utils/get_next_inference_data.py", line 121, in getNextInferenceData
sample.db_name = checkOrCreateDB(

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/test/linajea/utils/check_or_create_db.py", line 52, in checkOrCreateDB
return _checkOrCreateDBMeta(db_host, info, prefix=prefix,

File "/data1/Medical/WIS/Cell_trackingggg/linajea/Codes/test/linajea/utils/check_or_create_db.py", line 61, in _checkOrCreateDBMeta
for db_name in client.list_database_names():

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2128, in list_database_names
return [doc["name"] for doc in self.list_databases(session, nameOnly=True)]

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 2110, in list_databases
res = admin._retryable_read_command(cmd, session=session)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/database.py", line 870, in _retryable_read_command
return self.__client._retryable_read(_cmd, read_preference, session)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1606, in _retryable_read
server = self._select_server(read_pref, session, address=address)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1436, in _select_server
server = topology.select_server(server_selector)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 250, in select_server
return random.choice(self.select_servers(selector, server_selection_timeout, address))

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 211, in select_servers
server_descriptions = self._select_servers_loop(selector, server_timeout, address)

File "/home/mbzuaiser/anaconda3/envs/auto_wis/lib/python3.8/site-packages/pymongo/topology.py", line 226, in _select_servers_loop
raise ServerSelectionTimeoutError(

ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 6415d91e4be84e3b4ad1431a, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.