phac-nml / staramrnf

nf-core StarAMR
MIT License
0 stars 0 forks source link

Add "StarAMR" prefix to each metadata field #17

Closed apetkau closed 2 months ago

apetkau commented 2 months ago

Context

In the current pipeline, the following names are given to metadata fields output by the pipeline for loading into IRIDA Next:

See the tests for example:

https://github.com/phac-nml/staramrnf/blob/fcf87f2493d8ab10a75fe2d9411cb6e716c10917/tests/main.nf.test#L28-L34

Request

I would like the names of these metadata fields to be updated to include StarAMR as a prefix. For example:

That way it's easier for someone to tell what the specific metadata fields are referring to.

Possible implementation

Since the above metadata filed names are derived from the output column names of the summary.tsv file in StarAMR (see https://github.com/phac-nml/staramrnf/blob/dev/tests/data/merged_summary.tsv), the easiest way to rename these is to use the rename configuration in the nf-iridanext plugin: https://github.com/phac-nml/nf-iridanext?tab=readme-ov-file#rename

That is, add something like this to conf/iridanext.config:

rename = [
    "Quality Module": "StarAMR Quality Module",
    "Predicted Phenotype": "StarAMR Predicted Phenotype"
]

Other benefits

Renaming like this would also mean that the metadata written by StarAMR will be to the same fields as in the mikrokondo pipeline (so someone could overwrite older StarAMR metadata from mikrokondo with newer StarAMR metadata from this pipeline). Mikrokondo also uses the nf-iridanext rename configuration option to rename metadata: https://github.com/phac-nml/mikrokondo/blob/31c494a397ceb0d97567ac84a44a85ad673f3840/conf/irida_next.config#L125-L128

apetkau commented 2 months ago

Fixed in https://github.com/phac-nml/staramrnf/pull/22