snplib 1.0.9__py3-none-any.whl → 1.1.10__py3-none-any.whl

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.
@@ -7,11 +7,15 @@ from pathlib import Path
7
7
  from functools import reduce
8
8
 
9
9
  import re
10
+
11
+ from numpy import nan
10
12
  import pandas as pd
11
13
 
12
14
 
13
15
  class FinalReport(object):
14
- """ File that contains SNP information.
16
+ """ File that contains SNP information. File processing is triggered by the
17
+ handle method. If values in 'SID' or 'UNIQ_KEY' were missing in the xlsx
18
+ conversion file, the processed data will contain NAN values.
15
19
 
16
20
  :argument allele: A variant form of a single nucleotide polymorphism
17
21
  (SNP), a specific polymorphic site or a whole gene detectable at
@@ -235,17 +239,15 @@ class FinalReport(object):
235
239
  if self._check_on_ru_symbols(self._map_rn.UNIQ_KEY):
236
240
  raise Exception("Error. Unique keys contain Cyrillic alphabet.")
237
241
 
238
- if self._map_rn.UNIQ_KEY.isna().any():
239
- self._map_rn.fillna('unknown', inplace=True)
240
-
241
242
  @staticmethod
242
243
  def _check_on_ru_symbols(seq: pd.Series) -> bool | None:
243
- """
244
+ """ Checial verification of the Cyrillic
244
245
 
245
- :param seq:
246
- :return:
246
+ :param seq: Squeezed for verification.
247
+ :return: Truth if there are no symbols of Cyril and there is a lie if
248
+ there is.
247
249
  """
248
250
 
249
- return any(seq.apply(lambda x: bool(re.search('[а-яА-Я]', x))))
250
-
251
-
251
+ return seq.apply(
252
+ lambda x: bool(re.search('[а-яА-Я]', x)) if x is not nan else x
253
+ ).any()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: snplib
3
- Version: 1.0.9
3
+ Version: 1.1.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
@@ -10,14 +10,14 @@ Classifier: Operating System :: OS Independent
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: numpy>=1.26.1
14
- Requires-Dist: pandas>=2.1.1
15
- Requires-Dist: six>=1.16.0
13
+ Requires-Dist: numpy>=2.2.3
14
+ Requires-Dist: pandas>=2.2.3
15
+ Requires-Dist: six>=1.17.0
16
16
  Requires-Dist: swifter>=1.4.0
17
17
  Requires-Dist: xlrd>=2.0.1
18
- Requires-Dist: XlsxWriter>=3.1.9
19
- Requires-Dist: openpyxl>=3.1.2
20
- Requires-Dist: pydantic>=2.4.2
18
+ Requires-Dist: XlsxWriter>=3.2.2
19
+ Requires-Dist: openpyxl>=3.1.5
20
+ Requires-Dist: pydantic>=2.10.6
21
21
 
22
22
  # snptools
23
23
  <p align="center">
@@ -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
@@ -1,6 +1,6 @@
1
1
  snplib/__init__.py,sha256=xhjj4ZywdwCq91GBh1zfBP_TwFW26-KpHcCUUVvMdgI,196
2
2
  snplib/finalreport/__init__.py,sha256=Yk49x8t-STIfsdP6QLMtaGm1gTj_n-XS8kchPguvW1g,161
3
- snplib/finalreport/_finalreport.py,sha256=el_d8MVmpic3wKCRJ-J52VZYSmMuNSf4p_tmPkgh0Z0,5876
3
+ snplib/finalreport/_finalreport.py,sha256=dE44NsJ5ciGyFCh2LpFncf4LwQDI_-l4LatOPg879Sk,6148
4
4
  snplib/format/__init__.py,sha256=3W_l_sP1u9HV3HWwnsJxPGw9anrVknstqLaJmWQaG0k,261
5
5
  snplib/format/__settings.py,sha256=kyAVZ4tiU61sNr3jQhjXbLXRyBA3pjFfCw3fOfSkY14,289
6
6
  snplib/format/_plink.py,sha256=cjT6PkvDJr8KwvQo76i7_Hm1Og4bASYCDN9G7CHsQ00,10372
@@ -15,8 +15,8 @@ snplib/statistics/__init__.py,sha256=XJFU7mEwAJJ2M187jEkO8rFNYKoxF-g9KF_stS7eFFw
15
15
  snplib/statistics/_callrate.py,sha256=yfHxnNVpcDfV3qxZVwrk2RWPgy9dTf7NHWczDUORwtY,1866
16
16
  snplib/statistics/_freq.py,sha256=ZPZBZM3xq9EseOxuMzRVvzkjjFfaaA4ZvF7XI8ctON0,1623
17
17
  snplib/statistics/_snphwe.py,sha256=KcoRGwovMCc53-GJ8VfYs_3ZEHObgt8B0EvrW5nFnmM,3353
18
- snplib-1.0.9.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
19
- snplib-1.0.9.dist-info/METADATA,sha256=tgDJRi81nc66_LSZtTTkvPENK6r9OZ6WKf_MGPk7hcg,2163
20
- snplib-1.0.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
21
- snplib-1.0.9.dist-info/top_level.txt,sha256=CGCrLXuCSyXPCTwMFQjPxQR7b93FFFft56sAPPun_2g,7
22
- snplib-1.0.9.dist-info/RECORD,,
18
+ snplib-1.1.10.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
19
+ snplib-1.1.10.dist-info/METADATA,sha256=hmE1zLFNhDwwbl03PVupafM1n-NGOV2yKYmKzi1a6lw,2184
20
+ snplib-1.1.10.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
21
+ snplib-1.1.10.dist-info/top_level.txt,sha256=CGCrLXuCSyXPCTwMFQjPxQR7b93FFFft56sAPPun_2g,7
22
+ snplib-1.1.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (75.8.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5