Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove not needed dsl=2 + error in example #4812

Merged
merged 4 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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