孕妇耳鸣是什么原因引起的| 没有高中毕业证有什么影响| 李克勤属什么生肖| 五劳七伤什么生肖| 山竹什么时候吃是应季| 规培护士是什么意思| 诸事顺遂是什么意思| 心绞痛是什么原因| 地贫是什么意思| 副检察长什么级别| sport什么品牌| 结肠炎有什么症状| 扁桃体化脓吃什么药| 清华大学什么时候成立| 紫癜是什么病| 缺维生素d吃什么| 电压高是什么原因造成| 女性白细胞高是什么原因| 温暖如初是什么意思| 脚凉是什么原因造成的| 身上发抖是什么原因| 浸润是什么意思| 阅后即焚什么意思| 结节是什么东西| 流口水是什么病| 一个月来两次月经是什么原因| 泪崩是什么意思| 冰箱不制冷是什么原因| 血脂高吃什么水果最好| 嗜睡是什么原因| 吃什么胎儿眼睛黑又亮| 人模狗样是什么生肖| 表述是什么意思| 纳字五行属什么| 尿量少是什么原因| 怀孕初期有什么反应| 做狐臭手术挂什么科| 貔貅长什么样| 为什么不建议年轻人做肠镜| 值神天刑是什么意思| 婴儿便秘怎么办什么方法最有效| 检查尿酸挂什么科| 中成药是什么意思| 主播是什么意思| 眼睛突然出血是什么原因导致| 运动后体重增加是什么原因| 亲亲抱抱举高高什么意思| 邹去掉耳朵旁读什么| 胆囊检查做什么检查| 红斑狼疮是一种什么病| 扫把和什么是一套的| 明月几时有的下一句是什么| 女人怕冷是什么原因| 回民为什么不吃猪肉| 什么的花| 吃知柏地黄丸有什么副作用| pcr是什么| 辛弃疾字什么| 职位是什么意思| 本科和专科是什么意思| 女性尿道炎吃什么药| 尔时是什么意思| 柳絮吃了有什么好处| 藤茶有什么功效| 舌苔发黄是什么原因| 煮虾放什么调料| 脖子落枕贴什么膏药| 史无前例是什么意思| 头发分叉是什么原因| k是什么元素| 脂肪瘤看什么科| 老年人吃什么奶粉好| 下身有点刺痛什么原因| 肉刺长什么样子图片| 心跳太慢吃什么药| 胃病四联疗法是什么药| 一孕傻三年是什么意思| 狂犬病是什么| 充电宝100wh是什么意思| 什么饼干养胃最好| 女人的排卵期是什么时候| 脾脏是人体的什么器官| 防微杜渐什么意思| 羟苯乙酯是什么| 抗结剂对人有什么伤害| 音字五行属什么| 为什么不吃猪肉| 胸闷气短吃什么药效果好| 兔子吃什么蔬菜| 小三阳是什么意思| 今年农历什么年| 老人尿失禁吃什么药最好| 程门立雪是什么意思| 什么原因引起尿路感染| brat什么意思| 初潮是什么意思| 72年属什么| 女性血热吃什么好得快| 什么油适合炒菜| 天蝎座男生喜欢什么样的女生| 什么主筋骨| 心脏在什么位置图片| 汉字最多笔画是什么字| 头晕出虚汗是什么原因引起的| 黄褐斑内调吃什么中药| 鱼周念什么| 凶宅是什么意思| 夜间睡觉口干口苦是什么原因| 火什么银花| 什么发抖| 高血糖能吃什么水果| 天德合是什么意思| 单抗是什么药| 什么是新陈代谢| 甲状腺密度不均匀是什么意思| 皮肤瘙痒用什么药膏| 奸诈是什么意思| igg抗体阳性是什么意思| 检查肾脏挂什么科| 张国荣什么时候去世的| 胃窦炎是什么原因引起的| 双手抱在胸前代表什么| dd什么意思| 草是什么意思| 男孩子什么时候刮胡子| 怀孕了有什么征兆| 糖尿病吃什么水果| 蛔虫长什么样| 硬化萎缩性苔藓是什么病| 土色是什么颜色的图片| 长歌怀采薇是什么意思| 老是流鼻血是什么原因| 三月十五是什么星座| 生理期可以吃什么| 子宫直肠窝积液是什么意思| 男命食神代表什么| 私奔是什么意思| 衣原体感染男性吃什么药| 如履薄冰是什么意思| 开救护车需要什么驾照| 昶字五行属什么| 云南小黄姜有什么功效| 萘普生是什么药| 亚麻跌是什么意思| 副作用是什么意思| 菠菜和豆腐为什么不能一起吃| 巴戟天为什么要抽芯| 茶不能和什么一起吃| 888是什么意思| 尿潜血阳性什么意思| 什么能解酒| 梦到买房子是什么意思| 过期牛奶可以做什么| 智齿什么时候开始长| 生肖马和什么生肖相冲| 薄熙来为什么被抓| 做梦结婚是什么征兆| 为什么会长花斑癣| 风土人情是什么意思| 小乌龟死了有什么预兆| 安宫牛黄丸什么时候吃| 男才女貌是什么意思| 什么叫集体户口| 不善言辞是什么意思| 常吃火龙果有什么好处| 对食什么意思| 肌酐高有什么危害| 半夜吃什么不会胖| 8月2号是什么星座| 碘伏是什么| 今天穿什么| 75年属什么的生肖| 什么叫偏财| 震颤是什么症状| 酒喝多了喝什么解酒| 宝宝不爱喝水有什么好的办法吗| 9月三号是什么日子| 驴胶补血颗粒什么时候喝最好| 吉加页读什么| hpv52型阳性是什么意思严重吗| 天门冬氨酸氨基转移酶是什么| 今天过生日是什么星座| 黄历冲生肖是什么意思| 吃什么水果降火| 肚脐左下方疼是什么原因| 甲钴胺的副作用是什么| 什么叫心悸| 为什么夏天容易拉肚子| 七年之痒是什么意思| 舌头有红点是什么原因| 私生粉是什么意思| 心眼是什么意思| 营养过剩会导致什么| 哈喽是什么意思| 放养是什么意思| 牙疼喝什么药| 劓刑是什么意思| 急救物品五定是什么| 星期天为什么不叫星期七| 肝斑一般在脸上的什么地方| 橡皮泥可以做什么| 甲沟炎医院挂什么科| 很nice什么意思| 萩是什么意思| 低压高吃什么降压药好| 苍蝇最怕什么| 免是什么意思| 乾字五行属什么| ca724是什么意思| 什么茶减肥效果最好| 疏肝解郁是什么意思| 北海龙王叫什么| 胶质瘤是什么病| 菊花和枸杞泡水喝有什么功效| 喝盐水有什么作用和功效| 进国企需要什么条件| 428是什么意思| 梦见蛇是什么意思啊| 不完全性右束支阻滞是什么意思| 做梦梦见离婚是什么意思| 炖排骨什么时候放盐最好| 真菌性外耳道炎用什么药| 糖尿病人吃什么水果最好| 什么是肾功能不全| 肠胃蠕动慢吃什么药| 字字珠玑是什么意思| 宫颈炎用什么药| 什么什么之什么| 达菲是什么药| 鸭肫是什么| lsa是什么胎位| 花园里面有什么| s代表什么意思| 淋巴细胞是什么意思| 绿杨春属于什么茶| 迪化是什么意思| e是什么单位| 什么的大叫| 凯乐石属于什么档次| aqi是什么| 大使是什么行政级别| 肺纤维化什么意思| 人格魅力什么意思| 哺乳期感冒可以吃什么药| 空腹吃西红柿有什么危害| 唐筛是检查什么| 南辕北辙的意思是什么| 低血压高吃什么药好| 扫地僧是什么意思| 吃什么补充蛋白质| 丢是什么意思| 籍贯是指什么| 长时间手淫有什么危害| 感冒吃什么菜| 御木本是什么档次| 鳌是什么意思| 口腔白斑是什么病| 燕窝什么时候吃好| 24节气分别是什么| 草莽是什么意思| 荞麦枕头有什么好处| 更年期吃什么药好| 急性肠胃炎可以吃什么食物| 什么火没有烟| 百度

美国企业界同声反对对华贸易战:给美家庭带来“毁灭性”影响

百度 人才工作千条万条,没有压实责任就会“打白条”。

Cuneiform is an open-source workflow language for large-scale scientific data analysis.[1][2] It is a statically typed functional programming language promoting parallel computing. It features a versatile foreign function interface allowing users to integrate software from many external programming languages. At the organizational level Cuneiform provides facilities like conditional branching and general recursion making it Turing-complete. In this, Cuneiform is the attempt to close the gap between scientific workflow systems like Taverna, KNIME, or Galaxy and large-scale data analysis programming models like MapReduce or Pig Latin while offering the generality of a functional programming language.

Cuneiform
Paradigmfunctional, scientific workflow
Designed?byJ?rgen Brandt
First?appeared2013
Stable release
3.0.4 / November?19,?2018?(2025-08-08)
Typing disciplinestatic, simple types
Implementation languageErlang
OSLinux, MacOS
LicenseApache License 2.0
Filename extensions.cfl
Websitecuneiform-lang.org
Influenced by
Swift (parallel scripting language)

Cuneiform is implemented in distributed Erlang. If run in distributed mode it drives a POSIX-compliant distributed file system like Gluster or Ceph (or a FUSE integration of some other file system, e.g., HDFS). Alternatively, Cuneiform scripts can be executed on top of HTCondor or Hadoop.[3][4][5][6]

