Skip to content

Commit

Permalink
Remove not needed dsl=2 + error in example (nextflow-io#4812)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Ribeiro-Dantas <mribeirodantas@seqera.io>
Signed-off-by: Niklas Schandry <niklas@bio.lmu.de>
  • Loading branch information
mribeirodantas authored and nschan committed Apr 3, 2024
1 parent 0152e4b commit 9867439
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
32 changes: 16 additions & 16 deletions docs/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,41 @@ Any process can define one or more channels as *input* and *output*. The interac
A Nextflow script looks like this:

```groovy
// Declare syntax version
nextflow.enable.dsl=2
// Script parameters
params.query = "/some/data/sample.fa"
params.db = "/some/path/pdb"
process blastSearch {
input:
path query
path db
path query
path db
output:
path "top_hits.txt"
path "top_hits.txt"
"""
blastp -db $db -query $query -outfmt 6 > blast_result
cat blast_result | head -n 10 | cut -f 2 > top_hits.txt
"""
"""
blastp -db $db -query $query -outfmt 6 > blast_result
cat blast_result | head -n 10 | cut -f 2 > top_hits.txt
"""
}
process extractTopHits {
input:
path top_hits
path top_hits
path db
output:
path "sequences.txt"
path "sequences.txt"
"""
blastdbcmd -db $db -entry_batch $top_hits > sequences.txt
"""
"""
blastdbcmd -db $db -entry_batch $top_hits > sequences.txt
"""
}
workflow {
def query_ch = Channel.fromPath(params.query)
blastSearch(query_ch, params.db) | extractTopHits | view
blastSearch(query_ch, params.db)
extractTopHits(blastSearch.out, params.db).view()
}
```

Expand Down
2 changes: 0 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,6 @@ $ nextflow view nextflow-io/hello

== content of file: .nextflow/assets/nextflow-io/hello/main.nf
#!/usr/bin/env nextflow
nextflow.enable.dsl=2

process sayHello {
input:
Expand Down Expand Up @@ -1474,7 +1473,6 @@ View the contents of a downloaded pipeline without omitting the header:
$ nextflow view -q nextflow-io/hello

#!/usr/bin/env nextflow
nextflow.enable.dsl=2

process sayHello {
input:
Expand Down

0 comments on commit 9867439

Please sign in to comment.