Skip to content

Commit

Permalink
Merge pull request #47 from 4dn-dcic/versions
Browse files Browse the repository at this point in the history
Versions
  • Loading branch information
SooLee authored Mar 27, 2020
2 parents 5a5f588 + ae153f2 commit c7faa15
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 31 deletions.
23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ The hic parsing code is based off the [straw project](https://github.com/theaide
$ pip install hic2cool
```

You can also download the code directly and run the setup yourself.
```
# setuptools >=42 is recommended
$ python setup.py install
```

Once the package is installed, the main method is hic2cool_convert. It takes the same parameters as hic2cool.py, described in the next section. Example usage in a Python script is shown below or in test.py.
```
from hic2cool import hic2cool_convert
Expand All @@ -31,21 +37,6 @@ The main use of hic2cool is converting between filetypes using `hic2cool convert
$ hic2cool convert <infile> <outfile> -r <resolution> -p <nproc>
```

You can also download the code directly and run the setup yourself. First ensure that dependencies are installed:
```
$ pip install -r requirements.txt
```

You can alternatively build the hic2cool package with:
```
$ python setup.py install
```

Then, execute the Python code from the root directory with:
```
$ python -m hic2cool convert <infile> <outfile> -r <resolution> -p <nproc>
```

### Arguments for hic2cool convert

**infile** is a .hic input file.
Expand Down Expand Up @@ -128,6 +119,8 @@ You may also provide the optional `-e` flag, which will cause the mitchondrial c


## Changelog
### 0.8.1
* `setup.py` takes dependencies directly from `requirements.txt` (`requirements.txt` updated to match `setup.py`)
### 0.8.0
* multiprocessing support for convert
* change in usage of convert API due to the addition of the `nproc` option
Expand Down
2 changes: 1 addition & 1 deletion hic2cool/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.0"
__version__ = "0.8.1"
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
h5py==2.8.0
pandas==0.24.2
numpy==1.16.3
scipy==1.2.1
cooler==0.8.5
h5py>=2.8.0
numpy>=1.10.1,<=1.16.3
scipy<=1.2.1
pandas<=0.24.2
cooler>=0.8.5
13 changes: 3 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,9 @@
with io.open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

# dependencies must be handled carefully for py2 and py3 compatibility
# specifically, scipy==1.3.0
requires = [
'h5py>=2.8.0',
'numpy>=1.10.1,<=1.16.3',
'scipy<=1.2.1',
'pandas<=0.24.2',
'cooler>=0.8.5'

]
with open('requirements.txt') as f:
set_parsed = f.read().splitlines()
requires = [req.strip() for req in set_parsed if 'git+' not in req]

this_version = io.open(path.join(this_directory, "hic2cool/_version.py")).readlines()[-1].split()[-1].strip("\"'")

Expand Down

0 comments on commit c7faa15

Please sign in to comment.