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

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

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

j23414
Copy link
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