Skip to content

Commit

Permalink
fix fastqc memory_in_mb calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
sateeshperi committed Dec 12, 2024
1 parent eb7fef4 commit e4a8a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/nf-core/fastqc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ process FASTQC {
// The total amount of allocated RAM by FastQC is equal to the number of threads defined (--threads) time the amount of RAM defined (--memory)
// https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/fastqc#L211-L222
// Dividing the task.memory by task.cpu allows to stick to requested amount of RAM in the label
def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB') / task.cpus
def memory_in_mb = task.memory ? task.memory.toUnit('MB').toFloat() / task.cpus : null
// FastQC memory value allowed range (100 - 10000)
def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb)

Expand Down

0 comments on commit e4a8a5c

Please sign in to comment.