seer-pas-sdk 0.1.3__py3-none-any.whl → 3.0.0__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.
@@ -0,0 +1,18 @@
1
+ seer_pas_sdk/__init__.py,sha256=Ie6atdmdBV-OmdHHXjhrGhdFGXiyP3JKhKrr3hyvSsA,563
2
+ seer_pas_sdk/auth/__init__.py,sha256=e_eM4jJnnyKUdg4Nggzi9ypt2MLWcEJ8CmCPkUaQDSs,23
3
+ seer_pas_sdk/auth/auth.py,sha256=C9XQWg2dScHcvvypqnjmluRlH-GEuc4D9rYyG9_OnN0,2965
4
+ seer_pas_sdk/common/__init__.py,sha256=jA5qm-t9x3qXMp5Q6v7vV2kZdLw32-lnbtf0fPY4lIw,22482
5
+ seer_pas_sdk/common/errors.py,sha256=4HFORWnaQQCMXRE8kwdsJWvQRB_3KFEZ7yMb391e4gA,142
6
+ seer_pas_sdk/common/groupanalysis.py,sha256=DxB-gbQfYzl7p9MTYWDIqghcH-IeakzdYdrRZrlIHek,1730
7
+ seer_pas_sdk/core/__init__.py,sha256=rxbKgg-Qe24OaxX2zyHHYPYgDCTEKE_-41bB2wvpvL4,25
8
+ seer_pas_sdk/core/sdk.py,sha256=qYcfBLNwOwgeYgK2Xy9bS26ydqAz9XG778hTbz337Ww,101284
9
+ seer_pas_sdk/core/unsupported.py,sha256=cpWkUXioYEmG7L6GyHZ2Vf-4OfN-UfVX0_KGBAu9jco,59890
10
+ seer_pas_sdk/objects/__init__.py,sha256=HJLS6sOr7DfzdI14fv5dWcITEj5QQsKcdfED3YNvUrY,107
11
+ seer_pas_sdk/objects/groupanalysis.py,sha256=x3D_5NmYBoPDilNCQqUoCFARIfIeUq4FBY3_N6u8tfM,994
12
+ seer_pas_sdk/objects/platemap.py,sha256=8IvJPAecs_e_FyqibzhCw-O4zjCFnf-zMUp_5krTEsg,5864
13
+ seer_pas_sdk/objects/volcanoplot.py,sha256=tKuCWDIdoO8FLJlhpXhuwHn0aMYnvudTugxAslDXyGs,9357
14
+ seer_pas_sdk-3.0.0.dist-info/licenses/LICENSE.txt,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
15
+ seer_pas_sdk-3.0.0.dist-info/METADATA,sha256=WY2yk1sWqKdxg6Ae-5oWFzfSVR1NfL-NCddD-5xLBsU,13448
16
+ seer_pas_sdk-3.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ seer_pas_sdk-3.0.0.dist-info/top_level.txt,sha256=-2kZ-KFMGtXwr8H1O5llMKlcJ8gRKohEmrIvazXB61s,13
18
+ seer_pas_sdk-3.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (73.0.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,50 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: seer-pas-sdk
3
- Version: 0.1.3
4
- Summary: SDK for Seer Proteograph Analysis Suite (PAS)
5
- Home-page: https://github.com/seerbio/seer-pas-sdk
6
- Author: Agam Jolly
7
- Author-email: ajolly@seer.bio
8
- Project-URL: Bug Tracker, https://github.com/seerbio/seer-pas-sdk/issues
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE.txt
15
- Requires-Dist: boto3==1.26.152
16
- Requires-Dist: botocore==1.29.152
17
- Requires-Dist: pandas==2.0.1
18
- Requires-Dist: numpy<2.0.0,>=1.5.3
19
- Requires-Dist: PyJWT==2.8.0
20
- Requires-Dist: python-dotenv==1.0.0
21
- Requires-Dist: Requests==2.31.0
22
- Requires-Dist: tqdm==4.65.0
23
-
24
- # Seer PAS Python SDK
25
-
26
- [![Test](https://github.com/seerbio/seer-pas-sdk/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/seerbio/seer-pas-sdk/actions/workflows/test.yml)
27
- [![Lint](https://github.com/seerbio/seer-pas-sdk/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/seerbio/seer-pas-sdk/actions/workflows/lint.yml)
28
-
29
- This SDK permits interaction with the Seer Proteograph Analysis Suite using Python.
30
-
31
- ## Installation
32
-
33
- ```shell
34
- pip install seer-pas-sdk
35
- ```
36
-
37
- ## Usage
38
-
39
- To import and set up the SDK:
40
-
41
- ```python
42
- from seer_pas_sdk import SeerSDK
43
-
44
- # Instantiate an SDK object with your credentials:
45
- sdk = SeerSDK(USERNAME, PASSWORD)
46
- ```
47
-
48
- You can then use the SDK's methods to create, query, or retrieve projects, plates, samples, and analyses.
49
-
50
- For complete documentation of this SDK, visit [https://seerbio.github.io/seer-pas-sdk/](https://seerbio.github.io/seer-pas-sdk/ "Documentation").
@@ -1,19 +0,0 @@
1
- seer_pas_sdk/__init__.py,sha256=Ie6atdmdBV-OmdHHXjhrGhdFGXiyP3JKhKrr3hyvSsA,563
2
- seer_pas_sdk/auth/__init__.py,sha256=e_eM4jJnnyKUdg4Nggzi9ypt2MLWcEJ8CmCPkUaQDSs,23
3
- seer_pas_sdk/auth/auth.py,sha256=DZcbkYel11GvIn-iiutt9UOVfj9URZ_f89QMHhyGfRg,2277
4
- seer_pas_sdk/common/__init__.py,sha256=QnBup2dT6okt62Yjdhik4DmLf36Ozgv6KybdvFAULaA,12260
5
- seer_pas_sdk/core/__init__.py,sha256=rxbKgg-Qe24OaxX2zyHHYPYgDCTEKE_-41bB2wvpvL4,25
6
- seer_pas_sdk/core/sdk.py,sha256=IlTFn09nZ21iHffh502qAvKUhWcO_bcR6c9723AJckw,45291
7
- seer_pas_sdk/objects/__init__.py,sha256=ljq6G4yeE3GoefDPqEYx1tLrDuD_9H_7_hedo6-OAuk,31
8
- seer_pas_sdk/objects/platemap.py,sha256=DosquJu2-XvDjVj4JFKoXa0DBVS8OroYCDeS5Np4U8Q,3693
9
- tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- tests/conftest.py,sha256=nu5Qu8CHwgJEwFpLQ0iX8e5csz4HGIC2oe50AdkA2Ms,317
11
- tests/test_auth.py,sha256=np4XXbEzoSFf-zXKaZQFL4Ry1ehMtjbXtHG3J6D-zzc,933
12
- tests/test_common.py,sha256=3VgHPbeLVJCh8V0kBGMvkhTKMd6sN_eLJF3AgvbyH0I,3433
13
- tests/test_objects.py,sha256=BcQtE8CbGUAnFlbkwsaJalUV6D8WbdwN2aWiQddh3k4,2521
14
- tests/test_sdk.py,sha256=ZNfsRAe_YHIXfteVugfkcds_lmYb0emIfDbJz7jpqR4,239
15
- seer_pas_sdk-0.1.3.dist-info/LICENSE.txt,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
16
- seer_pas_sdk-0.1.3.dist-info/METADATA,sha256=3OrGnwgKw2ECRB-LTulbhxFAlbVw7ialPFQdfR39ddg,1714
17
- seer_pas_sdk-0.1.3.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
18
- seer_pas_sdk-0.1.3.dist-info/top_level.txt,sha256=gMffZ5LfTF87Sr-oiyl-rtY6omfBslYCA2S4DM7YNC8,19
19
- seer_pas_sdk-0.1.3.dist-info/RECORD,,
tests/__init__.py DELETED
File without changes
tests/conftest.py DELETED
@@ -1,17 +0,0 @@
1
- """
2
- `conftest.py` -- common fixtures and other pytest config
3
- """
4
-
5
- import pytest
6
-
7
- from seer_pas_sdk import PlateMap
8
-
9
-
10
- @pytest.fixture
11
- def platemap():
12
- """A very basic platemap"""
13
- return PlateMap(
14
- ms_file_name=["test.msfile"],
15
- sample_name=["TEST_sample_name"],
16
- sample_id=["TEST0"],
17
- )
tests/test_auth.py DELETED
@@ -1,48 +0,0 @@
1
- import pytest
2
-
3
- from seer_pas_sdk.auth import Auth
4
-
5
-
6
- @pytest.fixture
7
- def password():
8
- return "XXX_fake_password"
9
-
10
-
11
- @pytest.fixture
12
- def username():
13
- return "XXX_fake_user"
14
-
15
-
16
- @pytest.fixture(
17
- params=[
18
- *Auth._instances.keys(),
19
- *Auth._instances.values(),
20
- "https://secure-https-url.example/",
21
- ]
22
- )
23
- def valid_instance(request):
24
- return request.param
25
-
26
-
27
- def test_valid_instance(username, password, valid_instance):
28
- Auth(
29
- username=username,
30
- password=password,
31
- instance=valid_instance,
32
- )
33
-
34
-
35
- @pytest.fixture(
36
- params=["XX", "http://insecure-http-url.example/", "my-favorite-instance"]
37
- )
38
- def invalid_instance(request):
39
- return request.param
40
-
41
-
42
- def test_invalid_instance(username, password, invalid_instance):
43
- with pytest.raises(ValueError):
44
- Auth(
45
- username=username,
46
- password=password,
47
- instance=invalid_instance,
48
- )
tests/test_common.py DELETED
@@ -1,99 +0,0 @@
1
- import pytest
2
-
3
- from seer_pas_sdk.common import *
4
-
5
-
6
- @pytest.fixture
7
- def mock_sample(platemap):
8
- """A file name in our mock platemap"""
9
- idx = 0
10
- return (
11
- platemap.ms_file_name[idx],
12
- platemap.sample_name[idx],
13
- platemap.sample_id[idx],
14
- )
15
-
16
-
17
- @pytest.fixture(scope="function")
18
- def platemap_file(platemap, tmpdir):
19
- """Our mock platemap, as a file"""
20
- outfile = tmpdir / "test_platemap.csv"
21
-
22
- platemap.to_csv(outfile)
23
-
24
- yield outfile
25
-
26
- # Clean up test file
27
- outfile.remove()
28
-
29
-
30
- def test_get_sample_info(platemap_file, mock_sample):
31
- """Test that get_sample_info correctly parses the platemap file"""
32
- filename, sample_name, sample_id = mock_sample
33
-
34
- plate_id = "TEST_plate_id"
35
- ms_data_files = {filename}
36
- space = "TEST_space_id"
37
- res = get_sample_info(
38
- plate_id=plate_id,
39
- ms_data_files=ms_data_files,
40
- plate_map_file=platemap_file,
41
- space=space,
42
- sample_description_file=None, # TODO: test sample description file
43
- )
44
-
45
- assert len(res) == 1
46
-
47
- for sampleinfo in res:
48
- assert sampleinfo["plateID"] == plate_id
49
- assert sampleinfo["sampleName"] == sample_name
50
- assert sampleinfo["sampleID"] == sample_id
51
- assert sampleinfo["sampleUserGroup"] == space
52
-
53
-
54
- def test_get_sample_info_missing_file(platemap_file):
55
- """Test that get_sample_info raises an exception if a file doesn't exist"""
56
-
57
- plate_id = "TEST_plate_id"
58
- ms_data_files = {"XXX_file_does_not_exist"}
59
- space = "TEST_space_id"
60
- with pytest.raises(ValueError):
61
- res = get_sample_info(
62
- plate_id=plate_id,
63
- ms_data_files=ms_data_files,
64
- plate_map_file=platemap_file,
65
- space=space,
66
- )
67
-
68
-
69
- def test_camel_case():
70
- assert camel_case("my favorite") == "myFavorite"
71
- assert camel_case("my Favorite") == "myFavorite"
72
- assert camel_case("My favorite") == "myFavorite"
73
- assert camel_case("My Favorite") == "myFavorite"
74
- assert camel_case("snake_case") == "snakeCase"
75
- assert camel_case("snake_Case") == "snakeCase"
76
- assert camel_case("Snake_case") == "snakeCase"
77
- assert camel_case("Snake_Case") == "snakeCase"
78
- assert camel_case("camelcase") == "camelcase"
79
- assert camel_case("camelCase") == "camelcase"
80
- assert camel_case("Camelcase") == "camelcase"
81
- assert camel_case("CamelCase") == "camelcase"
82
- assert camel_case("kebab-case") == "kebabCase"
83
- assert camel_case("kebab-Case") == "kebabCase"
84
- assert camel_case("Kebab-case") == "kebabCase"
85
- assert camel_case("Kebab-Case") == "kebabCase"
86
-
87
- # Corner cases:
88
- assert camel_case("two\nlines") == "two\nLines"
89
- assert camel_case("two\nLines") == "two\nLines"
90
- assert camel_case("Two\nlines") == "two\nLines"
91
- assert camel_case("Two\nLines") == "two\nLines"
92
- assert camel_case("über コンピュータコード") == "überコンピュータコード"
93
- assert camel_case("über コンピュータコード") == "überコンピュータコード"
94
- assert camel_case("Über コンピュータコード") == "überコンピュータコード"
95
- assert camel_case("Über コンピュータコード") == "überコンピュータコード"
96
- assert camel_case("clap👏back") == "clap👏Back"
97
- assert camel_case("clap👏Back") == "clap👏Back"
98
- assert camel_case("Clap👏back") == "clap👏Back"
99
- assert camel_case("Clap👏Back") == "clap👏Back"
tests/test_objects.py DELETED
@@ -1,91 +0,0 @@
1
- from io import StringIO
2
-
3
- import pandas as pd
4
- import pytest
5
-
6
- from seer_pas_sdk.objects import PlateMap
7
-
8
-
9
- def test_toofew_items():
10
- """Test passing too few items to one or more attributes"""
11
- filenames = ["test_0.msfile", "test_1.msfile"]
12
- samplenames = ["TEST_sample_name"]
13
- platemap = PlateMap(
14
- ms_file_name=filenames.copy(), # prevent mutating shared state
15
- sample_name=samplenames.copy(), # prevent mutating shared state
16
- )
17
-
18
- assert len(platemap.ms_file_name) == len(filenames)
19
- assert len(platemap.sample_name) == len(filenames)
20
-
21
- for i in range(len(platemap.sample_name)):
22
- assert (platemap.sample_name[i] == None) == (i >= len(samplenames))
23
-
24
-
25
- def test_toomany_items():
26
- with pytest.raises(ValueError):
27
- PlateMap(
28
- ms_file_name=["test.msfile"],
29
- sample_name=["TEST_sample_name_0", "TEST_sample_name_1"],
30
- )
31
-
32
-
33
- def test_platemap_to_dict(platemap):
34
- res = platemap.to_dict()
35
-
36
- assert isinstance(res, dict)
37
-
38
- for k in res:
39
- assert len(res[k]) == platemap.length
40
-
41
-
42
- def test_platemap_to_df(platemap):
43
- res = platemap.to_df()
44
-
45
- assert isinstance(res, pd.DataFrame)
46
-
47
- assert len(res) == platemap.length
48
-
49
- for k in res.columns:
50
- assert len(res[k]) == platemap.length
51
-
52
-
53
- def test_platemap_to_csv_str(platemap):
54
- res = platemap.to_csv()
55
-
56
- assert isinstance(res, str)
57
- assert len(StringIO(res).readlines()) == platemap.length + 1
58
-
59
- # Re-parse CSV with Pandas for additional checks
60
- df = pd.read_csv(StringIO(res))
61
-
62
- assert len(df) == platemap.length
63
- for k in df.columns:
64
- assert len(df[k]) == platemap.length
65
-
66
-
67
- def test_platemap_to_csv_file(platemap, tmpdir):
68
- outfile = tmpdir / "test.csv"
69
- res = platemap.to_csv(outfile)
70
-
71
- with open(outfile, "r") as f:
72
- assert len(f.readlines()) == platemap.length + 1
73
-
74
- # Re-parse CSV with Pandas for additional checks
75
- f.seek(0)
76
- df = pd.read_csv(f)
77
-
78
- assert len(df) == platemap.length
79
- for k in df.columns:
80
- assert len(df[k]) == platemap.length
81
-
82
-
83
- def test_mutate_defaults():
84
- """Test that default values in the construtor aren't shared mutable instances"""
85
-
86
- # Force extension of default (empty) values by creating a platemap with 2 samples
87
- platemap_0 = PlateMap(["test_0.msfile", "test_1.msfile"])
88
-
89
- # Now create a platemap with fewer samples; this will trigger an error if the default
90
- # values were mutated by the first call.
91
- platemap_1 = PlateMap(["test_0.msfile"])
tests/test_sdk.py DELETED
@@ -1,11 +0,0 @@
1
- """
2
- `test_sdk` -- high-level tests for the seer-pas-sdk package
3
- """
4
-
5
-
6
- def test_import():
7
- """
8
- Stub test that importing the root module is successful.
9
- TODO: replace this with more meaningful tests
10
- """
11
- import seer_pas_sdk