nci-cidc-schemas 0.27.26__py2.py3-none-any.whl → 0.27.28__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.

Potentially problematic release.


This version of nci-cidc-schemas might be problematic. Click here for more details.

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.26"
5
+ __version__ = "0.27.28"
@@ -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
@@ -131,7 +133,7 @@ def parse_npx(xlsx: BinaryIO) -> dict:
131
133
 
132
134
  # otherwise get the identifier
133
135
  # and check that it is a CIMAC ID
134
- if cimac_id_regex.match(first_cell):
136
+ if cimac_id_regex.match(first_cell) and first_cell not in ids:
135
137
  ids.append(first_cell)
136
138
 
137
139
  sample_count = len(ids)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nci_cidc_schemas
3
- Version: 0.27.26
3
+ Version: 0.27.28
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
@@ -130,6 +130,18 @@ If you're making changes to the module and want those changes to be reflected in
130
130
  python3 -m cidc_schemas.cli [args]
131
131
  ```
132
132
 
133
+ ### Creating a new assay or analysis type ###
134
+
135
+ In order to create a new assay type, your best bet is to just search for an existing assay and copy it.
136
+
137
+ Preferably, look at visium and copy exactly what it does. Make changes in the assay schema and template for your
138
+ particular assay and/or analysis schema.
139
+
140
+ 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
141
+ practical advice.
142
+
143
+ Be sure to regenerate the docs after creating your schema, so the new schema is added to the reference docs.
144
+
133
145
  ### Generate templates
134
146
 
135
147
  Create a template for a given template configuration.
@@ -1,4 +1,4 @@
1
- cidc_schemas/__init__.py,sha256=s45LJZm6cKT8dLo7q8XG7Y1yQGsbTUXOKCzeMASfAsU,136
1
+ cidc_schemas/__init__.py,sha256=6omZ_AmjReFyYGR3ZLS8zV6hvtmrnyhlW9y94oYbgHs,136
2
2
  cidc_schemas/cli.py,sha256=gWiktRlraNH8Q0zNUae9dohKjPwBmcY0BJwdcQ_fIic,4099
3
3
  cidc_schemas/constants.py,sha256=RULs7pGuBAVq1teXymrfbVsK23ZowJvLuZlv0KcjL-Y,698
4
4
  cidc_schemas/json_validation.py,sha256=spmPsqinib7Ns5GvWOKKa1rc7IrN_s2bqifpTKdaLVU,23288
@@ -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=S9w5EGAT0xwaWMrpYluF7Y1ONsI4wFtxFD8ib6Va_fU,8567
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.26.dist-info/licenses/LICENSE,sha256=zK77-w4rYCZBHAYJEGkcFuPXwKIsP7jMPZ2iQOXjzko,1072
182
- nci_cidc_schemas-0.27.26.dist-info/METADATA,sha256=uQrrscUf16IL4910ZSCzxHzC2l9SIrMeTt8-VD2zV0Q,4554
183
- nci_cidc_schemas-0.27.26.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
184
- nci_cidc_schemas-0.27.26.dist-info/entry_points.txt,sha256=kSyTzXeJQrJp_2ZX0GS_NnbJR8ceQKLBSgER46PM0hs,55
185
- nci_cidc_schemas-0.27.26.dist-info/top_level.txt,sha256=Wwb5Cu7QrnbmSJxI2d00e3-Mir36t0jTRnSulmfhi30,13
186
- nci_cidc_schemas-0.27.26.dist-info/RECORD,,
181
+ nci_cidc_schemas-0.27.28.dist-info/licenses/LICENSE,sha256=zK77-w4rYCZBHAYJEGkcFuPXwKIsP7jMPZ2iQOXjzko,1072
182
+ nci_cidc_schemas-0.27.28.dist-info/METADATA,sha256=TigK-2nNG0G6iJ2DJf1BJgmjqHH32gQymfeXPxmrYOk,5116
183
+ nci_cidc_schemas-0.27.28.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
184
+ nci_cidc_schemas-0.27.28.dist-info/entry_points.txt,sha256=kSyTzXeJQrJp_2ZX0GS_NnbJR8ceQKLBSgER46PM0hs,55
185
+ nci_cidc_schemas-0.27.28.dist-info/top_level.txt,sha256=Wwb5Cu7QrnbmSJxI2d00e3-Mir36t0jTRnSulmfhi30,13
186
+ nci_cidc_schemas-0.27.28.dist-info/RECORD,,