Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### `Added`
* [#127](https://github.com/nf-core/eager/pull/127) - Added a second testcase for testing the pipeline properly
* [#129](https://github.com/nf-core/eager/pull/129) - Support BAM files as [input format](https://github.com/nf-core/eager/issues/41)
* [#131](https://github.com/nf-core/eager/pull/131) - Support different [reference genome file extensions](https://github.com/nf-core/eager/issues/130)

### `Fixed`
* [#128](https://github.com/nf-core/eager/issues/128) - Fixed reference genome handling errors
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ If you prefer, you can specify the full path to your reference genome when you r
```bash
--fasta '[path to Fasta reference]'
```
> If you don't specify appropriate `--bwa_index`, `--fasta_index` parameters, the pipeline will create these indices for you automatically. Note, that saving these for later has to be turned on using `--saveReference`. You may also specify the path to a gzipped (`*.gz` file extension) FastA as reference genome - this will be uncompressed by the pipeline automatically for you.
> If you don't specify appropriate `--bwa_index`, `--fasta_index` parameters, the pipeline will create these indices for you automatically. Note, that saving these for later has to be turned on using `--saveReference`. You may also specify the path to a gzipped (`*.gz` file extension) FastA as reference genome - this will be uncompressed by the pipeline automatically for you. Note that other file extensions such as `.fna`, `.fa` are also supported but will be renamed to `.fasta` automatically by the pipeline.

### `--genome` (using iGenomes)

Expand Down
23 changes: 16 additions & 7 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,12 @@ process makeBWAIndex {
file "where_are_my_files.txt"

script:
base = "${fasta.baseName}"
"""
mkdir bwa_index
cp "${fasta}" bwa_index/
mv "${fasta}" "bwa_index/${base}.fasta"
cd bwa_index
bwa index $fasta
bwa index "${base}.fasta"
"""
}

Expand All @@ -445,13 +446,17 @@ process makeFastaIndex {
file wherearemyfiles from ch_where_for_fasta_index

output:
file "${fasta}.fai" into ch_fasta_faidx_index
file "${fasta}"
file "faidx/${base}.fasta.fai" into ch_fasta_faidx_index
file "faidx/${base}.fasta"
file "where_are_my_files.txt"

script:
base = "${fasta.baseName}"
"""
samtools faidx $fasta
mkdir faidx
mv $fasta "faidx/${base}.fasta"
cd faidx
samtools faidx "${base}.fasta"
"""
}

Expand All @@ -475,12 +480,16 @@ process makeSeqDict {
file wherearemyfiles from ch_where_for_seqdict

output:
file "*.dict" into ch_seq_dict
file "seq_dict/*.dict" into ch_seq_dict
file "where_are_my_files.txt"

script:
base = "${fasta.baseName}.fasta"
"""
picard CreateSequenceDictionary R=$fasta O="${fasta.baseName}.dict"
mkdir -p seq_dict
mv $fasta "seq_dict/${base}"
cd seq_dict
picard CreateSequenceDictionary R=$base O="${fasta.baseName}.dict"
"""
}

Expand Down