{"id":16271678,"url":"https://github.com/jianzhnie/proteintransformer","last_synced_at":"2025-04-08T15:34:46.199Z","repository":{"id":166477657,"uuid":"481912853","full_name":"jianzhnie/ProteinTransformer","owner":"jianzhnie","description":"ProteinTransformer is a toolkit using deep learning for protein function annotation","archived":false,"fork":false,"pushed_at":"2023-03-14T08:47:30.000Z","size":9741,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-14T11:53:05.313Z","etag":null,"topics":["biology","computing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jianzhnie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-04-15T09:50:49.000Z","updated_at":"2024-10-15T07:38:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"aeac6404-84a0-4d77-8506-7903a4527066","html_url":"https://github.com/jianzhnie/ProteinTransformer","commit_stats":{"total_commits":720,"total_committers":6,"mean_commits":120.0,"dds":"0.030555555555555558","last_synced_commit":"4fcc72a5643a85858b73fec13e6cf7ccc4d66fdc"},"previous_names":["jianzhnie/ProteinTransformer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianzhnie%2FProteinTransformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianzhnie%2FProteinTransformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianzhnie%2FProteinTransformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianzhnie%2FProteinTransformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jianzhnie","download_url":"https://codeload.github.com/jianzhnie/ProteinTransformer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247871383,"owners_count":21010031,"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":["biology","computing"],"created_at":"2024-10-10T18:14:23.788Z","updated_at":"2025-04-08T15:34:46.159Z","avatar_url":"https://github.com/jianzhnie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProteinTransformer\n\n[![OSCS Status](https://www.oscs1024.com/platform/badge/jianzhnie/X-DeepGO.svg?size=small)](https://www.oscs1024.com/project/jianzhnie/X-DeepGO?ref=badge_small)\n\nProteinTransformer is toolkit using deep learning for protein function annotation\n\n[Toc]\n\n## Installation\n\nThe sources for Deepfold can be downloaded from the `Github repo`.\n\nYou can either clone the public repository:\n\n```bash\n# clone project\ngit clone https://github.com/jianzhnie/X-DeepGO.git  \n# First, install dependencies\npip install -r requirements.txt\n```\n\nOnce you have a copy of the source, you can install it with:\n\n```bash\npython setup.py install\n```\n\n## How to use\n\n### Single GPU Training\n\n```sh\npython main.py  \\\n--data_path ./protein \\\n--output-dir ./work_dir \\\n--lr 0.0001 \\\n--epochs 10 \\\n--batch-size 2 \\\n--log_wandb \\\n--workers 4\n```\n\n### Distributed Training\n\n```sh\ntorchrun --nnodes=1 --nproc_per_node=2  --rdzv_id=0 main.py  \\\n--data_path ./protein \\\n--output-dir ./work_dir \\\n--lr 0.0001 \\\n--epochs 10 \\\n--batch-size 2 \\\n--log_wandb \\\n--workers 4\n```\n\n### Evaluate\n\n```sh\n## evaluate diamond\npython  evaluate_diamondscore.py \\\n    --train-data-file ./protein/train_data.pkl \\\n    --test-data-file ./protein/test_data.pkl \\\n    --diamond-scores-file ./protein/test_diamond.res \\\n    --ontology-obo-file ./protein/go.obo \\\n    --output_dir ./work_dir\n\n\n## evaluate model\npython  evaluate_deepmodel.py \\\n    --train-data-file ./protein/train_data.pkl \\\n    --test-data-file ./protein/predictions.pkl \\\n    --terms-file ./protein/terms.pkl \\\n    --ontology-obo-file ./protein/go.obo \\\n    --output_dir ./work_dir\n```\n\n### Inference\n\n```sh\n## inference\npython inference_embedding.py  \\\n--data_path ./protein \\\n--output-dir ./work_dir \\\n--resume ./work_dir/ProtLM_esm_embedding_mean/model_best.pth.tar \\\n--model esm_embedding \\\n--pool_mode  mean \\\n--batch-size  128 \\\n--workers 4\n```\n\n### Extract Embeddings\n\n```sh\npython extract_embeddings.py  \\\n--data_path ./protein \\\n--split \"test\" \\\n--batch-size 32\n```\n\n## License\n\nThis library is licensed under the Apache 2.0 License.\n\n## Contributing to X-DeepGO\n\nWe are actively accepting code contributions to the X-DeepGO project. If you are interested in contributing to X-DeepGO, please contact me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianzhnie%2Fproteintransformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjianzhnie%2Fproteintransformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianzhnie%2Fproteintransformer/lists"}