Cuneiform is influenced by the work of Peter Kelly who proposes functional programming as a model for scientific workflow execution.[7][8] In this, Cuneiform is distinct from related workflow languages based on dataflow programming like Swift.[9]

External software integration

edit

External tools and libraries (e.g., R or Python libraries) are integrated via a foreign function interface. In this it resembles, e.g., KNIME which allows the use of external software through snippet nodes, or Taverna which offers BeanShell services for integrating Java software. By defining a task in a foreign language it is possible to use the API of an external tool or library. This way, tools can be integrated directly without the need of writing a wrapper or reimplementing the tool.[10]

Currently supported foreign programming languages are:

Foreign language support for AWK and gnuplot are planned additions.

Type system

edit

Cuneiform provides a simple, statically checked type system.[11] While Cuneiform provides lists as compound data types it omits traditional list accessors (head and tail) to avoid the possibility of runtime errors which might arise when accessing the empty list. Instead lists are accessed in an all-or-nothing fashion by only mapping or folding over them. Additionally, Cuneiform omits (at the organizational level) arithmetics which excludes the possibility of division by zero. The omission of any partially defined operation allows to guarantee that runtime errors can arise exclusively in foreign code.

Base data types

edit

As base data types Cuneiform provides Booleans, strings, and files. Herein, files are used to exchange data in arbitrary format between foreign functions.

Records and pattern matching

edit

Cuneiform provides records (structs) as compound data types. The example below shows the definition of a variable r being a record with two fields a1 and a2, the first being a string and the second being a Boolean.

let r : <a1 : Str, a2 : Bool> =
  <a1 = "my string", a2 = true>;

Records can be accessed either via projection or via pattern matching. The example below extracts the two fields a1 and a2 from the record r.

let a1 : Str = ( r|a1 );

let <a2 = a2 : Bool> = r;

Lists and list processing

edit

Furthermore, Cuneiform provides lists as compound data types. The example below shows the definition of a variable xs being a file list with three elements.

let xs : [File] =
  ['a.txt', 'b.txt', 'c.txt' : File];

Lists can be processed with the for and fold operators. Herein, the for operator can be given multiple lists to consume list element-wise (similar to for/list in Racket, mapcar in Common Lisp or zipwith in Erlang).

The example below shows how to map over a single list, the result being a file list.

for x <- xs do
  process-one( arg1 = x )
  : File
end;

The example below shows how to zip two lists the result also being a file list.

for x <- xs, y <- ys do
  process-two( arg1 = x, arg2 = y )
  : File
end;

Finally, lists can be aggregated by using the fold operator. The following example sums up the elements of a list.

  fold acc = 0, x <- xs do
    add( a = acc, b = x )
  end;

Parallel execution

edit

Cuneiform is a purely functional language, i.e., it does not support mutable references. In the consequence, it can use subterm-independence to divide a program into parallelizable portions. The Cuneiform scheduler distributes these portions to worker nodes. In addition, Cuneiform uses a Call-by-Name evaluation strategy to compute values only if they contribute to the computation result. Finally, foreign function applications are memoized to speed up computations that contain previously derived results.

For example, the following Cuneiform program allows the applications of f and g to run in parallel while h is dependent and can be started only when both f and g are finished.

let output-of-f?: File = f();
let output-of-g?: File = g();

h( f = output-of-f, g = output-of-g );

The following Cuneiform program creates three parallel applications of the function f by mapping f over a three-element list:

let xs?: [File] =
  ['a.txt', 'b.txt', 'c.txt'?: File];

for x <- xs do
  f( x = x )
 ?: File
end;

Similarly, the applications of f and g are independent in the construction of the record r and can, thus, be run in parallel:

let r : <a : File, b : File> =
  &lt;a = f(), b = g()&gt;;

Examples

edit

A hello-world script:

def greet( person : Str ) -> <out : Str>
in Bash *{
  out="Hello $person"
}*

( greet( person = "world" )|out );

This script defines a task greet in Bash which prepends "Hello " to its string argument person. The function produces a record with a single string field out. Applying greet, binding the argument person to the string "world" produces the record <out = "Hello world">. Projecting this record to its field out evaluates the string "Hello world".

Command line tools can be integrated by defining a task in Bash:

def samtoolsSort( bam : File ) -> <sorted : File>
in Bash *{
  sorted=sorted.bam
  samtools sort -m 2G $bam -o $sorted
}*

In this example a task samtoolsSort is defined. It calls the tool SAMtools, consuming an input file, in BAM format, and producing a sorted output file, also in BAM format.

Release history

edit
Version Appearance Implementation Language Distribution Platform Foreign Languages
1.0.0 May 2014 Java Apache Hadoop Bash, Common Lisp, GNU Octave, Perl, Python, R, Scala
2.0.x Mar. 2015 Java HTCondor, Apache Hadoop Bash, BeanShell, Common Lisp, MATLAB, GNU Octave, Perl, Python, R, Scala
2.2.x Apr. 2016 Erlang HTCondor, Apache Hadoop Bash, Perl, Python, R
3.0.x Feb. 2018 Erlang Distributed Erlang Bash, Erlang, Java, MATLAB, GNU Octave, Perl, Python, R, Racket

In April 2016, Cuneiform's implementation language switched from Java to Erlang and, in February 2018, its major distributed execution platform changed from a Hadoop to distributed Erlang. Additionally, from 2015 to 2018 HTCondor had been maintained as an alternative execution platform.

Cuneiform's surface syntax was revised twice, as reflected in the major version number.

Version 1

edit

In its first draft published in May 2014, Cuneiform was closely related to 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, recursion, or static type checking. Files were distinguished from strings by juxtaposing single-quoted string values with a tilde ~. The script's query expression was introduced with the target keyword. Bash was the default foreign language. Function application had to be performed using an apply form that took task as its first keyword argument. One year later, this surface syntax was replaced by a streamlined but similar version.

The following example script downloads a reference genome from an FTP server.

declare download-ref-genome;

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;

Version 2

edit
?
Swing-based editor and REPL for Cuneiform 2.0.3

The second draft of the Cuneiform surface syntax, first published in March 2015, remained in use for three years outlasting the transition from Java to Erlang as Cuneiform's implementation language. Evaluation differs from earlier approaches in that the interpreter reduces a query expression instead of traversing a static graph. During the time the surface syntax remained in use the interpreter was formalized and simplified which resulted in a first specification of Cuneiform's semantics. The syntax featured conditionals. However, Booleans were encoded as lists, recycling the empty list as Boolean false and the non-empty list as Boolean true. Recursion was added later as a byproduct of formalization. However, static type checking was introduced only in Version 3.

The following script decompresses a zipped file and splits it into evenly sized partitions.

deftask unzip( <out( File )>?: zip( File ) ) in bash *{
  unzip -d dir $zip
  out=`ls dir | awk '{print "dir/" $0}'`
}*

deftask split( <out( File )>?: file( File ) ) in bash *{
  split -l 1024 $file txt
  out=txt*
}*

sotu = "sotu/stateoftheunion1790-2014.txt.zip";
fileLst = split( file: unzip( zip: sotu ) );

fileLst;


Version 3

edit

The current version of Cuneiform's surface syntax, in comparison to earlier drafts, is an attempt to close the gap to mainstream functional programming languages. It features a simple, statically checked type system and introduces records in addition to lists as a second type of compound data structure. Booleans are a separate base data type.

The following script untars a file resulting in a file list.

def untar( tar?: File ) -> <fileLst?: [File]>
in Bash *{
  tar xf $tar
  fileLst=`tar tf $tar`
}*

let hg38Tar?: File =
  'hg38/hg38.tar';

let <fileLst = faLst?: [File]> =
  untar( tar = hg38Tar );

faLst;

References

edit
  1. ^ "Joergen7/Cuneiform". GitHub. 14 October 2021.
  2. ^ Brandt, J?rgen; Bux, Marc N.; Leser, Ulf (2015). "Cuneiform: A functional language for large scale scientific data analysis" (PDF). Proceedings of the Workshops of the EDBT/ICDT. 1330: 17–26.
  3. ^ "Scalable Multi-Language Data Analysis on Beam: The Cuneiform Experience by J?rgen Brandt". Erlang Central. Archived from the original on 2 October 2016. Retrieved 28 October 2016.
  4. ^ Bux, Marc; Brandt, J?rgen; Lipka, Carsten; Hakimzadeh, Kamal; Dowling, Jim; Leser, Ulf (2015). "SAASFEE: scalable scientific workflow execution engine" (PDF). Proceedings of the VLDB Endowment. 8 (12): 1892–1895. doi:10.14778/2824032.2824094.
  5. ^ Bessani, Alysson; Brandt, J?rgen; Bux, Marc; Cogo, Vinicius; Dimitrova, Lora; Dowling, Jim; Gholami, Ali; Hakimzadeh, Kamal; Hummel, Michael; Ismail, Mahmoud; Laure, Erwin; Leser, Ulf; Litton, Jan-Eric; Martinez, Roxanna; Niazi, Salman; Reichel, Jane; Zimmermann, Karin (2015). "Biobankcloud: a platform for the secure storage, sharing, and processing of large biomedical data sets" (PDF). The First International Workshop on Data Management and Analytics for Medicine and Healthcare (DMAH 2015).
  6. ^ "Scalable Multi-Language Data Analysis on Beam: The Cuneiform Experience". Erlang-factory.com. Retrieved 28 October 2016.
  7. ^ Kelly, Peter M.; Coddington, Paul D.; Wendelborn, Andrew L. (2009). "Lambda calculus as a workflow model". Concurrency and Computation: Practice and Experience. 21 (16): 1999–2017. doi:10.1002/cpe.1448. S2CID?10833434.
  8. ^ Barseghian, Derik; Altintas, Ilkay; Jones, Matthew B.; Crawl, Daniel; Potter, Nathan; Gallagher, James; Cornillon, Peter; Schildhauer, Mark; Borer, Elizabeth T.; Seabloom, Eric W. (2010). "Workflows and extensions to the Kepler scientific workflow system to support environmental sensor data access and analysis" (PDF). Ecological Informatics. 5 (1): 42–50. doi:10.1016/j.ecoinf.2009.08.008. S2CID?16392118.
  9. ^ Di Tommaso, Paolo; Chatzou, Maria; Floden, Evan W; Barja, Pablo Prieto; Palumbo, Emilio; Notredame, Cedric (2017). "Nextflow enables reproducible computational workflows". Nature Biotechnology. 35 (4): 316–319. doi:10.1038/nbt.3820. PMID?28398311. S2CID?9690740.
  10. ^ "A Functional Workflow Language Implementation in Erlang" (PDF). Retrieved 28 October 2016.
  11. ^ Brandt, J?rgen; Reisig, Wolfgang; Leser, Ulf (2017). "Computation semantics of the functional scientific workflow language Cuneiform". Journal of Functional Programming. 27. doi:10.1017/S0956796817000119. S2CID?6128299.
贫血是什么意思 打玻尿酸有什么副作用吗 太阳鱼吃什么食物 人什么什么什么 腮腺炎的症状是什么
一票制什么意思 科颜氏属于什么档次 八月五号是什么星座 孕妇口腔溃疡能用什么药 急性心力衰竭的急救措施是什么
脊灰疫苗是预防什么的 男人太瘦吃什么可以长胖 转氨酶偏高吃什么药 什么是被子植物 缺金的人戴什么最旺
手麻是什么情况 出气不顺畅是什么原因 雪中送炭是什么意思 高血钾是什么意思 焦虑症用什么药好
蜗牛有什么特点bfb118.com 经期可以喝什么茶hcv8jop9ns7r.cn 四个火字念什么hcv8jop7ns1r.cn 脸上过敏是什么症状hcv8jop2ns0r.cn 口腔上火是什么原因jingluanji.com
宫颈筛查hpv阳性是什么意思bfb118.com 说话不清楚去医院挂什么科baiqunet.com 相对而行是什么意思gysmod.com 990是什么意思hcv7jop9ns1r.cn 膝盖肿胀是什么原因hcv8jop1ns1r.cn
外翻是什么意思hcv9jop2ns8r.cn 长期贫血对身体有什么危害hcv7jop5ns6r.cn 何德何能是什么意思gangsutong.com AMI是什么病hcv8jop1ns1r.cn 六一年属什么生肖hcv8jop0ns3r.cn
蜈蚣怕什么东西hcv8jop6ns8r.cn 尿蛋白高吃什么食物好hcv9jop2ns3r.cn 什么东西含铅量高96micro.com lch是什么病hcv9jop1ns1r.cn 胃热是什么原因引起的tiangongnft.com
百度