nci-cidc-schemas 0.27.27__py2.py3-none-any.whl → 0.28.0__py2.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.
cidc_schemas/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  __author__ = """NCI"""
4
4
  __email__ = "nci-cidc-tools-admin@mail.nih.gov"
5
- __version__ = "0.27.27"
5
+ __version__ = "0.28.0"
@@ -273,8 +273,7 @@ def _map_refs(node: dict, on_refs: Callable[[str], dict]) -> dict:
273
273
  # So we raise on that, to notify schema creator that s/he should not
274
274
  # expect those additional keys to be verified by schema validator.
275
275
  raise Exception(
276
- f"Schema node with '$ref' should not contain anything else besides 'description' for public docs (or '$comment' for dev docs). \
277
- \nOn: {node} \nOffending keys {extra_keys}"
276
+ f"Schema node with '$ref' should not contain anything else besides 'description' for public docs (or '$comment' for dev docs). \nOn: {node} \nOffending keys {extra_keys}"
278
277
  )
279
278
 
280
279
  # We found a ref, so return it mapped through `on_refs`
@@ -98,7 +98,7 @@ def parse_npx(xlsx: BinaryIO) -> dict:
98
98
 
99
99
  # simplify.
100
100
  worksheet = workbook[worksheet_name]
101
- seen_onlinkid = False
101
+ seen_id_column = False
102
102
  for i, row in enumerate(worksheet.iter_rows()):
103
103
 
104
104
  # extract values from row
@@ -110,8 +110,8 @@ def parse_npx(xlsx: BinaryIO) -> dict:
110
110
  if len(vals) == 0 or first_cell is None:
111
111
  continue
112
112
 
113
- # find OlinkID to locate the first data row
114
- if not seen_onlinkid:
113
+ # find Cimac ID column to locate the first data row
114
+ if not seen_id_column:
115
115
  # check that this is actually an NPX file
116
116
  if i == 1 and first_cell != "NPX data":
117
117
  raise ValueError("parse_npx got a file that is not in NPX format")
@@ -119,8 +119,10 @@ def parse_npx(xlsx: BinaryIO) -> dict:
119
119
  # check if we are starting ids
120
120
  # use this to capture cases where the column name changes in spacing / capitalization
121
121
  ## needed because some data has 'OlinkID' while the standard seems to call for 'Olink ID'
122
- if str(first_cell).lower().replace(" ", "") == "olinkid":
123
- seen_onlinkid = True
122
+ # Data is starting to come in with 'Sample ID' column instead - accepting that too
123
+ lower_first_cell = str(first_cell).lower().replace(" ", "")
124
+ if lower_first_cell in ["olinkid", "sampleid"]:
125
+ seen_id_column = True
124
126
  continue
125
127
 
126
128
  # once it's found keep getting ids until we're done
cidc_schemas/template.py CHANGED
@@ -25,7 +25,7 @@ from .constants import ANALYSIS_TEMPLATE_DIR, SCHEMA_DIR, TEMPLATE_DIR
25
25
  from .json_validation import _load_dont_validate_schema
26
26
  from .util import get_file_ext, get_logger
27
27
 
28
- from cidc_ngs_pipeline_api import OUTPUT_APIS
28
+ from .ngs_pipeline_api import OUTPUT_APIS
29
29
 
30
30
  logger = get_logger("cidc_schemas.template")
31
31
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nci_cidc_schemas
3
- Version: 0.27.27
3
+ Version: 0.28.0
4
4
  Summary: The CIDC data model and tools for working with it.
5
5
  Home-page: https://github.com/NCI-CIDC/cidc-schemas
6
6
  Author: NCI
@@ -12,23 +12,20 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Natural Language :: English
14
14
  Classifier: Programming Language :: Python :: 3.9
15
- Requires-Python: >=3.9,<3.11
15
+ Requires-Python: >=3.13,<3.14
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: dateparser==1.1.4
19
- Requires-Dist: xlsxwriter==1.1.6
20
- Requires-Dist: argparse==1.1
21
- Requires-Dist: pyyaml==6.0.1
22
- Requires-Dist: jsonschema==3.0.1
23
- Requires-Dist: openpyxl==3.0.7
18
+ Requires-Dist: argparse==1.4.0
19
+ Requires-Dist: dateparser==1.2.2
20
+ Requires-Dist: deepdiff==4.3.0
21
+ Requires-Dist: jinja2==3.1.6
24
22
  Requires-Dist: jsonmerge==1.6.1
