samplesheet-parser 2.1.0__py3-none-any.whl → 2.2.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.
@@ -419,8 +419,12 @@ class SampleSheetValidator:
419
419
 
420
420
  for sample in samples:
421
421
  lane = sample.get("lane")
422
- idx1 = (sample.get("index") or "").upper()
423
- idx2 = (sample.get("index2") or "").upper()
422
+ # Accept both V1-style (``index``/``index2``) and V2-style
423
+ # (``Index``/``Index2``) keys so hand-built dicts and the output of
424
+ # ``normalize_index_lengths`` are checked the same way the duplicate
425
+ # and character checks already handle them.
426
+ idx1 = (sample.get("index") or sample.get("Index") or "").upper()
427
+ idx2 = (sample.get("index2") or sample.get("Index2") or "").upper()
424
428
  sid = sample.get("sample_id", "?")
425
429
 
426
430
  if not idx1:
@@ -957,7 +957,16 @@ class SampleSheetWriter:
957
957
  }
958
958
  sid = std.get("Sample_ID", "")
959
959
  idx = std.get("index", "")
960
- if not sid or not idx:
960
+ if not sid:
961
+ continue
962
+ if not idx:
963
+ logger.warning(
964
+ "Sample %r has no index; the writer requires an index per "
965
+ "sample, so this index-free library is dropped from the "
966
+ "output. Add an index or write the sheet by another means "
967
+ "to preserve it.",
968
+ sid,
969
+ )
961
970
  continue
962
971
  self._samples.append(
963
972
  _SampleRecord(
@@ -1005,7 +1014,16 @@ class SampleSheetWriter:
1005
1014
  for record in sheet.records or []:
1006
1015
  sid = record.get("Sample_ID", "")
1007
1016
  idx = record.get("Index", "")
1008
- if not sid or not idx:
1017
+ if not sid:
1018
+ continue
1019
+ if not idx:
1020
+ logger.warning(
1021
+ "Sample %r has no index; the writer requires an index per "
1022
+ "sample, so this index-free library is dropped from the "
1023
+ "output. Add an index or write the sheet by another means "
1024
+ "to preserve it.",
1025
+ sid,
1026
+ )
1009
1027
  continue
1010
1028
  extra = {k: v for k, v in record.items() if k not in std_cols}
1011
1029
  self._samples.append(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: samplesheet-parser
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: Format-agnostic parser for Illumina SampleSheet.csv files — supports IEM V1 and BCLConvert V2
5
5
  Project-URL: Homepage, https://github.com/chaitanyakasaraneni/samplesheet-parser
6
6
  Project-URL: Documentation, https://illumina-samplesheet.readthedocs.io
@@ -11,13 +11,13 @@ samplesheet_parser/merger.py,sha256=UxQ8bmX7632S70Lko3GFQTjHqTZUt7aRch_UCSxVjsw,
11
11
  samplesheet_parser/protocol.py,sha256=YOT1iZ-727nDKDGvZXNTjVG-OAgGdq0F0y3Tzbk7bwM,3104
12
12
  samplesheet_parser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  samplesheet_parser/splitter.py,sha256=QMmTTXg4HwZl3oUvA-4KKUVF62oIn4k2D1ko_dT1wS4,11314
14
- samplesheet_parser/validators.py,sha256=tezOkqrDtoDU8Euf-6ULFsogWXjt1-FPPSfZr7Y2VJM,19503
15
- samplesheet_parser/writer.py,sha256=8W_z2tI7bjiRH9Csra20NLOPC3h3U2Uz1wSHytINAS8,32761
14
+ samplesheet_parser/validators.py,sha256=6KYLnbNwLhJ4nyl31dNBXKl_AxG-e9fY6c_xI6PUh5k,19838
15
+ samplesheet_parser/writer.py,sha256=NQY0x28rKF-694w11FZTCqCXxlNiHnMspB5M33GoD0k,33541
16
16
  samplesheet_parser/parsers/__init__.py,sha256=N5ICN_46x-ARbG8kyrck6g1V_gOU0XacqzUJI-D6KX8,213
17
17
  samplesheet_parser/parsers/v1.py,sha256=MRt_BUJTmj763N2kByELNwQPY-_jcLKcwahG4jPBH98,23956
18
18
  samplesheet_parser/parsers/v2.py,sha256=pCd18DNcpIIh7vJNEB8asRleIriH2NSx7h7NAtsomug,27982
19
- samplesheet_parser-2.1.0.dist-info/METADATA,sha256=Ct0MKzDtdQ4cJeIpAt4TEMXL_8vYQp57M7G90jhH8Vc,26594
20
- samplesheet_parser-2.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
21
- samplesheet_parser-2.1.0.dist-info/entry_points.txt,sha256=jR2GOZmuJg60mY9vzOGunVh2-mYRxjpnlmC-4wGBfQ8,60
22
- samplesheet_parser-2.1.0.dist-info/licenses/LICENSE,sha256=EIu8MSHMFea58nh2WwWsITEZ95TLW0PfRYCaYTE6HGk,781
23
- samplesheet_parser-2.1.0.dist-info/RECORD,,
19
+ samplesheet_parser-2.2.0.dist-info/METADATA,sha256=i-UUEQDzATBlWa0otPrEWeFx9QCtnLPeyyNkL4yiZu0,26594
20
+ samplesheet_parser-2.2.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
21
+ samplesheet_parser-2.2.0.dist-info/entry_points.txt,sha256=jR2GOZmuJg60mY9vzOGunVh2-mYRxjpnlmC-4wGBfQ8,60
22
+ samplesheet_parser-2.2.0.dist-info/licenses/LICENSE,sha256=EIu8MSHMFea58nh2WwWsITEZ95TLW0PfRYCaYTE6HGk,781
23
+ samplesheet_parser-2.2.0.dist-info/RECORD,,