Commit 86f4750c authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

oups

parent df2e8f54
......@@ -121,13 +121,13 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
if "fa" in input.lower() and ss=="":
prediction_scores = {}
sequences = []
sequences = []
with open(input, "rU") as f:
for num, record in enumerate(SeqIO.parse(f, "fasta")):
id = record.id
seq = str(record.seq)
seq = seq.upper()
sequences.append(seq)
seq = seq.upper()
sequences.append(seq)
#print("PARSING SEQUENCE ", id, "\n")
if "T" in seq:
seq = str(seq).replace("T", "U")
......@@ -176,16 +176,16 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
elif "fa" in input.lower() and ss=="infile":
prediction_scores = {}
sequences = []
sequences = []
with open(input, "rU") as f:
lines = f.readlines()
for line_n in range(0, len(lines), 3):
id = lines[line_n].strip(">").strip("\n")
seq = lines[line_n+1].strip("\n").strip()
seq = seq.upper()
seq = seq.upper()
ss = lines[line_n+2].strip("\n").strip()
sequences.append(seq)
p#rint("PARSING SEQUENCE ", id, "\n")
sequences.append(seq)
#print("PARSING SEQUENCE ", id, "\n")
if "T" in seq:
seq = str(seq).replace("T", "U")
if len(seq) <= 200:
......@@ -231,9 +231,9 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
pickle.dump(prediction_scores,open("../output/"+o+".pickle","wb"))
else:
if "T" in input:
input = input.upper()
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 = []
......
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