Skip to content

Commit

Permalink
Merge pull request #1 from biosustain/small_improvements
Browse files Browse the repository at this point in the history
Small_improvements
  • Loading branch information
apalleja authored Nov 26, 2024
2 parents 188f5c0 + 1ed0ae1 commit 02fb95d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@ _build
*.docx
.nextflow-console.log
.nextflow.pid

# ignore logs
*.nextflow.log*
# Ignore the .nextflow directory created by Nextflow
.nextflow
work
# Ignore the training directory cloned
training
# ignore results and data folder
data
results
4 changes: 2 additions & 2 deletions course_contents/RunningRealWorkflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To be able to run this pipeline we will clone the training repository from Nextf

First cloning with `git clone`:
```bash
git clone https://github.com/nextflow-io/training.git
git clone https://github.com/nextflow-io/training.git --depth 1
```
And then move to `training/nf-training`:
```bash
Expand Down Expand Up @@ -58,4 +58,4 @@ Let's run again the workflow by calling our config file:
sudo nextflow run script7.nf -c course.config
```

You are are welcome to have a look to the file that was downloaded `nextflow.config`, to see what usually these files contain and realise how important they are to setup the environment for the nextflow runs. The config file `nextflow.config` must be in the same folder where you are running your main script (`main.nf`) otherwise you need to specify the location with `-c`
You are are welcome to have a look to the file that was downloaded `nextflow.config`, to see what usually these files contain and realise how important they are to setup the environment for the nextflow runs. The config file `nextflow.config` must be in the same folder where you are running your main script (`main.nf`) otherwise you need to specify the location with `-c`
23 changes: 10 additions & 13 deletions course_contents/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,16 @@ Workflows typically run on batches of inputs that are meant to be processed in b

There are different factory channels to create the channels. Here you have an example where I used factory `Channel.fromFilePairs()` fastq read files.

> params.reads = "$projectDir/data/*_{1,2}.fq.gz"
>
> Channel
> .fromFilePairs(params.reads, checkIfExists: true)
> .toSortedList( { a, b -> a[0] <=> b[0] } )
> .flatMap()
> .set { read_pairs_ch }
> read_pairs_ch.view()
```groovy
params.reads = "$projectDir/data/*_{1,2}.fq.gz"
Channel
.fromFilePairs(params.reads, checkIfExists: true)
.toSortedList( { a, b -> a[0] <=> b[0] } )
.flatMap()
.set { read_pairs_ch }
read_pairs_ch.view()
```

`.toSortedList`, `.flatMap`, `.set`, `.view` are operators to transform the channel and achieve the input files in the desired format.

Expand Down

0 comments on commit 02fb95d

Please sign in to comment.