Skip to content

Commit

Permalink
Update readme, reqs, and setup
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesojanen committed Jan 3, 2024
1 parent e5d4dd6 commit 9426eda
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 51 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ Any and all comments/criticism/suggestions enthusiastically received! :-)

## Required packages

- numpy
- pandas
- scrublet
- loompy
- scanpy
- anndata
- scikit-learn
- scrublet



## Installation
Expand Down
Empty file removed license.md
Empty file.
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
numpy
pandas
scrublet
loompy
scanpy
anndata
scikit-learn
leidenalg
scrublet
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

setup(
name='qclus',
version='0.1.0',
description='Description',
url='https://github.com/johannesojanen/qclus',
author='Eloi Schauch and Johannes Ojanen',
Expand Down
85 changes: 41 additions & 44 deletions tutorials/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('..')\n",
"\n",
"import qclus\n",
"from qclus.gene_lists import *\n",
"import scanpy as sc\n",
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"import warnings\n",
Expand All @@ -28,60 +31,54 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"counts_path = \"../samples/filtered_feature_bc_matrix_66.h5\"\n",
"loompy_path = \"../samples/counts_counts_CAD_66.loom\"\n",
"counts_path = \"../../samples/filtered_feature_bc_matrix_739.h5\"\n",
"loompy_path = \"../../samples/counts_counts_CAD_739.loom\"\n",
"\n",
"adata = qclus.run_qclus(counts_path, \n",
" loompy_path,\n",
" loompy_path, \n",
" gene_set_dict=celltype_gene_set_dict, \n",
" nucl_gene_set=nucl_genes_50, \n",
" minimum_genes=500, \n",
" maximum_genes=6000, \n",
" max_mito_perc=40, \n",
" clustering_features=['pct_counts_nonCM', \n",
" 'pct_counts_nucl_30', \n",
" 'pct_counts_MT', \n",
" 'pct_counts_CM_cyto', \n",
" 'pct_counts_CM_nucl', \n",
" 'fraction_unspliced'], \n",
" clustering_k=4, \n",
" clusters_to_select=[\"0\", \"1\", \"2\"], \n",
" scrublet_filter=True,\n",
" scrublet_expected_rate=0.06, \n",
" scrublet_minimum_counts=2, \n",
" scrublet_minimum_cells=3, \n",
" scrublet_minimum_gene_variability_pctl=85, \n",
" scrublet_n_pcs=30, \n",
" scrublet_thresh=0.1, \n",
" outlier_filter=True, \n",
" outlier_unspliced_diff=0.1, \n",
" outlier_mito_diff=5)\n",
"\n",
"\n",
"run_qclus(counts_path, loompy_path, \n",
" gene_set_dict=celltype_gene_set_dict, \n",
" nucl_gene_set=nucl_genes_50, \n",
" minimum_genes=500, \n",
" maximum_genes=6000, \n",
" max_mito_perc=40, \n",
" clustering_features=['pct_counts_nonCM', \n",
" 'pct_counts_nucl_30', \n",
" 'pct_counts_MT', \n",
" 'pct_counts_CM_cyto', \n",
" 'pct_counts_CM_nucl', \n",
" 'fraction_unspliced'], \n",
" clustering_k=4, \n",
" clusters_to_select=[\"0\", \"1\", \"2\"], \n",
" scrublet_filter=True,\n",
" scrublet_expected_rate=0.06, \n",
" scrublet_minimum_counts=2, \n",
" scrublet_minimum_cells=3, \n",
" scrublet_minimum_gene_variability_pctl=85, \n",
" scrublet_n_pcs=30, \n",
" scrublet_thresh=0.1, \n",
" outlier_filter=True, \n",
" outlier_unspliced_diff=0.1, \n",
" outlier_mito_diff=5)"
" outlier_mito_diff=5)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"AnnData object with n_obs × n_vars = 31670 × 36601\n",
"AnnData object with n_obs × n_vars = 3404 × 36601\n",
" obs: 'fraction_unspliced', 'pct_counts_MT', 'total_counts', 'n_genes_by_counts', 'qclus'\n",
" var: 'gene_ids', 'feature_types', 'genome'"
]
},
"execution_count": 3,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -92,21 +89,21 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"outlier filter 11197\n",
"passed 8989\n",
"clustering filter 6542\n",
"scrublet filter 4819\n",
"initial filter 123\n",
"passed 2389\n",
"initial filter 338\n",
"scrublet filter 274\n",
"outlier filter 229\n",
"clustering filter 174\n",
"Name: qclus, dtype: int64"
]
},
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -414,7 +411,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.9.13"
},
"orig_nbformat": 4,
"vscode": {
Expand Down

0 comments on commit 9426eda

Please sign in to comment.