Commit 55c26a79 authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

fixed remnants of chdir bugs

parent 86f4750c
......@@ -131,7 +131,7 @@ def call_makeBN(mod,dataset,left_out):
removecall = "rm "+ +"../models/"+bayesname
subprocess.call(removecall, shell=True)
#if not os.path.isfile(bayesname), changed for cross-validation; always remake the model
if not os.path.isfile(bayesname):
if not os.path.isfile("../models/"+bayesname):
aln_list = pickle.load(open("../models/"+dataset + "_aligned_modulegraphs.cPickle",'rb'))
g_list = pickle.load(open("../models/"+dataset + "_one_of_each_graph.cPickle",'rb'))
pdb_names = pickle.load(open("../models/"+dataset + "_PDB_names.cPickle",'rb'))
......@@ -163,7 +163,8 @@ def call_makeBN(mod,dataset,left_out):
motif = make_graph_from_carnaval(g, aln_dict)
pwm = BN_builder.build_pwm(motif.nodes(),aln_dict)
bob = BN_builder.build_BN(motif,pwm,aln_dict)
pickle.dump(bob,open(bayesname,'wb'))
#print("STORING BAYES NET")
pickle.dump(bob,open("../models/"+bayesname,'wb'))
#pdb_list = get_pdb_list(pdb_names[current_ID])
#pickle.dump(seqs,open("seqs_"+str(bayesname),'wb'))
......
......@@ -233,7 +233,7 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
if "T" in input:
input = input.upper()
input = str(input).replace("T", "U")
sequences = [input]
sequences = [input]
if len(input) <= 200:
maxs = run_BP(input, ss, modules_to_parse, dataset, "NONE", m, n, sm, mc, p, k,sscons)
all_maxes = []
......@@ -412,7 +412,7 @@ if __name__ == "__main__":
modules_to_check = range(len(graphs))
# executes BayesPairing on the sequence
print(run_fasta(seq, modules_to_check, dataset, ss, arguments))
print(run_fasta(seq, modules_to_check, dataset, ss, arguments)[0])
#if __name__ != "__main__":
# parse_sequences("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
This diff is collapsed.
......@@ -135,11 +135,11 @@
 
%% Cell type:code id: tags:
 
``` python
%run ../src/parse_sequences.py -d rna3dmotif \
-seq "GGACUCGGGGUGCCCUUCUGCGUGAAGGCUGAGAAAUACCCGUAUCACCUGAUCUGGAUAAUGCCAGCGUAGGGAAGUUC" -t 14 -p 25000 -o normal_modules
-seq "GGACUCGGGGUGCCCUUCUGCGUGAAGGCUGAGAAAUACCCGUAUCACCUGAUCUGGAUAAUGCCAGCGUAGGGAAGUUC" -t 15.7 -p 25000 -o normal_modules
```
 
%% Cell type:markdown id: tags:
 
## Assessing false positive predictions
......@@ -515,10 +515,11 @@
3D2V junction (thaliana form : 68/72
T - loop : 108/109
 
We can observe that low sample size leads to imprecise results, but as we get closer to 100,000 sample size, the results of the cross-validation are very close to what was reported so far in this notebook, which makes sense since the signal is mostly encoded in the relative position of the nucleotides, more than it is in their exact sequence.
 
In total, 81 of the 109 sequences show signal for the combination of the three-way junction module and the T-loop with cross-validation.
 
%% Cell type:code id: tags:
 
``` python
import pickle
......
Markdown is supported
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