{"id":26898041,"url":"https://github.com/dbouget/translocation-detector","last_synced_at":"2025-07-09T09:37:01.709Z","repository":{"id":284557028,"uuid":"955314649","full_name":"dbouget/translocation-detector","owner":"dbouget","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-26T13:24:37.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T14:31:51.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbouget.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-26T12:58:44.000Z","updated_at":"2025-03-26T13:23:11.000Z","dependencies_parsed_at":"2025-03-26T14:32:02.432Z","dependency_job_id":"3e2770a3-a065-45ee-97c9-ea9f0966e889","html_url":"https://github.com/dbouget/translocation-detector","commit_stats":null,"previous_names":["dbouget/translocation-detector"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbouget%2Ftranslocation-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbouget%2Ftranslocation-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbouget%2Ftranslocation-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbouget%2Ftranslocation-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbouget","download_url":"https://codeload.github.com/dbouget/translocation-detector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586016,"owners_count":20801026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-01T05:08:11.726Z","updated_at":"2025-04-01T05:08:12.290Z","avatar_url":"https://github.com/dbouget.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python package for chromosome translocation detection in microscope images\n\n\n## Installation\n\n```\npip install git+https://github.com/dbouget/translocation-detector.git\n```\n\nAlternatively, after manually cloning the repository\n```\npip install -e .\n```\n\n# Usage\n\n## CLI\n```\ntranslocdet -c CONFIG -v debug\n```\n\nCONFIG should point to a configuration file (*.ini), specifying all runtime parameters,\naccording to the pattern from **blank_main_config.ini**.\n\n## Python module\n```\nfrom translocdet import run_translocation_detection\nrun_translocation_detection(config_filename=\"/path/to/main_config.ini\")\n```\n\n## Docker\nWhen calling Docker images, the --user flag must be properly used in order for the folders and files created inside\nthe container to inherit the proper read/write permissions. The user ID is retrieved on-the-fly in the following\nexamples, but it can be given in a more hard-coded fashion if known by the user.\n\n:warning: The following Docker image can only perform inference using the CPU. Another Docker image has to be created to\nbe able to leverage the GPU (see further down below). If the CUDA version does not match your machine, a new Docker image can be built manually, \nsimply modifying the base torch image to pull from inside Dockerfile.\n\n```\ndocker pull \u003cuser\u003e/translocation-detector:v1.0-py38-cpu\n```\n\nFor opening the Docker image and interacting with it, run:  \n```\ndocker run --entrypoint /bin/bash -v /home/\u003cusername\u003e/\u003cresources_path\u003e:/workspace/resources -t -i --network=host --ipc=host --user $(id -u) \u003cuser\u003e/translocation-detector:v1.0-py38-cpu\n```\n\nThe `/home/\u003cusername\u003e/\u003cresources_path\u003e` before the column sign has to be changed to match a directory on your local \nmachine containing the data to expose to the docker image. Namely, it must contain folder(s) with images you want to \nrun inference on, as long as a folder with the trained models to use, and a destination folder where the results will \nbe placed.\n\nFor launching the Docker image as a CLI, run:  \n```\ndocker run -v /home/\u003cusername\u003e/\u003cresources_path\u003e:/workspace/resources -t -i --network=host --ipc=host --user $(id -u) \u003cuser\u003e/translocation-detector:v1.0-py38-cpu -c /workspace/resources/\u003cpath\u003e/\u003cto\u003e/main_config.ini -v \u003cverbose\u003e\n```\n\nThe `\u003cpath\u003e/\u003cto\u003e/main_config.ini` must point to a valid configuration file on your machine, as a relative path to the `/home/\u003cusername\u003e/\u003cresources_path\u003e` described above.\nFor example, if the file is located on my machine under `/home/myuser/Data/Translocation/main_config.ini`, \nand that `/home/myuser/Data` is the mounted resources partition mounted on the Docker image, the new relative path will be `Segmentation/main_config.ini`.  \nThe `\u003cverbose\u003e` level can be selected from [debug, info, warning, error].\n\nFor running models on the GPU inside the Docker image, run the following CLI, with the gpu_id properly filled in the configuration file:\n```\ndocker run -v /home/\u003cusername\u003e/\u003cresources_path\u003e:/workspace/resources -t -i --runtime=nvidia --network=host --ipc=host --user $(id -u) \u003cuser\u003e/translocation-detector:v1.0-py38-cuda12.4 -c /workspace/resources/\u003cpath\u003e/\u003cto\u003e/main_config.ini -v \u003cverbose\u003e\n```\n\n\n# Developers\n\nFor running inference on GPU, your machine must be properly configured (cf. [here](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html))  \nIn the configuration file, the gpu_id parameter should then point to the GPU that is to be used during inference.\n\nTo run the unit and integration tests, type the following within your virtual environment:\n```\npip install pytest\npytest tests/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbouget%2Ftranslocation-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbouget%2Ftranslocation-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbouget%2Ftranslocation-detector/lists"}