Cuneiform (programming language): Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 172:
===Version 1===
 
In its first draft, Cuneiform was closely related to [[Make (software)|Make]] in that it constructed a static data dependency graph which the interpreter traversed during execution. The major difference to later versions was the lack of conditionals or recursion. Also files were distinguished from strings by juxtaposing stringssingle-quoted string values with a tilde <code>~</code>. The script's query expression was introduced with the <code>target</code> keyword.
 
The following example script downloads a reference genome from an FTP server.
 
<pre>
declare variant-call02;
 
deftask download-fa( fa : ~path ~id ) *{
wget $path/$id.fa.gz
gunzip $id.fa.gz
mv $id.fa $fa
}*
 
ref-genome-path = ~'ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes';
ref-genome-id = ~'chr22';
 
ref-genome = apply(
task : download-fa
path : ref-genome-path
id : ref-genome-id
);
 
target ref-genome;
 
</pre>
 
===Version 2===