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

Support for renaming/saving multiple source metadata keys to same destination key #16

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

Comments

@apetkau
Copy link
Member

apetkau commented Feb 23, 2024

Suggestion

It would be useful if, when parsing metadata to save and writing to iridanext.output.json.gz, there could be multiple source metadata keys that get saved to the same destination key based on different conditions.

Example

Consider the following config file:

nextflow.config

iridanext {
    output {
        metadata {
            samples {
                rename = [
                    "serotype_sistr": "serotype",
                    "serotype_ectyper": "serotype"
                ]
            }
        }
    }
}

This could be used to save metadata to a sample under the name serotype that is derived from different software (SISTR or ECTyper).

Enhancements

It may be useful to have some way of adding logical statements to define conditions under which one key is chosen over another (e.g., when serotype_sistr is chosen over serotype_ectyper).

Checklist

Currently, the above may work with nf-iridanext as-is, but the following would need to be checked:

  • Can multiple keys be specified in the rename section
  • If all of the metadata keys exist and there is an attempt to save to the same destination key, will the pipeline properly report an error (e.g., if serotype_sistr and serotype_ectyper both exist and there is an attempt to write both to serotype, will this generate an error).
@apetkau apetkau added the enhancement New feature or request label Feb 23, 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