Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
34
Task/FASTA-format/True-BASIC/fasta-format.basic
Normal file
34
Task/FASTA-format/True-BASIC/fasta-format.basic
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
DEF EOF(f)
|
||||
IF END #f THEN LET EOF = -1 ELSE LET EOF = 0
|
||||
END DEF
|
||||
|
||||
FUNCTION checknospaces(s$)
|
||||
FOR i = 1 TO LEN(s$)-1
|
||||
IF (s$)[i:1] = CHR$(32) OR (s$)[i:1] = CHR$(9) THEN LET checkNoSpaces = 0
|
||||
NEXT i
|
||||
LET checknospaces = 1
|
||||
END FUNCTION
|
||||
|
||||
OPEN #1: NAME "m:\input.fasta", org text, ACCESS INPUT, create old
|
||||
|
||||
LET first = 1
|
||||
DO WHILE (NOT EOF(1)<>0)
|
||||
LINE INPUT #1: ln$
|
||||
IF (ln$)[1:1] = ">" THEN
|
||||
IF (NOT first<>0) THEN PRINT
|
||||
PRINT (ln$)[2:maxnum]; ": ";
|
||||
IF first<>0 THEN LET first = 0
|
||||
ELSEIF first<>0 THEN
|
||||
PRINT "Error : File does not begin with '>'"
|
||||
EXIT DO
|
||||
ELSE
|
||||
IF checknospaces(ln$)<>0 THEN
|
||||
PRINT ln$;
|
||||
ELSE
|
||||
PRINT "Error : Sequence contains space(s)"
|
||||
EXIT DO
|
||||
END IF
|
||||
END IF
|
||||
LOOP
|
||||
CLOSE #1
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue