Skip to content

Commit

Permalink
submit ver1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejoon Lee authored and Sejoon Lee committed Jun 20, 2016
1 parent 179d01d commit 37405b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ncm.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ def classify(T):


def classifyNV(vec2Classify, p0Vec, p0S, p1Vec, p1S):
if abs(p0Vec - vec2Classify) + p0S > abs(p1Vec - vec2Classify) - p1S:
return abs((abs(p0Vec - vec2Classify) + p0S )/ (abs(p1Vec - vec2Classify) - p1S )), 1
if abs(p0Vec - vec2Classify) - p0S > abs(p1Vec - vec2Classify) - p1S:
return abs((abs(p0Vec - vec2Classify) - p0S )/ (abs(p1Vec - vec2Classify) - p1S )), 1
else:
return abs((abs(p0Vec - vec2Classify) + p0S) / (abs(p1Vec - vec2Classify) - p1S)), 0
return abs((abs(p0Vec - vec2Classify) - p0S) / (abs(p1Vec - vec2Classify) - p1S)), 0

# if depth < 5:
# if (vec2Classify >= (p1Vec - p1S)):
Expand Down
6 changes: 3 additions & 3 deletions ncm_fastq.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ def createDataSetFromDir_test(base_dir, bedFile,order):


def classifyNV(vec2Classify, p0Vec, p0S, p1Vec, p1S):
if abs(p0Vec - vec2Classify) + p0S > abs(p1Vec - vec2Classify) - p1S:
return abs((abs(p0Vec - vec2Classify) + p0S )/ (abs(p1Vec - vec2Classify) - p1S )), 1
if abs(p0Vec - vec2Classify) - p0S > abs(p1Vec - vec2Classify) - p1S:
return abs((abs(p0Vec - vec2Classify) - p0S )/ (abs(p1Vec - vec2Classify) - p1S )), 1
else:
return abs((abs(p0Vec - vec2Classify) + p0S) / (abs(p1Vec - vec2Classify) - p1S)), 0
return abs((abs(p0Vec - vec2Classify) - p0S) / (abs(p1Vec - vec2Classify) - p1S)), 0


def getPredefinedModel(depth):
Expand Down

0 comments on commit 37405b5

Please sign in to comment.