Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/FASTA-format/Scheme/fasta-format.ss
Normal file
16
Task/FASTA-format/Scheme/fasta-format.ss
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
(import (scheme base)
|
||||
(scheme file)
|
||||
(scheme write))
|
||||
|
||||
(with-input-from-file ; reads text from named file, one line at a time
|
||||
"fasta.txt"
|
||||
(lambda ()
|
||||
(do ((first-line? #t #f)
|
||||
(line (read-line) (read-line)))
|
||||
((eof-object? line) (newline))
|
||||
(cond ((char=? #\> (string-ref line 0)) ; found a name
|
||||
(unless first-line? ; no newline on first name
|
||||
(newline))
|
||||
(display (string-copy line 1)) (display ": "))
|
||||
(else ; display the string directly
|
||||
(display line))))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue