Skip to content

Commit

Permalink
deploy: fb3699a
Browse files Browse the repository at this point in the history
  • Loading branch information
apalleja committed Nov 8, 2024
1 parent 49ae618 commit 09c42fe
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
Binary file modified .doctrees/course_contents/Tutorial.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion _sources/course_contents/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nextflow info

Let's run our first script, 'Hello World!' script.

```
```{code-block} groovy
:caption: hello.nf
#!/usr/bin/env nextflow
Expand Down
55 changes: 28 additions & 27 deletions course_contents/Tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -364,35 +364,36 @@ <h2>First enviroment verifications<a class="headerlink" href="#first-enviroment-
<section id="running-our-first-script">
<h2>Running our first script<a class="headerlink" href="#running-our-first-script" title="Link to this heading">#</a></h2>
<p>Let’s run our first script, ‘Hello World!’ script.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">:</span><span class="n">caption</span><span class="p">:</span> <span class="n">hello</span><span class="o">.</span><span class="n">nf</span>

<span class="c1">#!/usr/bin/env nextflow</span>

<span class="o">/*</span>
<span class="o">*</span> <span class="n">Use</span> <span class="n">echo</span> <span class="n">to</span> <span class="nb">print</span> <span class="s1">&#39;Hello World!&#39;</span> <span class="n">to</span> <span class="n">standard</span> <span class="n">out</span>
<span class="o">*/</span>
<span class="o">//</span> <span class="n">A</span> <span class="n">process</span>
<span class="n">process</span> <span class="n">sayHello</span> <span class="p">{</span>

<span class="o">//</span><span class="n">directives</span>
<span class="n">output</span><span class="p">:</span>
<span class="n">stdout</span>
<span class="o">//</span> <span class="n">code</span> <span class="n">block</span> <span class="p">(</span><span class="n">here</span> <span class="n">using</span> <span class="n">bash</span><span class="p">)</span>
<span class="n">script</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> echo &#39;Hello World!&#39;</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="p">}</span>

<span class="o">//</span> <span class="n">the</span> <span class="n">workflow</span>
<span class="n">workflow</span> <span class="p">{</span>

<span class="o">//</span> <span class="n">emit</span> <span class="n">a</span> <span class="n">greeting</span>
<span class="n">sayHello</span><span class="p">()</span>
<span class="p">}</span>
<div class="literal-block-wrapper docutils container" id="id1">
<div class="code-block-caption"><span class="caption-text">hello.nf</span><a class="headerlink" href="#id1" title="Link to this code">#</a></div>
<div class="highlight-groovy notranslate"><div class="highlight"><pre><span></span><span class="cp">#!/usr/bin/env nextflow</span>

<span class="cm">/*</span>
<span class="cm"> * Use echo to print &#39;Hello World!&#39; to standard out</span>
<span class="cm"> */</span>
<span class="c1">// A process</span>
<span class="n">process</span><span class="w"> </span><span class="n">sayHello</span><span class="w"> </span><span class="o">{</span>

<span class="w"> </span><span class="c1">//directives</span>
<span class="w"> </span><span class="nl">output:</span>
<span class="w"> </span><span class="n">stdout</span>
<span class="w"> </span>
<span class="w"> </span><span class="c1">// code block (here using bash)</span>
<span class="w"> </span><span class="nl">script:</span><span class="w"> </span>
<span class="w"> </span><span class="s2">&quot;&quot;&quot;</span>
<span class="s2"> echo &#39;Hello World!&#39;</span>
<span class="s2"> &quot;&quot;&quot;</span>
<span class="o">}</span>

<span class="c1">// the workflow</span>
<span class="n">workflow</span><span class="w"> </span><span class="o">{</span>

<span class="w"> </span><span class="c1">// emit a greeting</span>
<span class="w"> </span><span class="n">sayHello</span><span class="o">()</span>
<span class="o">}</span>
</pre></div>
</div>
</div>
<p>As you can see, a Nextflow script involves two main types of core components: process/es and the workflow. Each process describes what operation(s) should be performed (print ‘Hello World!’), while the workflow describes the dataflow logic that connects the various steps.</p>
<p>Let’s try to run this code in your codespace:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">:</span><span class="n">caption</span><span class="p">:</span> <span class="n">Running</span> <span class="n">hello</span><span class="o">-</span><span class="n">world</span><span class="o">.</span><span class="n">nf</span>
Expand Down

0 comments on commit 09c42fe

Please sign in to comment.