Hi,
Could someone explain to me why this works
#!/bin/env icarus
$rules={
entry: ~ {$In:[file:text] $Out pre{$Skip:0}}
('>' {$Not} ln)*
'>' {$entryFip=$Fip $Wrt}
('>' {$Not} ln {$App})*
~
ln: ~ /[^\n]*\n/ ~
}
if:$TestMode {
$job = $JobNew:[prod:$rules skip:" "
fileName:'/fasta/format/file']
while:$JobHasInput:$job {
$JobTokens:[$job name:entry print:1]
$JobNext:$job
}
}
but this doesn't, because it only gets the first entry in the file
#!/bin/env icarus
$rules={
data: ~ {$In:[file:text] $Out pre{$Skip:0}}
ln {$Wrt} (ln {$App})*
~
entry: ~ {$In:data $Out}
('>' {$Not} ln)*
'>' {$entryFip=$Fip $Wrt}
('>' {$Not} ln {$App})*
~
ln: ~ /[^\n]*\n/ ~
}
if:$TestMode {
$job = $JobNew:[prod:$rules skip:" "
fileName:'/fasta/format/file']
while:$JobHasInput:$job {
$JobTokens:[$job name:entry print:1]
$JobNext:$job
}
}
The example is a bit contrived, but I need to break up a file into bits
before parsing because the data for each entry is non-contiguous, and I
can't get it to work.
Many thanks for suggestions
Tim
--
Dr. Tim Dudgeon Phone: 01865 748747
British Biotech Pharmaceuticals Ltd. FAX: 01865 717598
Watlington Road, Oxford, OX4 5LY, UK email: dudgeon at britbio.co.uk