You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/2020/cli-docs-release.md
+14-9Lines changed: 14 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ For most developers, the command line is synonymous with agility. While tools su
12
12
And given Halloween is just around the corner, in this blog post we'll take a look at 5 CLI tricks and examples which will make your life easier in designing, executing and debugging data pipelines. We are also giving away 5 limited-edition Nextflow hoodies and sticker packs so you can code in style this Halloween season!
13
13
14
14
15
-
#### 1: Invoke a remote pipeline execution with the latest revision
15
+
### 1. Invoke a remote pipeline execution with the latest revision
16
16
17
17
Nextflow facilitates easy collaboration and re-use of existing pipelines in multiple ways. One of the simplest ways to do this is to use the URL of the Git repository.
18
18
@@ -28,7 +28,7 @@ How can we make sure that we always run the latest code from the remote pipeline
28
28
$ nextflow run nextflow-io/hello -latest
29
29
```
30
30
31
-
#### 2: Query work directories for a specific execution
31
+
### 2. Query work directories for a specific execution
32
32
33
33
For every invocation of Nextflow, all the metadata about an execution is stored including task directories, completion status and time etc. We can use the `nextflow log` command to generate a summary of this information for a specific run.
34
34
@@ -49,7 +49,7 @@ The hash is the name of the work directory where the process was executed; there
49
49
The log command also has other child options including `-before` and `-after` to help with the chronological inspection of logs.
50
50
51
51
52
-
#### 3: Top-level configuration
52
+
### 3. Top-level configuration
53
53
54
54
Nextflow emphasizes customization of pipelines and exposes multiple options to facilitate this. The configuration is applied to multiple Nextflow commands and is therefore a top-level option. In practice, this means specifying configuration options *before* the command.
55
55
@@ -71,7 +71,7 @@ Moreover, we can also use the config command to inspect the final inferred confi
71
71
$ nextflow config -show-profiles
72
72
```
73
73
74
-
#### 4: Passing in an input parameter file
74
+
### 4. Passing in an input parameter file
75
75
76
76
Nextflow is designed to work across both research and production settings. In production especially, specifying multiple parameters for the pipeline on the command line becomes cumbersome. In these cases, environment variables or config files are commonly used which contain all input files, options and metadata. Love them or hate them, YAML and JSON are the standard formats for human and machines, respectively.
77
77
@@ -90,16 +90,21 @@ paired_end : true
90
90
penalty : 12
91
91
```
92
92
93
-
#### 5: Specific workflow entry points
93
+
### 5. Specific workflow entry points
94
94
95
95
The recently released [DSL2](https://www.nextflow.io/blog/2020/dsl2-is-here.html) adds powerful modularity to Nextflow and enables scripts to contain multiple workflows. By default, the unnamed workflow is assumed to be the main entry point for the script, however, with numerous named workflows, the entry point can be customized by using the `entry` child-option of the run command.
96
96
97
97
$ nextflow run main.nf -entry workflow1
98
98
99
99
This allows users to run a specific sub-workflow or a section of their entire workflow script. For more information, refer to the [implicit workflow](https://www.nextflow.io/docs/latest/dsl2.html#implicit-workflow) section of the documentation.
100
100
101
+
Also, as for version 20.09.1-edge, you can specify a pipeline script other than `main.nf` using the command line option
102
+
`-main-script`.
101
103
102
-
#### Bonus trick: Web dashboard launched from the CLI
104
+
$ nextflow run http://github.com/my/pipeline -main-script my-analysis.nf
105
+
106
+
107
+
### Bonus trick! Web dashboard launched from the CLI
103
108
104
109
The tricks above highlight the functionality of the Nextflow CLI. However, for long-running workflows, monitoring becomes all the more crucial. With Nextflow Tower, we can invoke any Nextflow pipeline execution from the CLI and use the integrated dashboard to follow the workflow execution wherever we are. Sign-in to [Tower](https://tower.nf) using your GitHub credentials, obtain your token from the Getting Started page and export them into your terminal, `~/.bashrc` or include them in your `nextflow.config`.
105
110
@@ -114,17 +119,17 @@ Next simply add the "-with-tower" child-option to any Nextflow run command. A UR
114
119
$ nextflow run nextflow-io/hello -with-tower
115
120
```
116
121
117
-
#### Nextflow Giveaway
122
+
### Nextflow Giveaway
118
123
119
124
If you want to look stylish while you put the above tips into practice, or simply like free stuff, we are giving away five of our latest Nextflow hoodie and sticker packs. Retweet or like the Nextflow tweet about this article and we will draw and notify the winners on October 31st!
120
125
121
126
122
-
#### About the Author
127
+
### About the Author
123
128
124
129
[Abhinav Sharma](https://www.linkedin.com/in/abhi18av/) is a Bioinformatics Engineer at [Seqera Labs](https://www.seqera.io) interested in Data Science and Cloud Engineering. He enjoys working on all things Genomics, Bioinformatics and Nextflow.
125
130
126
131
127
-
#### Acknowledgements
132
+
### Acknowledgements
128
133
129
134
Shout out to [Kevin Sayers](https://github.com/KevinSayers) and [Alexander Peltzer](https://github.com/apeltzer) for their earlier efforts in documenting the CLI and which inspired this work.
0 commit comments