Mercurial > repos > abims-sbr > cds_search
comparison scripts/dico.py @ 3:ff98ed7849fa draft
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit cf1b9c905931ca2ca25faa4844d45c908756472f
| author | abims-sbr |
|---|---|
| date | Wed, 17 Jan 2018 08:55:29 -0500 |
| parents | |
| children | 35e39b4128ba |
comparison
equal
deleted
inserted
replaced
| 2:0d2f72caea10 | 3:ff98ed7849fa |
|---|---|
| 1 import string | |
| 2 | |
| 3 def dico(F1): | |
| 4 dicoco = {} | |
| 5 while 1: | |
| 6 next2 = F1.readline() | |
| 7 if not next2: | |
| 8 break | |
| 9 if next2[0] == ">": | |
| 10 fasta_name_query = next2[:-1] | |
| 11 Sn = string.split(fasta_name_query, "||") | |
| 12 fasta_name_query = Sn[0] | |
| 13 next3 = F1.readline() | |
| 14 fasta_seq_query = next3[:-1] | |
| 15 dicoco[fasta_name_query]=fasta_seq_query | |
| 16 return(dicoco) |
