Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
3.0.2: Fixed improper sorting of output bed/txt
  • Loading branch information
msbentsen committed Mar 21, 2019
1 parent fe29605 commit 23f08cb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions setup.py
@@ -1,5 +1,18 @@
import os
import re
from setuptools import setup

#Path of setup file to establish version
setupdir = os.path.abspath(os.path.dirname(__file__))

def find_version(init_file):
version_file = open(init_file).read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
else:
raise RuntimeError("Unable to find version string.")

def readme():
with open('README.md', encoding='utf-8') as f:
return f.read()
Expand Down
1 change: 1 addition & 0 deletions uropa/__init__.py
@@ -0,0 +1 @@
__version__ = "3.0.2"
5 changes: 3 additions & 2 deletions uropa/uropa.py
Expand Up @@ -27,6 +27,7 @@
#Import internal functions
from uropa.utils import *
from uropa.annotation import *
from uropa import __version__ as VERSION

def restricted_float(f, f_min, f_max):
f = float(f)
Expand Down Expand Up @@ -80,7 +81,7 @@ def main():
#additional.add_argument("--add-comments",help="add comment lines to output files", action="store_true")
additional.add_argument("-l","--log", help="Log file name for messages and warnings (default: log is written to stdout)", action="store", metavar="uropa.log")
additional.add_argument("-d","--debug",help="Print verbose messages (for debugging)", action="store_true")
additional.add_argument("-v","--version",help="Prints the version and exits", action="version",version="%(prog)s 3.0.1")
additional.add_argument("-v","--version", help="Prints the version and exits", action="version", version="%(prog)s " + VERSION)
args = parser.parse_args()

#Write help if no input was given
Expand Down Expand Up @@ -410,7 +411,7 @@ def main():

#Sort on peak_ids
all_hits["original_order"] = [internal_peak_ids.index(peak_id) for peak_id in all_hits["internal_peak_id"]] #map position
all_hits.sort_values(by=["original_order", "feat_start", "feat_end"])
all_hits.sort_values(by=["original_order", "feat_start"], inplace=True)

#All hits
logger.debug("Writing _allhits.txt")
Expand Down

0 comments on commit 23f08cb

Please sign in to comment.