Commit 852d2974 authored by Yuncong Yu's avatar Yuncong Yu
Browse files

Run through in windows.

parent 4ccc2bce
from distutils.core import setup, Extension
import numpy.distutils.misc_util
c_ext = Extension('_lsh', ['../lsh-fast/_lsh.cpp', '../lsh-fast/lsh.cpp'])
c_ext = Extension('_lsh', ['../../lsh-fast/_lsh.cpp', '../../lsh-fast/lsh.cpp'])
setup(
name='lsh',
......
import numpy as np
import pandas as pd
from libs import bigwig
import bbi
# from libs import bigwig
# import bbi
import dask.dataframe as dd
import os.path
from sklearn import preprocessing
......
......@@ -21,14 +21,18 @@ All dependencies are listed in the *environment.yml* file. To create an environm
This will create a conda environment named *pseudo*. Now activate the environment as follows:
`conda activate pseudo`
### Step 2: Creating the LSH package
### Step 2: Prepare backend - creating the LSH package
The LSH algorithm is maintained locally for now, so you'll have to create it manually. The file that you need to setup this package is located in the Flaskserver folder (this is more efficient when debugging, as for every change you have to rebuild the package). So the package can be created by running the following code:
`cd Flaskserver`
`python3 setup.py build_ext --inplace && python3 setup.py install`
`cd ..`
**NOTE 1**: So as a reminder, don't forget to run the 2nd line everytime you change something in the c++ code.
### Step 3: Running PSEUDo
### Step 3: Prepare frontend - install Node packages
The cloned Angular repository cannot be used directly. You have to install the node packages via
`cd Angular`
### Step 4: Running PSEUDo
As mentioned before, PSEUDo exists of a gui and a server. A Makefile is provided to setup both easily. Just run the following code for the server and gui respectively:
`make server`
`make gui`
......
......@@ -5,17 +5,20 @@ channels:
- defaults
dependencies:
- python
- dask[dataframe]
- flask
- numpy
- pandas
- flask_cors
- orjson
- dask[dataframe]
- jupyter
- matplotlib
- numpy
- orjson
- pandas
- pip
- scikit-learn
- tslearn
- pip:
- pybbi
- sklearn
- cooler
# - pybbi
# - cooler
- ucrdtw
- dtw-python
......@@ -378,7 +378,7 @@ int main() {
srand((unsigned int)time(NULL));
clock_t begin_time = clock();
FILE *data;
int M = 125621;
const int M = 125621;
int K = 2; //ln((ln(0.5))/ln(1-exp(-2*(0.1)^2*120)))/ln((1-exp(-2*(0.1)^2*120))/(0.5))
int L = 6; //ln(0.05)/(ln(1-(1-exp(-2(0.1)^2*120))^4))0.0653330009864134
int T = 120;
......@@ -397,7 +397,8 @@ int main() {
data = fopen("processed-data","r");
if( data == NULL )
exit(2);
char d[M]; int i; int j = 0; float f;
char d[M];
int i; int j = 0; float f;
while(fscanf(data,"%[^\n]\n",d) != EOF && j< M)
{
char *p = strtok(d," ");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment