') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); GitHub - JiangBioLab/DeepCCI · GitHub
Skip to content

Repository files navigation

DeepCCI (Deep learning framework for Cell-Cell Interactions inference from scRNA-seq data)

DeepCCI is a graph convolutional network (GCN)-based deep learning framework for Cell-Cell Interactions inference from scRNA-seq data. workflow

Installation:

From Source:

Start by grabbing this source codes:

git clone https://github.com/JiangBioLab/DeepCCI.git
cd DeepCCI

(Recommended) Use python virutal environment with conda(https://anaconda.org/)

conda create -n deepcciEnv python=3.7.4 pip
conda activate deepcciEnv
pip install -r requirements.txt

because data processing and result visualization require R and then also install the following in R:

conda install r-base
R
install.packages(‘Seurat’)
install.packages("igraph")
install.packages('NMF')
install.packages("devtools")
devtools::install_github("jokergoo/circlize")
devtools::install_github("jokergoo/ComplexHeatmap")
devtools::install_github("sqjin/CellChat")
devtools::install_github('satijalab/seurat-data')

Quick Start

1. Cell Cluster Model

(1) Preprocess input files

The cluster model of DeepCCI accepts scRNA-seq data format: CSV and h5. The processed feature file of scRNA-seq data will be provided. Depending on the size of the scRNA-seq file,the process will take about 5-10 minutes.

CSV format

Take an example of Yan 's (GSE36552).

cd Cluster_model
python preprocess.py --name Yan --file_format csv
h5 format

Take an example Qx Limb Muscle (GSE109774 ).

cd Cluster_model
python preprocess.py --name Quake_10x_Limb_Muscle --file_format h5

(2) Cell Clustering

The clustering results of scRNA-seq data will be output.

With pre-train:

It will take about 25 minutes.

python Cluster.py --name Yan --pretain True --pretrain_epoch 50 --device cuda

Without pre-train: The pretrained model files are in the pretain_model folder. It will take about 5 minutes.

python Cluster.py --name Yan --pretain False --device cuda
python Cluster.py --name Quake_10x_Limb_Muscle --pretain False --device cuda

2. Cell Interaction Model

(1) Preprocess input files

The example test file can be download from http://jianglab.org.cn/deepcci_download/. The processed feature file will be provided. Depending on the size of the scRNA-seq file,the process will take about 10-20 minutes.

With cell-label:
cd Interaction_model
python Feature.py --label_mode True --species Human
Without cell-label
python Feature.py --label_mode False --species Human

(2) Interaction Inference

The predicted interaction outfile will be provided. The predicted process will take about 1-2 minutes.

python Interaction_inference.py --device cuda 

3. Visualization

To show the CCI output intuitively, several visualization methods are provided. The process will take about 1 minutes.

cd Plot
python Plot.py

Contact

Feel free to submit an issue or contact us at wenyiyang22@163.com for problems about the package.

About

No description, website, or topics provided.

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages