snplib 1.0.8__tar.gz → 1.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. {snplib-1.0.8 → snplib-1.0.10}/.readthedocs.yaml +5 -3
  2. {snplib-1.0.8 → snplib-1.0.10}/PKG-INFO +2 -2
  3. {snplib-1.0.8 → snplib-1.0.10}/README.md +1 -1
  4. {snplib-1.0.8 → snplib-1.0.10}/docs/conf.py +1 -1
  5. snplib-1.0.10/docs/requirements.txt +2 -0
  6. {snplib-1.0.8 → snplib-1.0.10}/pyproject.toml +1 -1
  7. {snplib-1.0.8 → snplib-1.0.10}/requirements.txt +0 -2
  8. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/format/_plink.py +42 -56
  9. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/statistics/_callrate.py +5 -4
  10. {snplib-1.0.8 → snplib-1.0.10}/src/snplib.egg-info/PKG-INFO +2 -2
  11. snplib-1.0.10/src/snplib.egg-info/SOURCES.txt +98 -0
  12. snplib-1.0.8/docs/_build/doctrees/environment.pickle +0 -0
  13. snplib-1.0.8/docs/_build/doctrees/examples.doctree +0 -0
  14. snplib-1.0.8/docs/_build/doctrees/index.doctree +0 -0
  15. snplib-1.0.8/docs/_build/doctrees/install.doctree +0 -0
  16. snplib-1.0.8/docs/_build/doctrees/intro.doctree +0 -0
  17. snplib-1.0.8/docs/_build/doctrees/modules.doctree +0 -0
  18. snplib-1.0.8/docs/_build/doctrees/snplib.doctree +0 -0
  19. snplib-1.0.8/docs/_build/doctrees/snplib.finalreport.doctree +0 -0
  20. snplib-1.0.8/docs/_build/doctrees/snplib.format.doctree +0 -0
  21. snplib-1.0.8/docs/_build/doctrees/snplib.parentage.doctree +0 -0
  22. snplib-1.0.8/docs/_build/doctrees/snplib.statistics.doctree +0 -0
  23. snplib-1.0.8/docs/_build/doctrees/usage.doctree +0 -0
  24. snplib-1.0.8/docs/_build/html/.buildinfo +0 -4
  25. snplib-1.0.8/docs/_build/html/_modules/index.html +0 -113
  26. snplib-1.0.8/docs/_build/html/_modules/snplib/finalreport/_finalreport.html +0 -368
  27. snplib-1.0.8/docs/_build/html/_modules/snplib/format/_plink.html +0 -422
  28. snplib-1.0.8/docs/_build/html/_modules/snplib/format/_snp.html +0 -233
  29. snplib-1.0.8/docs/_build/html/_modules/snplib/parentage/_discov.html +0 -213
  30. snplib-1.0.8/docs/_build/html/_modules/snplib/parentage/_isagmark.html +0 -126
  31. snplib-1.0.8/docs/_build/html/_modules/snplib/parentage/_verif.html +0 -202
  32. snplib-1.0.8/docs/_build/html/_modules/snplib/statistics/_callrate.html +0 -167
  33. snplib-1.0.8/docs/_build/html/_modules/snplib/statistics/_freq.html +0 -178
  34. snplib-1.0.8/docs/_build/html/_modules/snplib/statistics/_snphwe.html +0 -243
  35. snplib-1.0.8/docs/_build/html/_sources/examples.rst.txt +0 -647
  36. snplib-1.0.8/docs/_build/html/_sources/index.rst.txt +0 -23
  37. snplib-1.0.8/docs/_build/html/_sources/install.rst.txt +0 -26
  38. snplib-1.0.8/docs/_build/html/_sources/intro.rst.txt +0 -15
  39. snplib-1.0.8/docs/_build/html/_sources/modules.rst.txt +0 -7
  40. snplib-1.0.8/docs/_build/html/_sources/snplib.finalreport.rst.txt +0 -9
  41. snplib-1.0.8/docs/_build/html/_sources/snplib.format.rst.txt +0 -10
  42. snplib-1.0.8/docs/_build/html/_sources/snplib.parentage.rst.txt +0 -12
  43. snplib-1.0.8/docs/_build/html/_sources/snplib.rst.txt +0 -12
  44. snplib-1.0.8/docs/_build/html/_sources/snplib.statistics.rst.txt +0 -13
  45. snplib-1.0.8/docs/_build/html/_sources/usage.rst.txt +0 -26
  46. snplib-1.0.8/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -123
  47. snplib-1.0.8/docs/_build/html/_static/basic.css +0 -925
  48. snplib-1.0.8/docs/_build/html/_static/css/badge_only.css +0 -1
  49. snplib-1.0.8/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  50. snplib-1.0.8/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  51. snplib-1.0.8/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  52. snplib-1.0.8/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  53. snplib-1.0.8/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
  54. snplib-1.0.8/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg +0 -2671
  55. snplib-1.0.8/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  56. snplib-1.0.8/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
  57. snplib-1.0.8/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  58. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
  59. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  60. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-bold.woff +0 -0
  61. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
  62. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
  63. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  64. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-normal.woff +0 -0
  65. snplib-1.0.8/docs/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
  66. snplib-1.0.8/docs/_build/html/_static/css/theme.css +0 -4
  67. snplib-1.0.8/docs/_build/html/_static/doctools.js +0 -156
  68. snplib-1.0.8/docs/_build/html/_static/documentation_options.js +0 -13
  69. snplib-1.0.8/docs/_build/html/_static/file.png +0 -0
  70. snplib-1.0.8/docs/_build/html/_static/jquery.js +0 -2
  71. snplib-1.0.8/docs/_build/html/_static/js/badge_only.js +0 -1
  72. snplib-1.0.8/docs/_build/html/_static/js/html5shiv-printshiv.min.js +0 -4
  73. snplib-1.0.8/docs/_build/html/_static/js/html5shiv.min.js +0 -4
  74. snplib-1.0.8/docs/_build/html/_static/js/theme.js +0 -1
  75. snplib-1.0.8/docs/_build/html/_static/language_data.js +0 -199
  76. snplib-1.0.8/docs/_build/html/_static/minus.png +0 -0
  77. snplib-1.0.8/docs/_build/html/_static/plus.png +0 -0
  78. snplib-1.0.8/docs/_build/html/_static/pygments.css +0 -75
  79. snplib-1.0.8/docs/_build/html/_static/searchtools.js +0 -574
  80. snplib-1.0.8/docs/_build/html/_static/sphinx_highlight.js +0 -154
  81. snplib-1.0.8/docs/_build/html/examples.html +0 -725
  82. snplib-1.0.8/docs/_build/html/genindex.html +0 -352
  83. snplib-1.0.8/docs/_build/html/index.html +0 -143
  84. snplib-1.0.8/docs/_build/html/install.html +0 -141
  85. snplib-1.0.8/docs/_build/html/intro.html +0 -126
  86. snplib-1.0.8/docs/_build/html/modules.html +0 -127
  87. snplib-1.0.8/docs/_build/html/objects.inv +0 -0
  88. snplib-1.0.8/docs/_build/html/py-modindex.html +0 -144
  89. snplib-1.0.8/docs/_build/html/search.html +0 -124
  90. snplib-1.0.8/docs/_build/html/searchindex.js +0 -1
  91. snplib-1.0.8/docs/_build/html/snplib.finalreport.html +0 -265
  92. snplib-1.0.8/docs/_build/html/snplib.format.html +0 -407
  93. snplib-1.0.8/docs/_build/html/snplib.html +0 -155
  94. snplib-1.0.8/docs/_build/html/snplib.parentage.html +0 -230
  95. snplib-1.0.8/docs/_build/html/snplib.statistics.html +0 -245
  96. snplib-1.0.8/docs/_build/html/usage.html +0 -135
  97. snplib-1.0.8/docs/logo.png +0 -0
  98. snplib-1.0.8/src/snplib.egg-info/SOURCES.txt +0 -183
  99. {snplib-1.0.8 → snplib-1.0.10}/.github/workflows/linux.yml +0 -0
  100. {snplib-1.0.8 → snplib-1.0.10}/.github/workflows/macos.yml +0 -0
  101. {snplib-1.0.8 → snplib-1.0.10}/.github/workflows/windows.yml +0 -0
  102. {snplib-1.0.8 → snplib-1.0.10}/.gitignore +0 -0
  103. {snplib-1.0.8 → snplib-1.0.10}/LICENSE +0 -0
  104. {snplib-1.0.8 → snplib-1.0.10}/__init__.py +0 -0
  105. {snplib-1.0.8 → snplib-1.0.10}/docs/Makefile +0 -0
  106. {snplib-1.0.8 → snplib-1.0.10}/docs/examples.rst +0 -0
  107. {snplib-1.0.8 → snplib-1.0.10}/docs/index.rst +0 -0
  108. {snplib-1.0.8 → snplib-1.0.10}/docs/install.rst +0 -0
  109. {snplib-1.0.8 → snplib-1.0.10}/docs/intro.rst +0 -0
  110. {snplib-1.0.8/docs/_build/html/_static → snplib-1.0.10/docs}/logo.png +0 -0
  111. {snplib-1.0.8 → snplib-1.0.10}/docs/make.bat +0 -0
  112. {snplib-1.0.8 → snplib-1.0.10}/docs/modules.rst +0 -0
  113. {snplib-1.0.8 → snplib-1.0.10}/docs/snplib.finalreport.rst +0 -0
  114. {snplib-1.0.8 → snplib-1.0.10}/docs/snplib.format.rst +0 -0
  115. {snplib-1.0.8 → snplib-1.0.10}/docs/snplib.parentage.rst +0 -0
  116. {snplib-1.0.8 → snplib-1.0.10}/docs/snplib.rst +0 -0
  117. {snplib-1.0.8 → snplib-1.0.10}/docs/snplib.statistics.rst +0 -0
  118. {snplib-1.0.8 → snplib-1.0.10}/docs/usage.rst +0 -0
  119. {snplib-1.0.8 → snplib-1.0.10}/iconlib.png +0 -0
  120. {snplib-1.0.8 → snplib-1.0.10}/setup.cfg +0 -0
  121. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/__init__.py +0 -0
  122. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/finalreport/__init__.py +0 -0
  123. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/finalreport/_finalreport.py +0 -0
  124. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/format/__init__.py +0 -0
  125. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/format/__settings.py +0 -0
  126. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/format/_snp.py +0 -0
  127. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/parentage/__init__.py +0 -0
  128. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/parentage/_discov.py +0 -0
  129. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/parentage/_isagmark.py +0 -0
  130. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/parentage/_verif.py +0 -0
  131. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/parentage/isag_disc.pl +0 -0
  132. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/parentage/isag_verif.pl +0 -0
  133. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/statistics/__init__.py +0 -0
  134. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/statistics/_freq.py +0 -0
  135. {snplib-1.0.8 → snplib-1.0.10}/src/snplib/statistics/_snphwe.py +0 -0
  136. {snplib-1.0.8 → snplib-1.0.10}/src/snplib.egg-info/dependency_links.txt +0 -0
  137. {snplib-1.0.8 → snplib-1.0.10}/src/snplib.egg-info/requires.txt +0 -0
  138. {snplib-1.0.8 → snplib-1.0.10}/src/snplib.egg-info/top_level.txt +0 -0
  139. {snplib-1.0.8 → snplib-1.0.10}/tests/__init__.py +0 -0
  140. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/__init__.py +0 -0
  141. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file1.txt +0 -0
  142. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file1.xlsx +0 -0
  143. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file2.txt +0 -0
  144. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file2.xlsx +0 -0
  145. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file3.txt +0 -0
  146. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file3.xlsx +0 -0
  147. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file4.txt +0 -0
  148. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file5.txt +0 -0
  149. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file5.xlsx +0 -0
  150. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file6.txt +0 -0
  151. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file6.xlsx +0 -0
  152. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file7.txt +0 -0
  153. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/files/fr/file7.xlsx +0 -0
  154. {snplib-1.0.8 → snplib-1.0.10}/tests/finalreport/test_finalreport.py +0 -0
  155. {snplib-1.0.8 → snplib-1.0.10}/tests/format/__init__.py +0 -0
  156. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/fam/file.pl +0 -0
  157. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/fam/file2.pl +0 -0
  158. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/fam/file3.pl +0 -0
  159. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/fam/file4.pl +0 -0
  160. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/lgen/file.pl +0 -0
  161. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/map/file_bovinesnp50.csv +0 -0
  162. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/ped/file.pl +0 -0
  163. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/ped/file2.pl +0 -0
  164. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/ped/file3.pl +0 -0
  165. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fplink/ped/file4.pl +0 -0
  166. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fsnp/file1.txt +0 -0
  167. {snplib-1.0.8 → snplib-1.0.10}/tests/format/files/fsnp/file2.txt +0 -0
  168. {snplib-1.0.8 → snplib-1.0.10}/tests/format/test_plink_fam.py +0 -0
  169. {snplib-1.0.8 → snplib-1.0.10}/tests/format/test_plink_lgen.py +0 -0
  170. {snplib-1.0.8 → snplib-1.0.10}/tests/format/test_plink_map.py +0 -0
  171. {snplib-1.0.8 → snplib-1.0.10}/tests/format/test_plink_ped.py +0 -0
  172. {snplib-1.0.8 → snplib-1.0.10}/tests/format/test_snp.py +0 -0
  173. {snplib-1.0.8 → snplib-1.0.10}/tests/parentage/__init__.py +0 -0
  174. {snplib-1.0.8 → snplib-1.0.10}/tests/parentage/data/parentage_test_disc.csv +0 -0
  175. {snplib-1.0.8 → snplib-1.0.10}/tests/parentage/data/parentage_test_verf.csv +0 -0
  176. {snplib-1.0.8 → snplib-1.0.10}/tests/parentage/test_discov.py +0 -0
  177. {snplib-1.0.8 → snplib-1.0.10}/tests/parentage/test_verif.py +0 -0
  178. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/__init__.py +0 -0
  179. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/data/cr/file_cra.pl +0 -0
  180. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/data/cr/file_crm.pl +0 -0
  181. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/data/freq/etalon.txt +0 -0
  182. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/data/freq/file.pl +0 -0
  183. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/test_callrate.py +0 -0
  184. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/test_freq_allele.py +0 -0
  185. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/test_freq_maf.py +0 -0
  186. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/test_hwe_t.py +0 -0
  187. {snplib-1.0.8 → snplib-1.0.10}/tests/statistics/test_snphwe.py +0 -0
@@ -8,7 +8,7 @@ version: 2
8
8
  build:
9
9
  os: ubuntu-22.04
10
10
  tools:
11
- python: "3.11"
11
+ python: "3.12"
12
12
  # You can also specify other tool versions:
13
13
  # nodejs: "20"
14
14
  # rust: "1.70"
@@ -33,5 +33,7 @@ sphinx:
33
33
  # to build your documentation
34
34
  # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
35
35
  python:
36
- install:
37
- - requirements: requirements.txt
36
+ install:
37
+ - requirements: docs/requirements.txt
38
+ - method: pip
39
+ path: .
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: snplib
3
- Version: 1.0.8
3
+ Version: 1.0.10
4
4
  Summary: Snptools is a tool for Single Nucleotide Polymorphism (SNP) data processing
5
5
  Author-email: Igor <igor.loschinin@gmail.com>
6
6
  License: GNU
@@ -73,7 +73,7 @@ from snplib import (
73
73
  ```
74
74
 
75
75
  ## Documentation
76
- Detailed documentation on how to use SNPTools is available see the [docs](./docs/_build/index.html).
76
+ Detailed documentation on how to use SNPTools is available see the [docs](https://snptools.readthedocs.io/en/latest/).
77
77
 
78
78
  ## License
79
79
  This project is licensed under the GNU General Public License - see the
@@ -52,7 +52,7 @@ from snplib import (
52
52
  ```
53
53
 
54
54
  ## Documentation
55
- Detailed documentation on how to use SNPTools is available see the [docs](./docs/_build/index.html).
55
+ Detailed documentation on how to use SNPTools is available see the [docs](https://snptools.readthedocs.io/en/latest/).
56
56
 
57
57
  ## License
58
58
  This project is licensed under the GNU General Public License - see the
@@ -53,4 +53,4 @@ html_theme = 'sphinx_rtd_theme'
53
53
  # of the sidebar.
54
54
  html_logo = 'logo.png'
55
55
 
56
- html_static_path = ['_static']
56
+ # html_static_path = ['_static']
@@ -0,0 +1,2 @@
1
+ sphinx==7.2.6
2
+ sphinx_rtd_theme==1.3.0
@@ -17,7 +17,7 @@ snplib = ["*.pl"]
17
17
 
18
18
  [project]
19
19
  name = "snplib"
20
- version = "1.0.8"
20
+ version = "1.0.10"
21
21
  description = "Snptools is a tool for Single Nucleotide Polymorphism (SNP) data processing"
22
22
  authors = [
23
23
  {name = "Igor", email = "igor.loschinin@gmail.com"}
@@ -7,8 +7,6 @@ XlsxWriter==3.1.9
7
7
  openpyxl==3.1.2
8
8
  pydantic==2.4.2
9
9
  pytest==7.4.2
10
- sphinx==7.2.6
11
- sphinx_rtd_theme==1.3.0
12
10
  twine==6.0.1
13
11
  build==1.2.2.post1
14
12
  setuptools-scm==8.1.0
@@ -14,23 +14,20 @@ def make_map(manifest: pd.DataFrame) -> pd.DataFrame:
14
14
  """ PLINK text fileset variant information file
15
15
  https://www.cog-genomics.org/plink/1.9/formats#map
16
16
 
17
- A text file with no header line, and one line per variant with the following 3-4 fields:
17
+ A text file with no header line, and one line per variant with the
18
+ following 3-4 fields:
18
19
 
19
- 1. Chromosome code. PLINK 1.9 also permits contig names here, but most
20
- older programs do not.
21
- 2. Variant identifier
22
- 3. Position in morgans or centimorgans (optional; also safe to use
23
- dummy value of '0')
24
- 4. Base-pair coordinate
20
+ 1. Chromosome code. PLINK 1.9 also permits contig names here, but most older programs do not.
21
+ 2. Variant identifier.
22
+ 3. Position in morgans or centimorgans (optional; also safe to use dummy value of '0').
23
+ 4. Base-pair coordinate.
25
24
 
26
- All lines must have the same number of columns (so either no lines
27
- contain the morgans/centimorgans column, or all of them do).
25
+ All lines must have the same number of columns (so either no lines contain
26
+ the morgans/centimorgans column, or all of them do).
28
27
 
29
- :param manifest: The file that is taken on the Illumina website with full
30
- information about the chip
31
- https://support.illumina.com/downloads/bovinesnp50-v3-0-product-files.html
28
+ :param manifest: The file that is taken on the Illumina website with full information about the chip https://support.illumina.com/downloads/bovinesnp50-v3-0-product-files.html.
32
29
 
33
- :return: Return data in formate .map
30
+ :return: Return data in formate .map.
34
31
  """
35
32
 
36
33
  fields = ['Chr', 'Name', 'MapInfo']
@@ -69,12 +66,11 @@ def make_ped(
69
66
  genotype calls. Normally must be accompanied by a .map file.
70
67
  https://www.cog-genomics.org/plink/1.9/formats#ped
71
68
 
72
- The PED file has 6 fixed columns at the beginning followed by the SNP
69
+ The PED file has 6 fixed columns at the beginning followed by the SNP
73
70
  information. The columns should be separated by a whitespace or a tab. The
74
71
  first six columns hold the following information:
75
72
 
76
- 1. Family ID (if unknown use the same id as for the sample id in
77
- column two)
73
+ 1. Family ID (if unknown use the same id as for the sample id in column two)
78
74
  2. Sample ID
79
75
  3. Paternal ID (if unknown use 0)
80
76
  4. Maternal ID (if unknown use 0)
@@ -82,25 +78,23 @@ def make_ped(
82
78
  6. Affection (0=unknown; 1=unaffected; 2=affected)
83
79
  7. Genotypes (space or tab separated, 2 for each marker. 0/-9=missing)
84
80
 
85
- Here is a brief example of a genotype PED file containing 5 samples
81
+ Here is a brief example of a genotype PED file containing 5 samples
86
82
  with 10 homozygous SNPs:
87
- 4304 4304 0 0 0 0 C C C C G G G G G G C C G G C C T T T T
88
- 6925 6925 0 0 0 0 C C C C T T G G A A C C G G C C T T T T
89
- 7319 7319 0 0 0 0 C C C C G G G G G G C C G G C C T T T T
90
- 6963 6963 0 0 0 0 A A C C T T G G A A C C G G C C T T T T
91
- 6968 6968 0 0 0 0 C C C C G G G G G G G G G G C C T T T T
92
-
93
- :param data: Snp data that contain full or partial information on the
94
- animal
95
- :param sid_col: Sample ID. Column name in data
96
- :param snp_col: Snp column name in data
97
- :param fid_col: Family ID column name in data (if unknown use the same
98
- id as for the sample id in column two)
99
- :param father_col: Paternal ID column name in data (if unknown use 0)
100
- :param mother_col: Maternal ID column name in data (if unknown use 0)
101
- :param sex_col: Sex column name in data (if unknown use 0)
102
- :return: Returns an array of data in ped format to work with the plink
103
- program
83
+
84
+ 4304 4304 0 0 0 0 C C C C G G G G G G C C G G C C T T T T
85
+ 6925 6925 0 0 0 0 C C C C T T G G A A C C G G C C T T T T
86
+ 7319 7319 0 0 0 0 C C C C G G G G G G C C G G C C T T T T
87
+ 6963 6963 0 0 0 0 A A C C T T G G A A C C G G C C T T T T
88
+ 6968 6968 0 0 0 0 C C C C G G G G G G G G G G C C T T T T
89
+
90
+ :param data: Snp data that contain full or partial information on the animal.
91
+ :param sid_col: Sample ID. Column name in data.
92
+ :param snp_col: Snp column name in data.
93
+ :param fid_col: Family ID column name in data (if unknown use the same id as for the sample id in column two).
94
+ :param father_col: Paternal ID column name in data (if unknown use 0).
95
+ :param mother_col: Maternal ID column name in data (if unknown use 0).
96
+ :param sex_col: Sex column name in data (if unknown use 0).
97
+ :return: Returns an array of data in ped format to work with the plink program.
104
98
  """
105
99
 
106
100
  _fields = ["fid", "sid", "father", "mother", "sex", "not_used", "snp"]
@@ -153,37 +147,29 @@ def make_fam(
153
147
  sex_val: int = 0,
154
148
  pheno_col: str = None,
155
149
  pheno_val: int = -9
156
-
157
150
  ) -> pd.DataFrame | None:
158
151
  """ PLINK sample information file
159
152
  https://www.cog-genomics.org/plink/1.9/formats#fam
160
153
 
161
- A text file with no header line, and one line per sample with the
162
- following six fields:
154
+ A text file with no header line, and one line per sample with the following
155
+ six fields:
163
156
 
164
157
  1. Family ID ('FID')
165
158
  2. Within-family ID ('IID'; cannot be '0')
166
159
  3. Within-family ID of father ('0' if father isn't in dataset)
167
160
  4. Within-family ID of mother ('0' if mother isn't in dataset)
168
161
  5. Sex code ('1' = male, '2' = female, '0' = unknown)
169
- 6. Phenotype value ('1' = control, '2' = case, '-9'/'0'/non-numeric =
170
- missing data if case/control)
171
-
172
- :param data: Snp data that contain full or partial information on the
173
- animal
174
- :param fid_col: Family ID, default value "1". Must not contain
175
- underline - "_"
176
- :param sid_col: Within-family ID ('IID'; cannot be '0'). Must not contain
177
- underline - "_"
178
- :param father_col: Within-family ID of father ('0' if father isn't in
179
- dataset)
180
- :param mother_col: Within-family ID of mother ('0' if mother isn't in
181
- dataset)
162
+ 6. Phenotype value ('1' = control, '2' = case, '-9'/'0'/non-numeric = missing data if case/control)
163
+
164
+ :param data: Snp data that contain full or partial information on the animal
165
+ :param fid_col: Family ID, default value "1". Must not contain underline - "_"
166
+ :param sid_col: Within-family ID ('IID'; cannot be '0'). Must not contain underline - "_"
167
+ :param father_col: Within-family ID of father ('0' if father isn't in dataset)
168
+ :param mother_col: Within-family ID of mother ('0' if mother isn't in dataset)
182
169
  :param sex_col: Sex column name in data
183
170
  :param sex_val: Sex code ('1' = male, '2' = female, '0' = unknown)
184
171
  :param pheno_col: Pheno column name in data
185
- :param pheno_val: Phenotype value ('1' = control, '2' = case,
186
- '-9'/'0'/non-numeric = missing data if case/control)
172
+ :param pheno_val: Phenotype value ('1' = control, '2' = case,'-9'/'0'/non-numeric = missing data if case/control)
187
173
  :return: Return data in formate .fam
188
174
  """
189
175
 
@@ -236,7 +222,7 @@ def make_lgen(
236
222
  """ PLINK long-format genotype file
237
223
  https://www.cog-genomics.org/plink/1.9/formats#lgen
238
224
 
239
- A text file with no header line, and one line per genotype call (or
225
+ A text file with no header line, and one line per genotype call (or
240
226
  just not-homozygous-major calls if 'lgen-ref' was invoked) usually with
241
227
  the following five fields:
242
228
 
@@ -246,7 +232,7 @@ def make_lgen(
246
232
  4. Allele call 1 ('0' for missing)
247
233
  5. Allele call 2
248
234
 
249
- There are several variations which are also handled by PLINK; see the
235
+ There are several variations which are also handled by PLINK; see the
250
236
  original discussion for details.
251
237
 
252
238
  :param data: Data the after parsing FinalReport.txt
@@ -254,7 +240,7 @@ def make_lgen(
254
240
  :param snp_name:
255
241
  :param fid_col: Family ID, default value "1"
256
242
  :param alleles:
257
- :return: - Return data in formate .lgen
243
+ :return: Return data in formate .lgen
258
244
  """
259
245
  _fields = ['fid', 'sid', 'snp_name', 'allele1', 'allele2']
260
246
  _f_dtype = dict(zip(_fields, (str for _ in range(len(_fields)))))
@@ -295,7 +281,7 @@ def _check_underscore(value: str) -> bool:
295
281
  """ Checking for underscore in a string
296
282
 
297
283
  :param value: String for checked
298
- :return: Return True if there is an underline in the string, False if not
284
+ :return: Return True if there is an underline in the string, False if not.
299
285
  """
300
286
  _under_l = re.compile(r"_")
301
287
 
@@ -15,11 +15,12 @@ def call_rate(
15
15
  not missing. In the following example, we filter using a call rate of 95%,
16
16
  meaning we retain SNPs for which there is less than 5% missing data.
17
17
 
18
- Of the say, 54K markers in the chip, 50K have been genotyped for a
19
- particular animal, the “call rate animal” is 50K/54K=93%
20
- Of the say, 900 animals genotyped for marker CL635944_160.1, how many
18
+ Of the say, 54K markers in the chip, 50K have been genotyped for a
19
+ particular animal, the “call rate animal” is 50K/54K=93%.
20
+
21
+ Of the say, 900 animals genotyped for marker CL635944_160.1, how many
21
22
  have actually been successfully read? Assume that 600 have been read, then
22
- the “call rate marker” is 600/900 = 67%
23
+ the “call rate marker” is 600/900 = 67%.
23
24
 
24
25
  :param data: Pre-processed data on which the call rate is calculated.
25
26
  :param id_col: The name of the column with the id of the animals or
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: snplib
3
- Version: 1.0.8
3
+ Version: 1.0.10
4
4
  Summary: Snptools is a tool for Single Nucleotide Polymorphism (SNP) data processing
5
5
  Author-email: Igor <igor.loschinin@gmail.com>
6
6
  License: GNU
@@ -73,7 +73,7 @@ from snplib import (
73
73
  ```
74
74
 
75
75
  ## Documentation
76
- Detailed documentation on how to use SNPTools is available see the [docs](./docs/_build/index.html).
76
+ Detailed documentation on how to use SNPTools is available see the [docs](https://snptools.readthedocs.io/en/latest/).
77
77
 
78
78
  ## License
79
79
  This project is licensed under the GNU General Public License - see the
@@ -0,0 +1,98 @@
1
+ .gitignore
2
+ .readthedocs.yaml
3
+ LICENSE
4
+ README.md
5
+ __init__.py
6
+ iconlib.png
7
+ pyproject.toml
8
+ requirements.txt
9
+ .github/workflows/linux.yml
10
+ .github/workflows/macos.yml
11
+ .github/workflows/windows.yml
12
+ docs/Makefile
13
+ docs/conf.py
14
+ docs/examples.rst
15
+ docs/index.rst
16
+ docs/install.rst
17
+ docs/intro.rst
18
+ docs/logo.png
19
+ docs/make.bat
20
+ docs/modules.rst
21
+ docs/requirements.txt
22
+ docs/snplib.finalreport.rst
23
+ docs/snplib.format.rst
24
+ docs/snplib.parentage.rst
25
+ docs/snplib.rst
26
+ docs/snplib.statistics.rst
27
+ docs/usage.rst
28
+ src/snplib/__init__.py
29
+ src/snplib.egg-info/PKG-INFO
30
+ src/snplib.egg-info/SOURCES.txt
31
+ src/snplib.egg-info/dependency_links.txt
32
+ src/snplib.egg-info/requires.txt
33
+ src/snplib.egg-info/top_level.txt
34
+ src/snplib/finalreport/__init__.py
35
+ src/snplib/finalreport/_finalreport.py
36
+ src/snplib/format/__init__.py
37
+ src/snplib/format/__settings.py
38
+ src/snplib/format/_plink.py
39
+ src/snplib/format/_snp.py
40
+ src/snplib/parentage/__init__.py
41
+ src/snplib/parentage/_discov.py
42
+ src/snplib/parentage/_isagmark.py
43
+ src/snplib/parentage/_verif.py
44
+ src/snplib/parentage/isag_disc.pl
45
+ src/snplib/parentage/isag_verif.pl
46
+ src/snplib/statistics/__init__.py
47
+ src/snplib/statistics/_callrate.py
48
+ src/snplib/statistics/_freq.py
49
+ src/snplib/statistics/_snphwe.py
50
+ tests/__init__.py
51
+ tests/finalreport/__init__.py
52
+ tests/finalreport/test_finalreport.py
53
+ tests/finalreport/files/fr/file1.txt
54
+ tests/finalreport/files/fr/file1.xlsx
55
+ tests/finalreport/files/fr/file2.txt
56
+ tests/finalreport/files/fr/file2.xlsx
57
+ tests/finalreport/files/fr/file3.txt
58
+ tests/finalreport/files/fr/file3.xlsx
59
+ tests/finalreport/files/fr/file4.txt
60
+ tests/finalreport/files/fr/file5.txt
61
+ tests/finalreport/files/fr/file5.xlsx
62
+ tests/finalreport/files/fr/file6.txt
63
+ tests/finalreport/files/fr/file6.xlsx
64
+ tests/finalreport/files/fr/file7.txt
65
+ tests/finalreport/files/fr/file7.xlsx
66
+ tests/format/__init__.py
67
+ tests/format/test_plink_fam.py
68
+ tests/format/test_plink_lgen.py
69
+ tests/format/test_plink_map.py
70
+ tests/format/test_plink_ped.py
71
+ tests/format/test_snp.py
72
+ tests/format/files/fplink/fam/file.pl
73
+ tests/format/files/fplink/fam/file2.pl
74
+ tests/format/files/fplink/fam/file3.pl
75
+ tests/format/files/fplink/fam/file4.pl
76
+ tests/format/files/fplink/lgen/file.pl
77
+ tests/format/files/fplink/map/file_bovinesnp50.csv
78
+ tests/format/files/fplink/ped/file.pl
79
+ tests/format/files/fplink/ped/file2.pl
80
+ tests/format/files/fplink/ped/file3.pl
81
+ tests/format/files/fplink/ped/file4.pl
82
+ tests/format/files/fsnp/file1.txt
83
+ tests/format/files/fsnp/file2.txt
84
+ tests/parentage/__init__.py
85
+ tests/parentage/test_discov.py
86
+ tests/parentage/test_verif.py
87
+ tests/parentage/data/parentage_test_disc.csv
88
+ tests/parentage/data/parentage_test_verf.csv
89
+ tests/statistics/__init__.py
90
+ tests/statistics/test_callrate.py
91
+ tests/statistics/test_freq_allele.py
92
+ tests/statistics/test_freq_maf.py
93
+ tests/statistics/test_hwe_t.py
94
+ tests/statistics/test_snphwe.py
95
+ tests/statistics/data/cr/file_cra.pl
96
+ tests/statistics/data/cr/file_crm.pl
97
+ tests/statistics/data/freq/etalon.txt
98
+ tests/statistics/data/freq/file.pl
@@ -1,4 +0,0 @@
1
- # Sphinx build info version 1
2
- # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
- config: 944be3eb8fb6526254e9c17f59a2d7d0
4
- tags: 645f666f9bcd5a90fca523b33c5a78b7
@@ -1,113 +0,0 @@
1
- <!DOCTYPE html>
2
- <html class="writer-html5" lang="en" >
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Overview: module code &mdash; snptools version 1.0.8 documentation</title>
7
- <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
8
- <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
9
- <!--[if lt IE 9]>
10
- <script src="../_static/js/html5shiv.min.js"></script>
11
- <![endif]-->
12
-
13
- <script src="../_static/jquery.js?v=5d32c60e"></script>
14
- <script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
15
- <script src="../_static/documentation_options.js?v=7967727a"></script>
16
- <script src="../_static/doctools.js?v=888ff710"></script>
17
- <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
18
- <script src="../_static/js/theme.js"></script>
19
- <link rel="index" title="Index" href="../genindex.html" />
20
- <link rel="search" title="Search" href="../search.html" />
21
- </head>
22
-
23
- <body class="wy-body-for-nav">
24
- <div class="wy-grid-for-nav">
25
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
26
- <div class="wy-side-scroll">
27
- <div class="wy-side-nav-search" >
28
-
29
-
30
-
31
- <a href="../index.html" class="icon icon-home">
32
- snptools
33
- <img src="../_static/logo.png" class="logo" alt="Logo"/>
34
- </a>
35
- <div role="search">
36
- <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
37
- <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
38
- <input type="hidden" name="check_keywords" value="yes" />
39
- <input type="hidden" name="area" value="default" />
40
- </form>
41
- </div>
42
- </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
43
- <ul>
44
- <li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction</a></li>
45
- <li class="toctree-l1"><a class="reference internal" href="../install.html">Installation</a></li>
46
- <li class="toctree-l1"><a class="reference internal" href="../usage.html">Usage</a></li>
47
- <li class="toctree-l1"><a class="reference internal" href="../examples.html">Code Examples</a></li>
48
- <li class="toctree-l1"><a class="reference internal" href="../modules.html">snplib</a></li>
49
- </ul>
50
-
51
- </div>
52
- </div>
53
- </nav>
54
-
55
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
56
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
57
- <a href="../index.html">snptools</a>
58
- </nav>
59
-
60
- <div class="wy-nav-content">
61
- <div class="rst-content">
62
- <div role="navigation" aria-label="Page navigation">
63
- <ul class="wy-breadcrumbs">
64
- <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
65
- <li class="breadcrumb-item active">Overview: module code</li>
66
- <li class="wy-breadcrumbs-aside">
67
- </li>
68
- </ul>
69
- <hr/>
70
- </div>
71
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
72
- <div itemprop="articleBody">
73
-
74
- <h1>All modules for which code is available</h1>
75
- <ul><li><a href="snplib/finalreport/_finalreport.html">snplib.finalreport._finalreport</a></li>
76
- <li><a href="snplib/format/_plink.html">snplib.format._plink</a></li>
77
- <li><a href="snplib/format/_snp.html">snplib.format._snp</a></li>
78
- <li><a href="snplib/parentage/_discov.html">snplib.parentage._discov</a></li>
79
- <li><a href="snplib/parentage/_isagmark.html">snplib.parentage._isagmark</a></li>
80
- <li><a href="snplib/parentage/_verif.html">snplib.parentage._verif</a></li>
81
- <li><a href="snplib/statistics/_callrate.html">snplib.statistics._callrate</a></li>
82
- <li><a href="snplib/statistics/_freq.html">snplib.statistics._freq</a></li>
83
- <li><a href="snplib/statistics/_snphwe.html">snplib.statistics._snphwe</a></li>
84
- </ul>
85
-
86
- </div>
87
- </div>
88
- <footer>
89
-
90
- <hr/>
91
-
92
- <div role="contentinfo">
93
- <p>&#169; Copyright 2025, Igor Locshinin.</p>
94
- </div>
95
-
96
- Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
97
- <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
98
- provided by <a href="https://readthedocs.org">Read the Docs</a>.
99
-
100
-
101
- </footer>
102
- </div>
103
- </div>
104
- </section>
105
- </div>
106
- <script>
107
- jQuery(function () {
108
- SphinxRtdTheme.Navigation.enable(true);
109
- });
110
- </script>
111
-
112
- </body>
113
- </html>