Skip to content

Commit 82c0a64

Browse files
authoredJul 24, 2023
Merge pull request #42 from VasudhaJha/feature/export-all-files
fix readme + bump patch version
2 parents 5001fd8 + dc2a24a commit 82c0a64

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed
 

‎README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ import matplotlib.pyplot as plt
174174
import scipy.io as sio
175175
import numpy as np
176176
import pandas as pd
177-
from genomap.genoMOI import genoMOIvis, genoMOItraj
177+
import genomap.genoMOI as gp
178178

179179
# Load five different pancreatic datasets
180180
dx = sio.loadmat('dataBaronX.mat')
@@ -196,7 +196,7 @@ ybatch = np.squeeze(dx['batchLabel'])
196196

197197
# Apply genomap-based multi omic integration and visualize the integrated data with local structure for cluster analysis
198198
# returns 2D visualization, cluster labels, and intgerated data
199-
resVis,cli,int_data=genoMOIvis(data, data2, data3, data4, data5, colNum=12, rowNum=12, n_dim=32, epoch=10, prealign_method='scanorama')
199+
resVis,cli,int_data=gp.genoMOIvis(data, data2, data3, data4, data5, colNum=12, rowNum=12, n_dim=32, epoch=10, prealign_method='scanorama')
200200

201201

202202
plt.figure(figsize=(15, 10))
@@ -222,7 +222,7 @@ plt.show()
222222
# Apply genomap-based multi omic integration and visualize the integrated data with global structure for trajectory analysis
223223

224224
# returns 2D embedding, cluster labels, and intgerated data
225-
resTraj,cli,int_data=genoMOItraj(data, data2, data3, data4, data5, colNum=12, rowNum=12, n_dim=32, epoch=10, prealign_method='scanorama')
225+
resTraj,cli,int_data=gp.genoMOItraj(data, data2, data3, data4, data5, colNum=12, rowNum=12, n_dim=32, epoch=10, prealign_method='scanorama')
226226

227227

228228
plt.figure(figsize=(15, 10))
@@ -250,20 +250,22 @@ plt.show()
250250
import scanpy as sc
251251
import pandas as pd
252252
import genomap.genoAnnotate as gp
253+
import matplotlib.pyplot as plt
253254
#Load the PBMC dataset
254-
adata = sc.read_10x_mtx("pbmc3k_filtered_gene_bc_matrices/")
255+
adata = sc.read_10x_mtx("./pbmc3k_filtered_gene_bc_matrices/")
255256

256257
# Input: adata: annData containing the raw gene counts
257258
# tissue type: e.g. Immune system,Pancreas,Liver,Eye,Kidney,Brain,Lung,Adrenal,Heart,Intestine,Muscle,Placenta,Spleen,Stomach,Thymus
258259

259-
adataP = gp.genoAnnotate(adata,tissue_type="Immune system")
260-
260+
adataP=gp.genoAnnotate(adata,species="human", tissue_type="Immune system")
261+
cell_annotations=adataP.obs['cell_type'].values # numpy array containing the
262+
# cell annotations
261263

262-
# Compute UMAP (requires neighborhood graph, see the previous code for Louvain clustering)
263-
sc.tl.umap(adataP)
264-
# Create a UMAP plot colored by cell type labels
264+
# Compute t-SNE
265+
sc.tl.tsne(adataP)
266+
# Create a t-SNE plot colored by cell type labels
265267
cell_annotations=adataP.obs['cell_type']
266-
sc.pl.umap(adataP, color='cell_type')
268+
sc.pl.tsne(adataP, color='cell_type')
267269
```
268270

269271
### Example 7 - Try genoSig for finding gene signatures for cell/data classes

‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="genomap",
8-
version="1.3.2",
8+
version="1.3.3",
99
author="Md Tauhidul Islam",
1010
author_email="tauhid@stanford.edu",
1111
description="Genomap converts tabular gene expression data into spatially meaningful images.",

0 commit comments

Comments
 (0)
Please sign in to comment.