diff --git a/README.mkd b/README.mkd index 08c125d..30de7e9 100644 --- a/README.mkd +++ b/README.mkd @@ -16,7 +16,7 @@ The tool requires a standard [Python](http://python.org/) installation (2.7 and 3.3 or higher are supported) with the following modules: 1. [numpy](http://www.numpy.org/) version 1.8.2 or latest -2. [pandas](http://pandas.pydata.org/) version 0.14.1 or latest +2. [pandas](http://pandas.pydata.org/) version 0.17.1 or latest 3. [six](https://pythonhosted.org/six/) version 1.9.0 or latest The tool has been tested on *Linux* only, but should work on *MacOS* and diff --git a/pyplink/pyplink.py b/pyplink/pyplink.py index b44af26..35f24fa 100644 --- a/pyplink/pyplink.py +++ b/pyplink/pyplink.py @@ -198,7 +198,7 @@ def next(self): def _read_current_marker(self): """Reads the current marker and returns its genotypes.""" return self._geno_values[ - np.fromstring(self._bed.read(self._nb_bytes), dtype=np.uint8) + np.frombuffer(self._bed.read(self._nb_bytes), dtype=np.uint8) ].flatten(order="C")[:self._nb_samples] def seek(self, n): @@ -321,8 +321,8 @@ def get_nb_markers(self): def get_duplicated_markers(self): """Returns the duplicated markers, if any. - Args: - set: The set of duplicated marker (might be empty). + Returns: + dict: The set of duplicated marker (might be empty). """ if self._has_duplicated: @@ -398,7 +398,7 @@ def _read_bed(self): seek_index = self._get_seek_position(self._bim.iloc[-1, :].i) bed_file.seek(seek_index) geno = self._geno_values[ - np.fromstring(bed_file.read(self._nb_bytes), dtype=np.uint8) + np.frombuffer(bed_file.read(self._nb_bytes), dtype=np.uint8) ].flatten(order="C")[:self._nb_samples] if geno.shape[0] != self._nb_samples: raise ValueError("invalid number of entries: corrupted BED?") diff --git a/setup.py b/setup.py index e09bd84..913501f 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ MAJOR = 1 MINOR = 3 -MICRO = 4 +MICRO = 5 VERSION = "{}.{}.{}".format(MAJOR, MINOR, MICRO) @@ -42,7 +42,7 @@ def write_version_file(fn=None): def get_requirements(): # Initial requirements - requirements = ["numpy >= 1.8.2", "pandas >= 0.14.1", "six >= 1.9.0"] + requirements = ["numpy >= 1.8.2", "pandas >= 0.17.1", "six >= 1.9.0"] # Checking if python 2 (requires mock) if sys.version_info[0] == 2: @@ -62,7 +62,7 @@ def setup_package(): description="Python module to read binary Plink files.", author="Louis-Philippe Lemieux Perreault", author_email="louis-philippe.lemieux.perreault@statgen.org", - url="http://www.statgen.org", + url="https://github.com/lemieuxl/pyplink", license="MIT", packages=["pyplink", "pyplink.tests"], package_data={"pyplink.tests": ["data/*"], },