nextstrain / rsv

Workflow for RSV analyses on Nextstrain.org
https://nextstrain.org/rsv
6 stars 3 forks source link

fix: Treat geolocation-rules.tsv and annotations.tsv as input files #28

Closed j23414 closed 1 year ago

j23414 commented 1 year ago

Description of proposed changes

This commit modifies the configurations and snakemake rules to treat geolocation-rules.tsv and annotations.tsv as input files instead of strings. This change addresses a warning message that occurs when using relative file paths starting with './'. The warning suggests omitting the './' to avoid redundancy and ensure consistent file matching in Snakemake.

Relative file path './source-data/geolocation-rules.tsv' starts with './'. This is redundant and strongly discouraged. It can also lead to inconsistent results of the file-matching approach used by Snakemake. You can simply omit the './' for relative file paths.

Furthermore, by treating source-data/annotations.tsv as a file, it provides hints to snakemake modules to add a prefix, such as "ingest/source-data/", if necessary. This modification aligns with the changes made in the following pull request: https://github.com/nextstrain/dengue/pull/10

Related issue(s)

Testing

Ran a manual check with:

git clone https://github.com/nextstrain/rsv.git original
git clone https://github.com/nextstrain/rsv.git changed

cd original/ingest
nextstrain build .  data/metadata.tsv

cd ../../changed/ingest
nextstrain build . data/metadata.tsv

diff data/metadata.tsv ../../original/ingest/metadata.tsv         # No changes