forked from yniknafs/taco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
outputs GTF with lost nodes change points written to splice graph GTF algorithm calculates lost nodes and lost expression
- Loading branch information
Showing
15 changed files
with
755 additions
and
344 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,14 @@ | |
__email__ = "[email protected]" | ||
__status__ = "Development" | ||
|
||
|
||
ChangePoint = namedtuple('ChangePoint', ['index', 'pvalue', | ||
'dist_left', 'dist_right', 'sign', 'foldchange']) | ||
ChangePoint = namedtuple('ChangePoint', ['index', 'dist_left', 'dist_right', | ||
'pos', 'start', 'end', | ||
'pvalue', 'foldchange', 'sign']) | ||
|
||
|
||
def run_changepoint(a, pval=0.05, fc_cutoff=0.80, size_cutoff=20, | ||
cp_func=mse_cython, smooth_window="hanning", | ||
smooth_window_len=75): | ||
smooth_window_len=11): | ||
''' | ||
Detects change points in 1D array 'a' by minimizing mean-squared error | ||
(MSE). Selected change points must have mannwhitneyu pvalue < 'pval' and | ||
|
@@ -130,8 +130,9 @@ def bin_seg_slope(a, s_a, pval=0.05, fc_cutoff=0.80, size_cutoff=20, | |
# TODO: when does this happen? | ||
if j != 0 and k != 0: | ||
# save changepoint | ||
cps.append(ChangePoint(index=i + offset, pvalue=p, dist_left=j, | ||
dist_right=k, sign=sign, foldchange=fc)) | ||
cps.append(ChangePoint(index=i+offset, dist_left=j, dist_right=k, | ||
pos=i+offset, start=i-j, end=i+k, | ||
pvalue=p, sign=sign, foldchange=fc)) | ||
# test left segment | ||
if (offset+i-j) > offset: | ||
b1 = a[:i-j] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.