(Oct-15-2016, 07:43 PM)Larz60+ Wrote: Hello again,
I would like to take a closer look at how this data is exactly laid out.
Is this from the ncbi blast database? and if so, which file.
I would rather be working with an actual file.
Larz60+
Hello. I dont know actually if its from the ncbi database or not I've got the file from someone else and I dont know where they've got it. :s!
How do you attach or send a file here? I cant seem to find it in here :huh:
(Oct-15-2016, 07:35 PM)wavic Wrote: Does this work? It's not I've proposed. It's step by step. If the file doesn't contain something else...
def get_data(f): data = f.read().split() ecoli = dict() e_name = None for row in data: if row.startswith(">"): e_name = row.strip(">") ecoli[e_name] = "" else: ecoli[e_name] = "{}{}".format(ecoli[e_name], row) return ecoli
I got an error for data=f.read().split() so I tried to change it to data = open(f).read().split() and I got no error but the output were only the values and also not in a dictionary. :-/