FASTA format: Difference between revisions
→version 1: rewritten
(Added Easylang) |
Walterpachl (talk | contribs) (→version 1: rewritten) |
||
Line 1,975:
===version 1===
This REXX version correctly processes the examples shown.
<syntaxhighlight lang="rexx">/*REXX program reads a (bio-informational)
If ifid=='' Then
d=''
Do While lines(ifid)\==0
x=strip(linein(ifid),'T') /* read a line (a record) from the input */
/* and strip trailing blanks
If left(x,1)=='>' Then Do /* a new file id
Call out /* show output name
name=substr(x,2) /* and get the new (or first)
d=''
End
Else
End
Call out /* show output of last file used. */
Exit
out:
If d\=='' Then /* if there ara data */
Say name':' d /* show output name and data */
Return</syntaxhighlight>
{{out|output|text= when using the default input filename:}}
<pre>
|