Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
25
Task/FASTA-format/11l/fasta-format.11l
Normal file
25
Task/FASTA-format/11l/fasta-format.11l
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
V FASTA =
|
||||
|‘>Rosetta_Example_1
|
||||
THERECANBENOSPACE
|
||||
>Rosetta_Example_2
|
||||
THERECANBESEVERAL
|
||||
LINESBUTTHEYALLMUST
|
||||
BECONCATENATED’
|
||||
|
||||
F fasta_parse(infile_str)
|
||||
V key = ‘’
|
||||
V val = ‘’
|
||||
[(String, String)] r
|
||||
L(line) infile_str.split("\n")
|
||||
I line.starts_with(‘>’)
|
||||
I key != ‘’
|
||||
r [+]= (key, val)
|
||||
key = line[1..].split_py()[0]
|
||||
val = ‘’
|
||||
E I key != ‘’
|
||||
val ‘’= line
|
||||
I key != ‘’
|
||||
r [+]= (key, val)
|
||||
R r
|
||||
|
||||
print(fasta_parse(FASTA).map((key, val) -> ‘#.: #.’.format(key, val)).join("\n"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue