Skip to content

Commit 6bba51f

Browse files
authored
Merge pull request #208 from phue/hisat2_igenomes
bismark: don't use iGenomes index with hisat2
2 parents a15849b + d3f9487 commit 6bba51f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ if (params.validate_params) {
3434
////////////////////////////////////////////////////
3535

3636
// These params need to be set late, after the iGenomes config is loaded
37-
params.bismark_index = params.genome ? params.genomes[ params.genome ].bismark ?: false : false
38-
params.bwa_meth_index = params.genome ? params.genomes[ params.genome ].bwa_meth ?: false : false
3937
params.fasta = params.genome ? params.genomes[ params.genome ].fasta ?: false : false
40-
params.fasta_index = params.genome ? params.genomes[ params.genome ].fasta_index ?: false : false
4138

4239
// Check if genome exists in the config file
4340
if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) {
@@ -51,6 +48,7 @@ Channel
5148
ch_splicesites_for_bismark_hisat_align = params.known_splices ? Channel.fromPath(params.known_splices, checkIfExists: true) : Channel.empty()
5249

5350
if( params.aligner =~ /bismark/ ){
51+
params.bismark_index = params.genome && params.aligner == 'bismark' ? params.genomes[ params.genome ].bismark ?: false : false
5452
assert params.bismark_index || params.fasta : "No reference genome index or fasta file specified"
5553
ch_wherearemyfiles_for_alignment.set { ch_wherearemyfiles_for_bismark_align }
5654

@@ -76,6 +74,7 @@ else if( params.aligner == 'bwameth' ){
7674
.ifEmpty { exit 1, "fasta file not found : ${params.fasta}" }
7775
.into { ch_fasta_for_makeBwaMemIndex; ch_fasta_for_makeFastaIndex; ch_fasta_for_methyldackel }
7876

77+
params.bwa_meth_index = params.genome ? params.genomes[ params.genome ].bwa_meth ?: false : false
7978
if( params.bwa_meth_index ){
8079
Channel
8180
.fromPath("${params.bwa_meth_index}*", checkIfExists: true)
@@ -84,6 +83,7 @@ else if( params.aligner == 'bwameth' ){
8483
ch_fasta_for_makeBwaMemIndex.close()
8584
}
8685

86+
params.fasta_index = params.genome ? params.genomes[ params.genome ].fasta_index ?: false : false
8787
if( params.fasta_index ){
8888
Channel
8989
.fromPath(params.fasta_index, checkIfExists: true)

0 commit comments

Comments
 (0)