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

checksum computation path fix #53

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Conversation

openpaul
Copy link
Contributor

hello,

not sure if you want pull requests. I found a bug that currently the download_scorefiles cant download into a folder as the checksums are computed for the filename and not the path.

As such this command fails:

mkdir anyfolder
download_scorefiles -i PGS000922 -o anyfolder/ -b GRCh37

With the output:

pgscatalog_utils.download.ScoringFileChecksum: 2023-08-25 15:50:13 WARNING  File PGS000922_hmPOS_GRCh37.txt.gz not found!
pgscatalog_utils.download.ScoringFileDownloader: 2023-08-25 15:50:13 WARNING  Scoring file PGS000922_hmPOS_GRCh37.txt.gz fails validation
pgscatalog_utils.download.ScoringFileDownloader: 2023-08-25 15:50:13 WARNING  Remote checksum: 1c59a24ea5ef65a10db2531ba106d5be
pgscatalog_utils.download.ScoringFileDownloader: 2023-08-25 15:50:13 WARNING  Local checksum: None
pgscatalog_utils.download.download_file: 2023-08-25 15:50:13 WARNING  /home/paul/software/pgscatalog_utils/anyfolder/PGS000922_hmPOS_GRCh37.txt.gz exists and overwrite is false, skipping download
pgscatalog_utils.download.ScoringFileChecksum: 2023-08-25 15:50:13 WARNING  File PGS000922_hmPOS_GRCh37.txt.gz not found!
pgscatalog_utils.download.download_file: 2023-08-25 15:50:13 WARNING  /home/paul/software/pgscatalog_utils/anyfolder/PGS000922_hmPOS_GRCh37.txt.gz.md5 exists and overwrite is false, skipping download
pgscatalog_utils.download.download_file: 2023-08-25 15:50:13 WARNING  /home/paul/software/pgscatalog_utils/anyfolder/PGS000922_hmPOS_GRCh37.txt.gz exists and overwrite is false, skipping download
pgscatalog_utils.download.ScoringFileChecksum: 2023-08-25 15:50:13 WARNING  File PGS000922_hmPOS_GRCh37.txt.gz not found!
pgscatalog_utils.download.download_file: 2023-08-25 15:50:13 WARNING  /home/paul/software/pgscatalog_utils/anyfolder/PGS000922_hmPOS_GRCh37.txt.gz.md5 exists and overwrite is false, skipping download
pgscatalog_utils.download.download_file: 2023-08-25 15:50:13 WARNING  /home/paul/software/pgscatalog_utils/anyfolder/PGS000922_hmPOS_GRCh37.txt.gz exists and overwrite is false, skipping download
pgscatalog_utils.download.ScoringFileChecksum: 2023-08-25 15:50:13 WARNING  File PGS000922_hmPOS_GRCh37.txt.gz not found!
pgscatalog_utils.download.download_file: 2023-08-25 15:50:13 WARNING  /home/paul/software/pgscatalog_utils/anyfolder/PGS000922_hmPOS_GRCh37.txt.gz.md5 exists and overwrite is false, skipping download

This fixes it hopefully as expected.

after the fix the output I see is as expected:

$ download_scorefiles -i PGS000922 -o anyfolder/ -b GRCh37
$ tree anyfolder
anyfolder
├── PGS000922_hmPOS_GRCh37.txt.gz
└── PGS000922_hmPOS_GRCh37.txt.gz.md5

1 directory, 2 files

@smlmbrt smlmbrt changed the base branch from main to dev August 25, 2023 14:13
@smlmbrt smlmbrt requested a review from nebfield August 25, 2023 14:13
@smlmbrt
Copy link
Member

smlmbrt commented Aug 25, 2023

Hi @openpaul, we definitely do appreciate PRs (we usually PR into a dev branch before releasing to main)! @nebfield will take a look soon.

@nebfield nebfield merged commit e885a72 into PGScatalog:dev Sep 12, 2023
@nebfield
Copy link
Member

Thanks for the fix 🎉

@openpaul openpaul deleted the folderdownload branch September 13, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants