Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
27
Task/FASTA-format/FutureBasic/fasta-format.basic
Normal file
27
Task/FASTA-format/FutureBasic/fasta-format.basic
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
include resources "fasta.txt" // your fasta file
|
||||
|
||||
void local fn ReadFASTAFile( url as CFURLRef )
|
||||
open @"I", 1, url
|
||||
CFStringRef dta = @""
|
||||
while ( !eof(1) )
|
||||
CFStringRef string = line input 1
|
||||
if ( !len(string) ) then continue
|
||||
if ( fn StringHasPrefix( string, @">" ) )
|
||||
if ( len(dta) )
|
||||
print dta
|
||||
dta = @""
|
||||
end if
|
||||
dta = concat( dta, mid( string, 1 ), @": " )
|
||||
else
|
||||
dta = concat( dta, string )
|
||||
end if
|
||||
wend
|
||||
if ( len(dta) ) then print dta
|
||||
close 1
|
||||
end fn
|
||||
|
||||
CFURLRef url
|
||||
url = fn BundleURLForResource( fn BundleMain, @"fasta", @"txt", NULL ) // your fasta file name and extension
|
||||
if ( url ) then fn ReadFASTAFile( url )
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue