Mercurial > repos > abims-sbr > cds_search
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/dico.py Wed Jan 17 08:55:29 2018 -0500 @@ -0,0 +1,16 @@ +import string + +def dico(F1): + dicoco = {} + while 1: + next2 = F1.readline() + if not next2: + break + if next2[0] == ">": + fasta_name_query = next2[:-1] + Sn = string.split(fasta_name_query, "||") + fasta_name_query = Sn[0] + next3 = F1.readline() + fasta_seq_query = next3[:-1] + dicoco[fasta_name_query]=fasta_seq_query + return(dicoco)
