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/Tcl/fasta-format.tcl
Normal file
16
Task/FASTA-format/Tcl/fasta-format.tcl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
proc fastaReader {filename} {
|
||||
set f [open $filename]
|
||||
set sep ""
|
||||
while {[gets $f line] >= 0} {
|
||||
if {[string match >* $line]} {
|
||||
puts -nonewline "$sep[string range $line 1 end]: "
|
||||
set sep "\n"
|
||||
} else {
|
||||
puts -nonewline $line
|
||||
}
|
||||
}
|
||||
puts ""
|
||||
close $f
|
||||
}
|
||||
|
||||
fastaReader ./rosettacode.fas
|
||||
Loading…
Add table
Add a link
Reference in a new issue