Skip to content

Fix aws labels cost tracking issue#228

Open
edmundmiller wants to merge 2 commits intodevfrom
cursor/fix-aws-labels-cost-tracking-issue-2333
Open

Fix aws labels cost tracking issue#228
edmundmiller wants to merge 2 commits intodevfrom
cursor/fix-aws-labels-cost-tracking-issue-2333

Conversation

@edmundmiller
Copy link
Contributor

AWS tag validation issues were addressed by sanitizing process tags across multiple Nextflow modules. The primary problem involved illegal characters in tag values, such as ^ in restriction sites or = in sample identifiers, which violate AWS resource label constraints.

A consistent sanitization pattern, replaceAll(/[^a-zA-Z0-9_-]/, '_'), was applied. This regex replaces any character not a letter, number, underscore, or hyphen with an underscore, ensuring AWS compliance.

Specific changes include:

  • In modules/local/hicpro/get_restriction_fragments.nf, the res_site tag was sanitized (e.g., ^GATC becomes _GATC).
  • In modules/local/hicpro/dnase_mapping_stats.nf, sample and bam tags were combined and sanitized (e.g., sample = file.bam becomes sample___file_bam).
  • In modules/nf-core/bwa/index/main.nf, modules/nf-core/bowtie2/build/main.nf, and modules/nf-core/custom/getchromsizes/main.nf, fasta base names were sanitized (e.g., genome.fasta becomes genome_fasta).
  • In modules/nf-core/cooler/makebins/main.nf, a syntax error "${meta.id}}" was corrected to "${meta.id}".

These modifications ensure all generated process tags adhere to AWS naming conventions, resolving potential deployment errors.

Closes #224

@edmundmiller edmundmiller self-assigned this Jun 23, 2025
@edmundmiller edmundmiller linked an issue Jun 23, 2025 that may be closed by this pull request
@@ -1,5 +1,5 @@
process BOWTIE2_BUILD {
tag "$fasta"
tag "${fasta.baseName.replaceAll(/[^a-zA-Z0-9_-]/, '_')}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edmundmiller this is an ancient PR, but you've modified shared modules here without updating them. Are these updated upstream? Can we do it that way then just pull in updates insatead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_restriction_fragments tag fails on AWS

3 participants