Skip to content

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

Merged
j23414 merged 1 commit intomasterfrom
fix_annotations_path
Jul 6, 2023
Merged

fix: Treat geolocation-rules.tsv and annotations.tsv as input files#28
j23414 merged 1 commit intomasterfrom
fix_annotations_path

Conversation

@j23414
Copy link
Copy Markdown
Contributor

@j23414 j23414 commented Jun 23, 2023

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: nextstrain/dengue#10

Related issue(s)

Testing

  • Checks pass

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

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: nextstrain/dengue#10
@j23414 j23414 requested a review from a team June 28, 2023 08:06
@j23414 j23414 merged commit ba171f4 into master Jul 6, 2023
@j23414 j23414 deleted the fix_annotations_path branch July 6, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants