From bb3abed55c62b9cc569553f96e2a3facecaa4305 Mon Sep 17 00:00:00 2001 From: Vasudha Jha Date: Fri, 7 Jul 2023 16:15:18 -0700 Subject: [PATCH] atrtibutes for git lfs + cleanup of requirements code --- .gitattributes | 1 + .gitignore | 2 + MANIFEST.in | 3 +- genoMapDemo.ipynb | 136 ++++++++++++++++++++++------------------------ main.py | 57 +++++++++---------- setup.py | 21 +------ 6 files changed, 101 insertions(+), 119 deletions(-) create mode 100644 .gitattributes create mode 100644 .gitignore diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4d06309 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +data/TM_data.csv filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c0f52fa --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__ +*.egg-info \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 596e5aa..aa080d6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,4 +4,5 @@ include README.md exclude genomap/genoNet.py exclude genomap/genoNetus.py recursive-exclude * __pycache__ -recursive-include data/readme.txt \ No newline at end of file +recursive-include data/readme.txt +include data/TM_data.csv \ No newline at end of file diff --git a/genoMapDemo.ipynb b/genoMapDemo.ipynb index 637dfd9..e16e01c 100644 --- a/genoMapDemo.ipynb +++ b/genoMapDemo.ipynb @@ -42,7 +42,7 @@ "import scipy.io as sio\n", "import numpy as np\n", "import scipy.io as sio\n", - "import genomap.genoNet as gNet\n", + "import genomap.genoNet.genoNet as gNet\n", "import os\n", "import torch\n", "from torch.utils.data import DataLoader, Dataset\n", @@ -56,7 +56,7 @@ "from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer\n", "from pyclustering.cluster import cluster_visualizer\n", "\n", - "from genomap.genoNet import geneDataset, get_device, load_genoNet, predict, traingenoNet, rescale\n", + "from genomap.genoNet.genoNet import geneDataset, get_device, load_genoNet, predict, traingenoNet, rescale\n", "from genomap import construct_genomap\n", "\n", "# For reproducibility\n", @@ -99,26 +99,24 @@ "# Creation of genomaps\n", "# Selection of row and column number of the genomaps \n", "# To create square genomaps, the row and column numbers are set to be the same.\n", - "colNum=31\n", - "rowNum=31\n", - "n=rowNum*colNum # Total number of pixels in genomaps\n", - "\n", - "\n", + "colNum = 31\n", + "rowNum = 31\n", + "n = rowNum*colNum # Total number of pixels in genomaps\n", "\n", "# When the dataset has more genes than number of pixels in the desired genomap,\n", "# select the first n most variable genes\n", - "if n