Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to allow combined definition of metadata keys to keep and rename #15

Open
apetkau opened this issue Feb 14, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@apetkau
Copy link
Member

apetkau commented Feb 14, 2024

Issue

Right now, in order to rename and keep metadata keys, the same key must be defined twice:

iridanext {
    output {
        metadata {
            samples {
                keep = ["key1", "key2"]
                rename = [
                    "key1": "New Key 1",
                    "key2": "New Key 2"
                ]
            }
        }
    }
}

This duplicates effort/lines to write.

Suggestion

One suggested change that could be made is to enable the keep keyword to have two behaviours:

  • [Existing behaviour]: If keep is passed a list of strings, these are interpreted as a list of metadata keys to keep
  • [New behaviour]: If keep is passed a Map, the map keys are interpreted as a list of metadata keys to keep while the values are used to rename those keys.

Example

This would allow you to have only one place where keys to keep are defined (and renaming is also handled in this same definition).

iridanext {
    output {
        metadata {
            samples {
                keep = [
                    "key1": "New Key 1",
                    "key2": "New Key 2"
                ]
            }
        }
    }
}
@apetkau apetkau added the enhancement New feature or request label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant