Skip to content

Commit

Permalink
Collect the size of the genome (file size is a good proxy)
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Nov 6, 2023
1 parent bdd1c2e commit e222d3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions subworkflows/local/prepare_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ workflow PREPARE_GENOME {

// Uncompress genome fasta file if required
if ( params.fasta.endsWith('.gz') ) {
ch_fasta = GUNZIP ( fasta ).gunzip
ch_unzipped = GUNZIP ( fasta ).gunzip
ch_versions = ch_versions.mix ( GUNZIP.out.versions )
} else {
ch_fasta = fasta
ch_unzipped = fasta
}

ch_unzipped
| map { meta, fa -> [ meta + [id: fa.baseName, genome_size: fa.size()], fa] }
| set { ch_fasta }

// Unmask genome fasta
UNMASK ( ch_fasta )
Expand Down

0 comments on commit e222d3b

Please sign in to comment.