25
- Requires-Dist: deepdiff~=4.3.0
26
- Requires-Dist: jsonpointer==2.0
27
- Requires-Dist: pandas==1.5.3
28
- Requires-Dist: jinja2~=3.1.3
29
- Requires-Dist: nci-cidc-ngs-pipeline-api==0.1.25
30
- Requires-Dist: markupsafe==2.1.5
31
- Requires-Dist: regex==2022.3.2
23
+ Requires-Dist: jsonpointer==3.0.0
24
+ Requires-Dist: jsonschema==3.2.0
25
+ Requires-Dist: openpyxl==3.1.5
26
+ Requires-Dist: pandas==2.3.1
27
+ Requires-Dist: pyyaml==6.0.2
28
+ Requires-Dist: xlsxwriter==3.2.5
32
29
  Dynamic: author
33
30
  Dynamic: author-email
34
31
  Dynamic: classifier
@@ -130,6 +127,18 @@ If you're making changes to the module and want those changes to be reflected in
130
127
  python3 -m cidc_schemas.cli [args]
131
128
  ```
132
129
 
130
+ ### Creating a new assay or analysis type ###
131
+
132
+ In order to create a new assay type, your best bet is to just search for an existing assay and copy it.
133
+
134
+ Preferably, look at visium and copy exactly what it does. Make changes in the assay schema and template for your
135
+ particular assay and/or analysis schema.
136
+
137
+ There are a lot of gotchas and hidden parsing going on behind the scenes. Listing them all would be hard, so this is the best
138
+ practical advice.
139
+
140
+ Be sure to regenerate the docs after creating your schema, so the new schema is added to the reference docs.
141
+
133
142
  ### Generate templates
134
143
 
135
144
  Create a template for a given template configuration.
@@ -1,9 +1,9 @@
1
- cidc_schemas/__init__.py,sha256=LzCxsxeBVy_w57xsTTGde82YzIm7FKoErArY-_xeGW4,136
1
+ cidc_schemas/__init__.py,sha256=b4N9advFitYDb_iy1SQfYjX4oAFfRqfyOz1l06Rq7L4,135
2
2
  cidc_schemas/cli.py,sha256=gWiktRlraNH8Q0zNUae9dohKjPwBmcY0BJwdcQ_fIic,4099
3
3
  cidc_schemas/constants.py,sha256=RULs7pGuBAVq1teXymrfbVsK23ZowJvLuZlv0KcjL-Y,698
4
- cidc_schemas/json_validation.py,sha256=spmPsqinib7Ns5GvWOKKa1rc7IrN_s2bqifpTKdaLVU,23288
4
+ cidc_schemas/json_validation.py,sha256=4UxcYrofXlDT-Lz6uiQGO1Jwz5bRs0mN_UH4p_A84ks,23262
5
5
  cidc_schemas/migrations.py,sha256=Amg_T4cFgMzySD7yNnT_PWpqP7hwlTWGeHlI_RSXuRI,14766
6
- cidc_schemas/template.py,sha256=NWWAvH5r9VXJN9DZgJZ-z5UkLTNFYm9yrHYB2vbHx-o,51418
6
+ cidc_schemas/template.py,sha256=BIGguKwCtyi8wwi0xpfJ6Mj4gf--1cCVybsPxpNObfs,51414
7
7
  cidc_schemas/template_reader.py,sha256=3E9acCr_3TP-PP2qXNyxAnIg1m4TJ6v8VVPogUKW5qA,13126
8
8
  cidc_schemas/template_writer.py,sha256=Lk5hw05owoLLsGXimd2H8FSyqBZ2_HpC5wCWw-Xxm5w,18243
9
9
  cidc_schemas/unprism.py,sha256=TOD3CSGkgNnTtT-OeCCE3Ihlam84lr8XGOmtdSy2lL8,13545
@@ -13,7 +13,7 @@ cidc_schemas/pipeline_configs/rna_level1_analysis_config.yaml.j2,sha256=6no9sFqw
13
13
  cidc_schemas/prism/__init__.py,sha256=J5Tj0X7Di6cyxAjaduOUp2aVyvl8UI67bgxEkgttvcU,530
14
14
  cidc_schemas/prism/constants.py,sha256=PevSn-geY8VTGMx1iXdUJ2LgoeuhEdKfIpZYk_LbzwI,4088
15
15
  cidc_schemas/prism/core.py,sha256=tXDCCHurvcrxfU11meH3NRAVo9niklup0dpLRoIXwPk,20242
16
- cidc_schemas/prism/extra_metadata.py,sha256=lZnuFy-UFulJ4QugAfEG7UbjXCOSi2wHLQnWtPCX__U,8593
16
+ cidc_schemas/prism/extra_metadata.py,sha256=2qs2PCvWRknZk56GrnRCjQ2hifAQz2YcJ8qXeMlG-Zg,8769
17
17
  cidc_schemas/prism/merger.py,sha256=36CKBPVoWecHuvGp3oT9a2d4jWIkvKuS_UofKTEpMYs,13065
18
18
  cidc_schemas/prism/pipelines.py,sha256=dvZtoC7pEVgdPual_DZUTBFfgvSV7yTdk1RHwi5h6Vs,33522
19
19
  cidc_schemas/schemas/aliquot.json,sha256=F24s6xGTeJl-VT6s6wvV8YtMA4O-0BsUCwtD2OEx_cY,1943
@@ -178,9 +178,9 @@ cidc_schemas/schemas/templates/manifests/tissue_slide_template.json,sha256=q2GmO
178
178
  cidc_schemas/schemas/templates/manifests/tumor_normal_pairing_template.json,sha256=lVJrGb28n-vyfjGBzhrzjn1lMKw1b4HXXmWtwA603v0,2797
179
179
  cidc_schemas/schemas/templates/manifests/tumor_tissue_dna_template.json,sha256=LpaoDXDS11NCa-Dv37N-tzEGomswQrx5fypkUcG7xJk,18956
180
180
  cidc_schemas/schemas/templates/manifests/tumor_tissue_rna_template.json,sha256=-gww6NCHbtbI5z7UmNSmKyPK3IqKCE8F6n4XwTAb_gk,18101
181
- nci_cidc_schemas-0.27.27.dist-info/licenses/LICENSE,sha256=zK77-w4rYCZBHAYJEGkcFuPXwKIsP7jMPZ2iQOXjzko,1072
182
- nci_cidc_schemas-0.27.27.dist-info/METADATA,sha256=HMgpbCIIfPcPd8T3Vhv53S3WV4iFLkv9NzxwylK5H3U,4554
183
- nci_cidc_schemas-0.27.27.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
184
- nci_cidc_schemas-0.27.27.dist-info/entry_points.txt,sha256=kSyTzXeJQrJp_2ZX0GS_NnbJR8ceQKLBSgER46PM0hs,55
185
- nci_cidc_schemas-0.27.27.dist-info/top_level.txt,sha256=Wwb5Cu7QrnbmSJxI2d00e3-Mir36t0jTRnSulmfhi30,13
186
- nci_cidc_schemas-0.27.27.dist-info/RECORD,,
181
+ nci_cidc_schemas-0.28.0.dist-info/licenses/LICENSE,sha256=zK77-w4rYCZBHAYJEGkcFuPXwKIsP7jMPZ2iQOXjzko,1072
182
+ nci_cidc_schemas-0.28.0.dist-info/METADATA,sha256=CPsdYCqXmiXpwu-Loe-Y9Gg9WX8WAKy6oMOKtHVZbtA,5007
183
+ nci_cidc_schemas-0.28.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
184
+ nci_cidc_schemas-0.28.0.dist-info/entry_points.txt,sha256=kSyTzXeJQrJp_2ZX0GS_NnbJR8ceQKLBSgER46PM0hs,55
185
+ nci_cidc_schemas-0.28.0.dist-info/top_level.txt,sha256=Wwb5Cu7QrnbmSJxI2d00e3-Mir36t0jTRnSulmfhi30,13
186
+ nci_cidc_schemas-0.28.0.dist-info/RECORD,,