Skip to content

Commit

Permalink
creating new release
Browse files Browse the repository at this point in the history
  • Loading branch information
yjzhang committed Feb 14, 2019
1 parent e233f3e commit 86258a4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ UNCURL
:target: https://travis-ci.org/yjzhang/uncurl_python
.. image:: https://img.shields.io/pypi/v/uncurl-seq.svg
:target: https://pypi.python.org/pypi/uncurl-seq
.. image:: https://pepy.tech/badge/uncurl-seq
:target: https://pepy.tech/project/uncurl-seq


Installation
Expand All @@ -16,7 +18,7 @@ Alternatively, uncurl can be installed from source: After cloning the repository

Requirements: numpy, scipy, cython, scikit-learn

Tested on python 2.7, 3.4 on Linux.
Tested on python 2.7, 3.5 on Linux.

For parallel state estimation, OpenMP is required.

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
long_description = f.read()

setup(name='uncurl_seq',
version='0.2.11',
version='0.2.12',
description='Tool for pre-processing single-cell RNASeq data',
long_description=long_description,
long_description_content_type='text/x-rst',
Expand All @@ -48,6 +48,6 @@
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
zip_safe=False)
4 changes: 3 additions & 1 deletion uncurl/fit_dist_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def GetDistFitError(Dat):
#Assumes data to be in the form of a numpy matrix
# TODO: make this work for sparse inputs?
# TODO: fixed number of bins, rather than use the maximum value?
# that would
# use np.histogram
Dat = np.round(Dat).astype(int)
Dat2 = np.log(1 + Dat)
BinDat = np.zeros(max(Dat)+1)
Expand All @@ -27,6 +27,8 @@ def GetDistFitError(Dat):

#Create a bin of frequencies and generate frequencies based on distr
for i in range(0,len(BinDat)):
# this is EXTREMELY INEFFICIENT!!!!!
# n^2 since Dat==i requires iterating through the whole array
BinDat[i] = sum(Dat==i)
Poiss[i] = poisson.pmf(i,m)
Norm[i] = norm.pdf((i-m+1)/std)
Expand Down
4 changes: 2 additions & 2 deletions uncurl/gap_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
from sklearn.cluster import KMeans

def preproc_data(data, gene_subset=False):
def preproc_data(data, gene_subset=False, **kwargs):
"""
basic data preprocessing before running gap score
Expand Down Expand Up @@ -32,7 +32,7 @@ def calculate_bounding_box(data):
maxes = data.max(0)
return mins, maxes

def calculate_gap(data, clustering, km, B=50):
def calculate_gap(data, clustering, km, B=50, **kwargs):
"""
See: https://datasciencelab.wordpress.com/2013/12/27/finding-the-k-in-k-means-clustering/
Expand Down

0 comments on commit 86258a4

Please sign in to comment.