Skip to content

Commit

Permalink
Merge pull request #33 from yhoogstrate/dev
Browse files Browse the repository at this point in the history
Minor changes that have no impact on the function
  • Loading branch information
yhoogstrate committed Apr 5, 2016
2 parents 6d6a030 + 99f4fbf commit 8b9115f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2016-04-05 Youri Hoogstrate

* Version 3.0.1: Added a simple break statement ensures that the output is
in the order of the number of datasets in which a fusion gene is being
found.

The logging function now does not skip the 100.0% which was caused in some
cases occured due to a rounding artefact.

2016-04-01 Youri Hoogstrate

* Version 3.0.0: The core has been rewritte because it needed to use much
Expand Down
8 changes: 4 additions & 4 deletions fuma/ComparisonTriangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def overlay_fusions_recursive(self,fh,merged_fusions):
export_fusions = [tmp for tmp in merged_fusions]
merged_fusions_new = []

for y,fusion_y in self:
for x in range(len(merged_fusions)):
for x in range(len(merged_fusions)):
for y,fusion_y in self:
merged_fusion_x = merged_fusions[x]
n_total, passed, previous_percentage = self.log_progress(n_total, passed, previous_percentage)

Expand All @@ -122,9 +122,9 @@ def overlay_fusions_recursive(self,fh,merged_fusions):
if comparison != False:
export_fusions[x] = None
merged_fusions_new.append(comparison)
break

passed += 1

n_total, passed, previous_percentage = self.log_progress(n_total, passed, previous_percentage)

merged_fusions_new = self.prune_duplicates(merged_fusions_new)
Expand All @@ -148,7 +148,7 @@ def prune_duplicates(self,merged_fusions):
def log_progress(self,n_total, passed, previous_percentage):
# Print percentage - doesn't entirely fit yet
percentage = 100.0 * (float(passed) / float(n_total))
if percentage >= previous_percentage + 5.0:# Repport each 5%
if percentage >= previous_percentage + 5.0 or passed == n_total:# Repport each 5%
self.logger.debug(str(round(percentage,1))+"% completed")
previous_percentage = percentage
return n_total, passed, previous_percentage
Expand Down
2 changes: 1 addition & 1 deletion fuma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<http://epydoc.sourceforge.net/manual-fields.html#fields-synonyms>
"""

__version_info__ = ('3', '0', '0')
__version_info__ = ('3', '0', '1')
__version__ = '.'.join(__version_info__) if (len(__version_info__) == 3) else '.'.join(__version_info__[0:3])+"-"+__version_info__[3]
__author__ = 'Youri Hoogstrate'
__homepage__ = 'https://github.com/yhoogstrate/fuma'
Expand Down

0 comments on commit 8b9115f

Please sign in to comment.