-
Notifications
You must be signed in to change notification settings - Fork 133
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
Use relative paths for inputs to make the training portable #438
base: master
Are you sure you want to change the base?
Changes from 4 commits
cc1cec9
2e9e2d4
e7957de
e83a38f
08428f0
603e7ac
389e560
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -55,7 +55,7 @@ The tools we need (Samtools and GATK) are not installed in the Gitpod environmen | |||||||||||||
!!! note | ||||||||||||||
|
||||||||||||||
Make sure you're in the correct working directory: | ||||||||||||||
`cd /workspace/gitpod/hello-nextflow` | ||||||||||||||
`pwd` should return a path ending in `hello-nextflow` | ||||||||||||||
|
||||||||||||||
### 0.1. Index a BAM input file with Samtools | ||||||||||||||
|
||||||||||||||
|
@@ -561,9 +561,9 @@ This error will not reproduce consistently because it is dependent on some varia | |||||||||||||
This is what the output of the two `.view` calls we added looks like for a failed run: | ||||||||||||||
|
||||||||||||||
```console title="Output" | ||||||||||||||
/workspace/gitpod/hello-nextflow/data/bam/reads_mother.bam | ||||||||||||||
/workspace/gitpod/hello-nextflow/data/bam/reads_father.bam | ||||||||||||||
/workspace/gitpod/hello-nextflow/data/bam/reads_son.bam | ||||||||||||||
./data/bam/reads_mother.bam | ||||||||||||||
./data/bam/reads_father.bam | ||||||||||||||
./data/bam/reads_son.bam | ||||||||||||||
/workspace/gitpod/hello-nextflow/work/9c/53492e3518447b75363e1cd951be4b/reads_father.bam.bai | ||||||||||||||
/workspace/gitpod/hello-nextflow/work/cc/37894fffdf6cc84c3b0b47f9b536b7/reads_son.bam.bai | ||||||||||||||
/workspace/gitpod/hello-nextflow/work/4d/dff681a3d137ba7d9866e3d9307bd0/reads_mother.bam.bai | ||||||||||||||
|
@@ -717,9 +717,9 @@ Here we are going to show you how to do the simple case. | |||||||||||||
We already made a text file listing the input file paths, called `sample_bams.txt`, which you can find in the `data/` directory. | ||||||||||||||
|
||||||||||||||
```txt title="sample_bams.txt" | ||||||||||||||
/workspace/gitpod/hello-nextflow/data/bam/reads_mother.bam | ||||||||||||||
/workspace/gitpod/hello-nextflow/data/bam/reads_father.bam | ||||||||||||||
/workspace/gitpod/hello-nextflow/data/bam/reads_son.bam | ||||||||||||||
/data/bam/reads_mother.bam | ||||||||||||||
/data/bam/reads_father.bam | ||||||||||||||
/data/bam/reads_son.bam | ||||||||||||||
Comment on lines
+721
to
+723
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
As you can see, we listed one file path per line, and they are absolute paths. | ||||||||||||||
|
@@ -768,9 +768,10 @@ reads_ch = Channel.fromPath(params.reads_bam) | |||||||||||||
|
||||||||||||||
_After:_ | ||||||||||||||
|
||||||||||||||
```groovy title="hello-genomics.nf" linenums="68" | ||||||||||||||
````groovy title="hello-genomics.nf" linenums="68" | ||||||||||||||
// Create input channel from a text file listing input file paths | ||||||||||||||
reads_ch = Channel.fromPath(params.reads_bam).splitText() | ||||||||||||||
reads_ch = Channel.fromPath(params.reads_bam) | ||||||||||||||
.splitText() { bamPath -> file(bamPath.trim()) } | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does anyone know if there's a better way of doing this? Without the map nothing works 😠 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the equivalent reads_ch = Channel.fromPath(params.reads_bam)
.splitCsv()
.map { bamPath -> file(bamPath[0]) } I think it looks nicer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. I like that version a lot. It's a lot easier to follow. |
||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
!!! tip | ||||||||||||||
|
@@ -783,7 +784,7 @@ Let's run the workflow one more time. | |||||||||||||
|
||||||||||||||
```bash | ||||||||||||||
nextflow run hello-genomics.nf -resume | ||||||||||||||
``` | ||||||||||||||
```` | ||||||||||||||
|
||||||||||||||
This should produce the same result as before, right? | ||||||||||||||
|
||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/workspace/gitpod/hello-nextflow/data/bam/reads_mother.bam | ||
/workspace/gitpod/hello-nextflow/data/bam/reads_father.bam | ||
/workspace/gitpod/hello-nextflow/data/bam/reads_son.bam | ||
data/bam/reads_mother.bam | ||
data/bam/reads_father.bam | ||
data/bam/reads_son.bam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.