{"id":22021706,"url":"https://github.com/lieberinstitute/cell-type-interact","last_synced_at":"2026-04-30T18:32:14.898Z","repository":{"id":237717736,"uuid":"781664482","full_name":"LieberInstitute/Cell-type-INTERACT","owner":"LieberInstitute","description":"Deep learning predicts DNA methylation regulatory variants in specific brain cell types and enhances fine mapping for brain disorders","archived":false,"fork":false,"pushed_at":"2024-05-02T20:22:44.000Z","size":7266,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T10:20:08.189Z","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/LieberInstitute.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":"2024-04-03T20:08:49.000Z","updated_at":"2024-05-02T20:22:48.000Z","dependencies_parsed_at":"2024-05-03T02:51:52.450Z","dependency_job_id":null,"html_url":"https://github.com/LieberInstitute/Cell-type-INTERACT","commit_stats":null,"previous_names":["lieberinstitute/cell-type-interact"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LieberInstitute/Cell-type-INTERACT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2FCell-type-INTERACT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2FCell-type-INTERACT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2FCell-type-INTERACT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2FCell-type-INTERACT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LieberInstitute","download_url":"https://codeload.github.com/LieberInstitute/Cell-type-INTERACT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2FCell-type-INTERACT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32473804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2024-11-30T06:13:46.239Z","updated_at":"2026-04-30T18:32:14.883Z","avatar_url":"https://github.com/LieberInstitute.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#\nThis repository contains codes to predict DNA methylation regulatory variants in specific brain cell types.\n\n# Hardware requirements\nscMeformer package requires only a standard computer with GPUs and enough RAM to support the in-memory operations.\n\n\n# Software requirements\n## OS Requirements\nThis package is supported by Linux. The package has been tested on Rocky Linux 9.2.\n\n## Python Dependencies\nscMeformer mainly depends on the following Python packages. \u003cbr/\u003e\nPyTorch \u003cbr/\u003e\napex \u003cbr/\u003e\nnumpy \u003cbr/\u003e\nscipy \u003cbr/\u003e\nscikit-learn \u003cbr/\u003e\npandas \u003cbr/\u003e\nloompy \u003cbr/\u003e\njson \u003cbr/\u003e\nh5py\n\n# Usage\n\n## 1. Pretraining\n\n### 1.1. Calculate DNAm levels for CpG sites in pseudo-bulk of neuronal or glial cells.\n\n### Example\n```bash\nConstruct training data and validation data for neuron to prerain INTERACT model.\n\n$python run_feature.py neuorn\n\n```\n\n### Example\n```bash\nConstructs training data and validation data for glia to prerain INTERACT model.\n\n$python run_feature.py glia\n\n```\n\n### 1.2 Pretrain INTERACT model\n\n### Example\n```bash\npretrain INTERACT model with methylation data from neuron using four GPUs\n\nCUDA_VISIBLE_DEVICES=0,1,2,3 python3 -m torch.distributed.launch main.py transformer wgbs_methylation_regression \\\n        --exp_name wgbs_methylation_regression \\\n        --learning_rate 0.000176 \\\n        --batch_size 128 \\\n        --data_dir ./datasets/small_eval/neuron \\\n        --output_dir ./outputs/merge_eval/neuron \\\n        --warmup_steps 10000 \\\n        --gradient_accumulation_steps 1 \\\n        --fp16 --local_rank 0 \\\n        --nproc_per_node 4 \\\n        --model_config_file ./config/config.json\n```\n\n### Example\n```bash\nPretrain INTERACT model with methylation data from glia using four GPUs\n\nCUDA_VISIBLE_DEVICES=0,1,2,3 python3 -m torch.distributed.launch main.py transformer wgbs_methylation_regression \\\n        --exp_name wgbs_methylation_regression \\\n        --learning_rate 0.000176 \\\n        --batch_size 128 \\\n        --data_dir ./datasets/small_eval/glia \\\n        --output_dir ./outputs/merge_eval/glia \\\n        --warmup_steps 10000 \\\n        --gradient_accumulation_steps 1 \\\n        --fp16 --local_rank 0 \\\n        --nproc_per_node 4 \\\n        --model_config_file ./config/config.json\n```\n\n\n## 2. Training\n\n### 2.1. Calculate DNAm levels for CpG sites in pseudo-bulk of each specific cell type.\n\n### Example\n```bash\nConstruct training data, validation data and test data for L23 to finetune INTERACT model.\n\n$python run_feature.py L23\n\n```\n\n### 2.2. Finetune pre-trained INTERACT models for each cell type. \n\n### Example\n```bash\nfinetune the INTERACT model for L23 using four GPUs from the pretrained neuron model\n\nCUDA_VISIBLE_DEVICES=0,1,2,3 python3 -m torch.distributed.launch main.py transformer array_methylation_regression \\\n        --exp_name array_methylation_regression \\\n        --learning_rate 0.000176 \\\n        --batch_size 128 \\\n        --data_dir ./datasets/small_eval/L23 \\\n        --output_dir ./outputs/merge_eval/L23 \\\n        --warmup_steps 10000 \\\n        --gradient_accumulation_steps 1 \\\n        --fp16 --local_rank 0 \\\n        --nproc_per_node 4 \\\n        --model_config_file ./config/config.json\n\t--from_pretrained ./outputs/merge_eval/neuron\n```\n\n### Example\n```bash\nfinetune the INTERACT model for Astro using four GPUs from the pretrained glia model\n\nCUDA_VISIBLE_DEVICES=0,1,2,3 python3 -m torch.distributed.launch main.py transformer array_methylation_regression \\\n        --exp_name array_methylation_regression \\\n        --learning_rate 0.000176 \\\n        --batch_size 128 \\\n        --data_dir ./datasets/small_eval/Astro \\\n        --output_dir ./outputs/merge_eval/Astro \\\n        --warmup_steps 10000 \\\n        --gradient_accumulation_steps 1 \\\n        --fp16 --local_rank 0 \\\n        --nproc_per_node 4 \\\n        --model_config_file ./config/config.json\n        --from_pretrained ./outputs/merge_eval/glia\n```\n\n## 3. Prediction\n\n### 3.1. Predict DNAm levels of CpG sites from DNA sequences with reference allele using one GPU.\n### Example\n```bash\npredict DNAm levels of CpG sites from DNA sequences with reference allele for L23 using the finetuned INTERACT model\n\nCUDA_VISIBLE_DEVICES=0 python3 main.py transformer array_mQTL_regression \\\n\t--exp_name array_mQTL_regression \\\n\t--batch_size 2048 \\\n\t--num_workers 2 \\\n\t--learning_rate 0.000176 \\\n\t--warmup_steps 20000 \\\n\t--gradient_accumulation_steps 1 \\\n\t--data_dir ./datasets/double_genome/positive_strand/reference \\\n\t--output_dir ./outputs/merge_genome/Astro/reference/chr1 \\\n\t--num_train_epochs 1 \\\n\t--from_pretrained ./outputs/merge_eval/L23\n\t--split chr1\n```\n\n### Example\n```bash\npredict DNAm levels of CpG sites from DNA sequences with variation allel for L23 using the finetuned INTERACT model\n\nCUDA_VISIBLE_DEVICES=0 python3 main.py transformer array_mQTL_regression \\\n\t--exp_name array_mQTL_regression \\\n\t--batch_size 2048 \\\n\t--num_workers 2 \\\n\t--learning_rate 0.000176 \\\n\t--warmup_steps 20000 \\\n\t--gradient_accumulation_steps 1 \\\n\t--data_dir ./datasets/double_genome/positive_strand/variation/ \\\n\t--output_dir ./outputs/merge_genome/Astro/variation/chr1 \\\n\t--num_train_epochs 1 \\\n\t--from_pretrained ./outputs/merge_eval/Astro \\\n\t--split chr1\n```\n\n### 3.2. Calculate absolute difference of DNAm levels between the two DNA sequences with reference and alternative alleles.\n### Example\n```bash\nCalculates the absolute DNAm difference for CpGs in chromsome 1 for L23\n\npython run_snmQTL.py L23 chr1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieberinstitute%2Fcell-type-interact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flieberinstitute%2Fcell-type-interact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieberinstitute%2Fcell-type-interact/lists"}