Skip to content

Commit 189ac63

Browse files
committed
refactor(prepare_genome): drop dead ch_fai intermediate
1 parent e39b70c commit 189ac63

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • subworkflows/local/prepare_genome_references

subworkflows/local/prepare_genome_references/main.nf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,15 @@ workflow PREPARE_GENOME_REFERENCES {
185185
//-------------------------------------------------------
186186
// 7) FAI / chrom.sizes only if we actually have a genome
187187
//-------------------------------------------------------
188-
ch_fai = channel.empty()
189188
ch_fasta_fai = channel.empty()
190189
ch_chrom_sizes = channel.empty()
191190
if (fasta_provided) {
192191
SAMTOOLS_FAIDX(ch_fasta.map { item -> [ [:], item, [] ] }, true)
193-
ch_fai = SAMTOOLS_FAIDX.out.fai.map { tuple -> tuple[1] }
194192
ch_chrom_sizes = SAMTOOLS_FAIDX.out.sizes.map { tuple -> tuple[1] }
195-
ch_fasta_fai = ch_fasta.combine(ch_fai).map { fasta_file, fai_file -> [ [:], fasta_file, fai_file ] }.first()
193+
ch_fasta_fai = ch_fasta
194+
.combine(SAMTOOLS_FAIDX.out.fai.map { _meta, fai_file -> fai_file })
195+
.map { fasta_file, fai_file -> [ [:], fasta_file, fai_file ] }
196+
.first()
196197
}
197198

198199
//-------------------------------------------------------------

0 commit comments

Comments
 (0)