Commit 47f94660 authored by Yixiong Sun's avatar Yixiong Sun
Browse files

Error with module position in very long sequences in ss validation. Skipped for now.

parent d8468622
......@@ -430,8 +430,13 @@ def run_validation(module_number, BNs, module_sequences, target_sequences,test_i
if ss:
modpos = aiming_for
constraints = testSS.get_constraints_from_BN(graphs[module_number][test_indexes[i]], modpos)
print(constraints, modpos)
constrained_ss = ["."] * len(new_seq)
for pp, cons in enumerate(constraints):
# if out of bounds, skip this sequence for now
if len(constrained_ss) < modpos[pp]:
continue
constrained_ss[modpos[pp]] = constraints[pp]
constraints = "".join(constrained_ss)
print("CALLING RNAFOLD WITH CONSTRAINTS", constraints)
......@@ -553,7 +558,7 @@ if __name__ == "__main__":
# Test all the modules
modules_to_test = list(range(0, len(graphs)))
#modules_to_test = [0,1,2,3,4]
#modules_to_test = [182]
# Output file name
file_name = "2fold_cv_" + DATASET_NAME
......@@ -563,6 +568,7 @@ if __name__ == "__main__":
file_name += "_ss"
file_name += ".pickle"
# Run 2 fold CV
two_fold_CV(modules_to_test=modules_to_test, output_file=file_name, shuffle=args.shuffle, ss=args.ss)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment