@@ -9,7 +9,7 @@ msgstr ""
9
9
"Project-Id-Version : Common Workflow Language User Guide\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
11
"POT-Creation-Date : 2023-12-16 11:48+0100\n "
12
- "PO-Revision-Date : 2024-10-06 10:16 +0000\n "
12
+ "PO-Revision-Date : 2024-10-08 03:26 +0000\n "
13
13
"Last-Translator : Zoë Ma <zoe.ma@curii.com>\n "
14
14
"Language-Team : Chinese (Simplified Han script) <https://hosted.weblate.org/ "
15
15
"projects/commonwl/user-guide/zh_Hans/>\n "
@@ -3989,13 +3989,19 @@ msgid ""
3989
3989
"coded `Hello.java` file using the previously mentioned "
3990
3990
"`InitialWorkDirRequirement` requirement, before adding it to a tar file."
3991
3991
msgstr ""
3992
+ "另一种可能是采用更加特殊化的办法,避免作业文件中的外部依赖。在这个工作流中, "
3993
+ "我们可以利用前述 `InitialWorkDirRequirement` 需求,生成一个硬性编码的 `Hello."
3994
+ "java` 文件,然后将它添加到 tar 文件。"
3992
3995
3993
3996
#: ../../src/topics/workflows.md:366 66f76677f4ce42baa8a8813410ea5aee
3994
3997
msgid ""
3995
3998
"In this case our step can assume `Hello.java` rather than be "
3996
3999
"parameterized, so we can use hardcoded values `hello.tar` and "
3997
4000
"`Hello.java` in a `baseCommand` and the resulting `outputs`:"
3998
4001
msgstr ""
4002
+ "这种情况下,我们的步骤中可以直接以 `Hello.java` 为前提假定,无需参数化,"
4003
+ "从而在 `baseCommand` 以及产出的 `outputs` 中使用硬性编码的值 `hello.tar` 和 "
4004
+ "`Hello.java`:"
3999
4005
4000
4006
#: ../../src/topics/workflows.md:383 a8ccb9f9ab4448e087ea8448d620d33c
4001
4007
msgid ""
@@ -4005,6 +4011,10 @@ msgid ""
4005
4011
"reason for doing it in this case is because the command line is hard-"
4006
4012
"coded with filenames that only make sense within this workflow."
4007
4013
msgstr ""
4014
+ "您是否注意到,我们并没有将 `tar --create` 工具划分到一个独立的文件,"
4015
+ "而是嵌入到 CWL 工作流文件中?一般而言这样做并不是最合适的,将导致工具无法重复"
4016
+ "使用。在这个特例中,如此操作的原因是命令行已是硬性编码的,其中的文件名仅对这"
4017
+ "一个工作流有效。"
4008
4018
4009
4019
#: ../../src/topics/workflows.md:389 afe43b9e92e949a589f493293eff2903
4010
4020
msgid ""
@@ -4014,6 +4024,9 @@ msgid ""
4014
4024
"to compile, which would simplify its usage as a tool step in other "
4015
4025
"workflows."
4016
4026
msgstr ""
4027
+ "这个例子里我们不得不在外部创制 tar 文件,但这无非是因为我们将内部工作流设计成"
4028
+ "以该文件为输入。内部工作流更好的重整方式,可以是令其接受一个待编译 Java "
4029
+ "文件的列表,使之作为工具步骤用于其它工作流中时的用法得以简化。"
4017
4030
4018
4031
#: ../../src/topics/workflows.md:394 239eef3a740d42a69208a8f4e716d2b3
4019
4032
msgid ""
@@ -4022,10 +4035,12 @@ msgid ""
4022
4035
" Tool description, care must be taken to improve its usability in "
4023
4036
"multiple workflows."
4024
4037
msgstr ""
4038
+ "嵌套的工作流作为一种强大的功能,可以用于生成高阶函数和可复用的工作流单元——然"
4039
+ "而,正如创建 CWL 工具描述时一样,我们必须用心于提高它在多个工作流间的可用性。"
4025
4040
4026
4041
#: ../../src/topics/workflows.md:398 96d1ca78cc324f40b61c4b7330447db2
4027
4042
msgid "Scattering Steps"
4028
- msgstr ""
4043
+ msgstr "分散步骤 "
4029
4044
4030
4045
#: ../../src/topics/workflows.md:400 eab4437bf9994b649954221375e3dd6d
4031
4046
msgid ""
@@ -4037,6 +4052,11 @@ msgid ""
4037
4052
"allows you to run the same workflow on multiple inputs without having to "
4038
4053
"generate many different commands or input yaml files."
4039
4054
msgstr ""
4055
+ "了解了如何编写工作流,我们可以准备使用 `ScatterFeatureRequirement`. 该功能用"
4056
+ "于告诉运行程序,您打算对列表中的多个输入重复运行某个工具或者工作流。这样,工"
4057
+ "作流可以将输入作为数组,并对每个数组元素运行指定的步骤,如同单个输入一样。这"
4058
+ "样, 我们可以让同一工作流对多个输入运行,而无需生成多个不同的命令或者 YAML "
4059
+ "输入文件。"
4040
4060
4041
4061
#: ../../src/topics/workflows.md:411 c245ba0ae2074fa388ad6c35695033c8
4042
4062
msgid ""
@@ -4045,6 +4065,9 @@ msgid ""
4045
4065
"workflow that calls our first example (`hello_world.cwl`) and takes an "
4046
4066
"array of strings as input to the workflow:"
4047
4067
msgstr ""
4068
+ "用户第一次接触分散 (scatter) 功能,最主要的原因一般是为了对多个不同的样本进行"
4069
+ "同一分析。我们从一个简单的工作流出发,调用我们的第一个示例 (`hello_world."
4070
+ "cwl`), 并以一个字符串数组作为工作流的输入:"
4048
4071
4049
4072
#: ../../src/topics/workflows.md:415 83537938ce1244709f9b72269b048d63
4050
4073
msgid "`scatter-workflow.cwl`"
@@ -4054,13 +4077,14 @@ msgstr "`scatter-workflow.cwl`"
4054
4077
msgid ""
4055
4078
"Aside from the `requirements` section including "
4056
4079
"`ScatterFeatureRequirement`, what is going on here?"
4057
- msgstr ""
4080
+ msgstr "除了 `requirements` 代码段加入了 `ScatterFeatureRequirement` "
4081
+ "以外,还有什么新情况?"
4058
4082
4059
4083
#: ../../src/topics/workflows.md:429 ccbbba3189404241a44736c970249b84
4060
4084
msgid ""
4061
4085
"First of all, notice that the main workflow level input here requires an "
4062
4086
"array of strings."
4063
- msgstr ""
4087
+ msgstr "首先,请注意,主工作流级别的输入这时需要字符串数组。 "
4064
4088
4065
4089
#: ../../src/topics/workflows.md:441 31eff13bb8334fc7b6d48ef6c5b1ce33
4066
4090
msgid ""
@@ -4069,6 +4093,9 @@ msgid ""
4069
4093
" particular step. Note that the input name listed after scatter is the "
4070
4094
"one of the step's input, not a workflow level input."
4071
4095
msgstr ""
4096
+ "这里,我们在 `echo` 步骤下添加了名为 `scatter` "
4097
+ "的新字段。该字段告诉运行程序,我们希望让这一特定步骤对输入分散运行。请注意,"
4098
+ "\" scatter\" 后列出的输入名是该步骤的输入之一,而非工作流层面的输入。"
4072
4099
4073
4100
#: ../../src/topics/workflows.md:445 0d5cf8b82dbd47f2abd1ed16b9b3eb61
4074
4101
msgid ""
@@ -4077,10 +4104,13 @@ msgid ""
4077
4104
"you expect that the final output of your workflow will now have multiple "
4078
4105
"outputs to collect, be sure to update that to an array type as well!"
4079
4106
msgstr ""
4107
+ "我们第一次做分散,就是这么简单。因为我们的工具并不收集任何输出,"
4108
+ "我们仍然可以在工作流中写上 `outputs: []`. 但是,如果你知道工作流的最终输出需"
4109
+ "要归集多个输出,请记得这里同样要更改为数组类型!"
4080
4110
4081
4111
#: ../../src/topics/workflows.md:450 38b7042a270043ba82c11cf2e758f0c8
4082
4112
msgid "Using the following input file:"
4083
- msgstr ""
4113
+ msgstr "使用如下输入文件: "
4084
4114
4085
4115
#: ../../src/topics/workflows.md:452 b3fc75c262fe4a3a8e8bfba1abb07b3d
4086
4116
msgid "`scatter-job.yml`"
@@ -4092,19 +4122,26 @@ msgid ""
4092
4122
" calls the command `echo` on a message. If we invoke `cwltool scatter-"
4093
4123
"workflow.cwl scatter-job.yml` on the command line:"
4094
4124
msgstr ""
4125
+ "提醒一下,[`hello_world.cwl`](../introduction/quick-start.md) "
4126
+ "仅仅是对某段文字调用 `echo` 这个命令。如果我们在命令行调用 `cwltool scatter-"
4127
+ "workflow.cwl scatter-job.yml`:"
4095
4128
4096
4129
#: ../../src/topics/workflows.md:466 b6a33410ee9a45d7bf7b2ba56f786f8f
4097
4130
msgid ""
4098
4131
"You can see that the workflow calls echo multiple times on each element "
4099
4132
"of our `message_array`. Ok, so how about if we want to scatter over two "
4100
4133
"steps in a workflow?"
4101
4134
msgstr ""
4135
+ "可以看到,这个工作流分多次对 `message_array` 数组的每个元素一一调用 \" echo\" "
4136
+ ". 好的,那么如果我们想要让工作流中两个步骤进行分散,该怎么办?"
4102
4137
4103
4138
#: ../../src/topics/workflows.md:469 99b5c8a845ab4beb8524a69c051e2d42
4104
4139
msgid ""
4105
4140
"Let's perform a simple echo like above, but capturing `stdout` by adding "
4106
4141
"the following lines instead of `outputs: []`"
4107
4142
msgstr ""
4143
+ "和之前一样,我们来做一个简单的回显 (echo), 但这次将捕获 "
4144
+ "`stdout`(标准输出)。为此,我们用以下数行代码取代 `outputs: []`"
4108
4145
4109
4146
#: ../../src/topics/workflows.md:472 97bf58937d3f4e98af702e3c1a418992
4110
4147
msgid "`hello_world_to_stdout.cwl`"
@@ -4114,7 +4151,7 @@ msgstr "`hello_world_to_stdout.cwl`"
4114
4151
msgid ""
4115
4152
"And add a second step that uses `wc` to count the characters in each "
4116
4153
"file. See the tool below:"
4117
- msgstr ""
4154
+ msgstr "进而添加第二个步骤,用 `wc` 命令计算每个文件中的字符数量。请见如下工具: "
4118
4155
4119
4156
#: ../../src/topics/workflows.md:483 4afccfe982ff4be2be96cbe5889e5014
4120
4157
msgid "`wc-tool.cwl`"
@@ -4124,7 +4161,7 @@ msgstr "`wc-tool.cwl`"
4124
4161
msgid ""
4125
4162
"Now, how do we incorporate scatter? Remember the scatter field is under "
4126
4163
"each step:"
4127
- msgstr ""
4164
+ msgstr "现在,该如何加入分散操作呢?请记住, \" scatter \" (分散)字段出现在每个步骤下: "
4128
4165
4129
4166
#: ../../src/topics/workflows.md:491 a7f96ec6e4f24c62ac0f5b6edcc9734b
4130
4167
msgid "`scatter-two-steps.cwl`"
@@ -4147,6 +4184,16 @@ msgid ""
4147
4184
"the first step must wait on `echo Hallo welt!`. You can see how this "
4148
4185
"might not scale well."
4149
4186
msgstr ""
4187
+ "这里,我们在每一步骤下加入了 \" scatter\" 字段。对这个具体的示例而言这样做无妨"
4188
+ ",因为这段程序运行得很快。但是,如果要对较多样本运行更复杂的工作流,您可能得"
4189
+ "另寻途径。这里,我们在每个步骤中独立地进行分散,但既然第二个步骤并不实际依赖"
4190
+ "第一个步骤对所有语种(即输入数组中的一个元素)全部完成操作,我们并没有高效地"
4191
+ "运用分散功能。第二个步骤期待从第一个步骤得来的数组作为其输入,因此将一直等待"
4192
+ "到第一步骤完全结束才会开始运行。打个比方,假设运行 `echo Hello World!` "
4193
+ "需要花1分钟,对其输出运行 `wc -c` 需要3分钟,然后 `echo Hallo welt!` "
4194
+ "需要5分钟来运行,最后对其输出运行 `wc` 需要3分钟。即使 `echo Hello World!` "
4195
+ "本可以在4分钟内完成,它也要实际花费8分钟,因为第一个步骤必须等待 `echo Hallo "
4196
+ "welt!` 完成。很显然,运算量大时这样的表现会很差劲。"
4150
4197
4151
4198
#: ../../src/topics/workflows.md:509 85dd63daf04546b78bdcb68c1d985fa9
4152
4199
msgid ""
0 commit comments