Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -1,16 +1,24 @@
|
|||
/*REXX program reads a (bio-informational) FASTA file and displays the contents. */
|
||||
parse arg iFID . /*iFID: the input file to be read. */
|
||||
if iFID=='' then iFID='FASTA.IN' /*Not specified? Then use the default.*/
|
||||
name= /*the name of an output file (so far). */
|
||||
$= /*the value of the output file's stuff.*/
|
||||
do while lines(iFID)\==0 /*process the FASTA file contents. */
|
||||
x=strip( linein(iFID), 'T') /*read a line (a record) from the file,*/
|
||||
/*───────── and strip trailing blanks. */
|
||||
if left(x, 1)=='>' then do
|
||||
if $\=='' then say name':' $
|
||||
name=substr(x, 2)
|
||||
$=
|
||||
end
|
||||
else $=$ || x
|
||||
end /*j*/ /* [↓] show output of last file used. */
|
||||
if $\=='' then say name':' $ /*stick a fork in it, we're all done. */
|
||||
/*REXX program reads a (bio-informational) FASTA file and displays the contents. */
|
||||
Parse Arg ifid . /* iFID: the input file to be read */
|
||||
If ifid=='' Then
|
||||
ifid='FASTA.IN' /* Not specified? Then use the default */
|
||||
name='' /* the name of an output file (so far) */
|
||||
d='' /* the value of the output file's */
|
||||
Do While lines(ifid)\==0 /* process the FASTA file contents */
|
||||
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 and data */
|
||||
name=substr(x,2) /* and get the new (or first) output name */
|
||||
d='' /* start with empty contents */
|
||||
End
|
||||
Else /* a line with data */
|
||||
d=d||x /* append it to output */
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,22 +1,28 @@
|
|||
/*REXX program reads a (bio-informational) FASTA file and displays the contents. */
|
||||
parse arg iFID . /*iFID: the input file to be read. */
|
||||
if iFID=='' then iFID='FASTA2.IN' /*Not specified? Then use the default.*/
|
||||
name= /*the name of an output file (so far). */
|
||||
$= /*the value of the output file's stuff.*/
|
||||
do while lines(iFID)\==0 /*process the FASTA file contents. */
|
||||
x=strip( linein(iFID), 'T') /*read a line (a record) from the file,*/
|
||||
/*───────── and strip trailing blanks. */
|
||||
if x=='' then iterate /*If the line is all blank, ignore it. */
|
||||
if left(x, 1)==';' then do
|
||||
if name=='' then name=substr(x,2)
|
||||
say x
|
||||
iterate
|
||||
end
|
||||
if left(x, 1)=='>' then do
|
||||
if $\=='' then say name':' $
|
||||
name=substr(x, 2)
|
||||
$=
|
||||
end
|
||||
else $=space($ || translate(x, , '*'), 0)
|
||||
end /*j*/ /* [↓] show output of last file used. */
|
||||
if $\=='' then say name':' $ /*stick a fork in it, we're all done. */
|
||||
/*REXX program reads a (bio-informational) FASTA file and displays the contents. */
|
||||
Parse Arg iFID . /*iFID: the input file to be read. */
|
||||
If iFID=='' Then iFID='FASTA2.IN' /*Not specified? Then use the default.*/
|
||||
name='' /*the name of an output file (so far). */
|
||||
data=''
|
||||
/*the value of the output file's stuff.*/
|
||||
Do While lines(iFID)\==0 /*process the FASTA file contents. */
|
||||
x=strip(linein(iFID),'T') /*read a line (a record) from the file,*/
|
||||
/*--------- and strip trailing blanks. */
|
||||
Select
|
||||
When x=='' Then /* If the line is all blank, */
|
||||
Nop /* ignore it. */
|
||||
When left(x,1)==';' Then Do
|
||||
If name=='' Then name=substr(x,2)
|
||||
Say x
|
||||
End
|
||||
When left(x,1)=='>' Then Do
|
||||
If data\=='' Then
|
||||
Say name':' data
|
||||
name=substr(x,2)
|
||||
data=''
|
||||
End
|
||||
Otherwise
|
||||
data=space(data||translate(x, ,'*'),0)
|
||||
End
|
||||
End
|
||||
If data\=='' Then
|
||||
Say name':' data /* [?] show output of last file used. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue