forked from ksamuk/pixy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes ksamuk#12. This PR swaps prints for logging and also uses f-strings where appropriate. I waffled on whether or not to remove the `[pixy]` label from the messages. Log snippet output: ``` $ pixy --stats pi fst dxy --vcf /Users/erin/git/client/pixy/tests/main/data/ag1000_pixy_test.vcf.gz --populations /Users/erin/git/client/pixy/tests/main/data/ag1000_populations_file.txt --bypass_invariant_check no --window_size 10000 --output_folder /Users/erin/scratch/billable/pixy/version_testing_bypass_invar_check/1_2_5_beta1_reinstall/ 2025-02-13 16:03:55,055 pixy.__main__:main:261 [INFO]: [pixy] pixy 1.2.10.beta2 2025-02-13 16:03:55,056 pixy.__main__:main:262 [INFO]: [pixy] See documentation at https://pixy.readthedocs.io/en/latest/ 2025-02-13 16:03:55,066 pixy.args_validation:check_and_validate_args:477 [INFO]: Validating VCF and input parameters... 2025-02-13 16:03:55,066 pixy.args_validation:check_and_validate_args:480 [INFO]: Checking write access... 2025-02-13 16:03:55,066 pixy.args_validation:check_and_validate_args:487 [INFO]: Checking CPU configuration... 2025-02-13 16:03:55,066 pixy.args_validation:check_and_validate_args:510 [INFO]: Checking for invariant sites... 2025-02-13 16:03:56,408 pixy.args_validation:check_and_validate_args:547 [INFO]: Checking chromosome data... 2025-02-13 16:03:56,441 pixy.args_validation:check_and_validate_args:555 [INFO]: Checking intervals/sites... 2025-02-13 16:03:56,469 pixy.args_validation:check_and_validate_args:560 [INFO]: OK 2025-02-13 16:03:56,469 pixy.args_validation:check_and_validate_args:605 [INFO]: Checking sample data... 2025-02-13 16:03:56,475 pixy.args_validation:check_and_validate_args:647 [INFO]: All initial checks passed! 2025-02-13 16:03:56,476 pixy.__main__:main:272 [INFO]: [pixy] Preparing for calculation of summary statistics: pi, fst, dxy 2025-02-13 16:03:56,476 pixy.__main__:main:282 [INFO]: [pixy] Using Weir and Cockerham (1984)'s estimator of FST. 2025-02-13 16:03:56,476 pixy.__main__:main:284 [INFO]: [pixy] Data set contains 2 populations, 2 chromosome(s), and 36 sample(s) 2025-02-13 16:03:56,476 pixy.__main__:main:291 [INFO]: [pixy] Window size: 10000 bp 2025-02-13 16:03:56,476 pixy.__main__:main:301 [INFO]: Started calculations at 16:03:56 on 2025-02-13 2025-02-13 16:03:56,476 pixy.__main__:main:305 [INFO]: [pixy] Using 1 out of 14 available CPU cores 2025-02-13 16:03:56,476 pixy.__main__:main:353 [INFO]: [pixy] Processing chromosome/contig X 2025-02-13 16:03:56,688 pixy.__main__:main:394 [INFO]: [pixy] Calculating statistics for region X:1-54321 2025-02-13 16:03:58,836 pixy.__main__:main:353 [INFO]: [pixy] Processing chromosome/contig 1 2025-02-13 16:03:59,054 pixy.__main__:main:394 [INFO]: [pixy] Calculating statistics for region 1:1-54321 2025-02-13 16:04:01,224 pixy.__main__:main:840 [INFO]: [pixy] All calculations complete at 16:04:01 on 2025-02-13 2025-02-13 16:04:01,225 pixy.__main__:main:845 [INFO]: [pixy] Time elapsed: 00:00:04 2025-02-13 16:04:01,225 pixy.__main__:main:846 [INFO]: [pixy] Output files written to /Users/erin/scratch/billable/pixy/version_testing_bypass_invar_check/1_2_5_beta1_reinstall 2025-02-13 16:04:01,225 pixy.__main__:main:855 [INFO]: [pixy] If you use pixy in your research, please cite the following paper: Korunes, KL and K Samuk. pixy: Unbiased estimation of nucleotide diversity and divergence in the presence of missing data. Mol Ecol Resour. 2021 Jan 16. doi: 10.1111/1755-0998.13326. ```
- Loading branch information
Showing
3 changed files
with
64 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.