clintval/sample-sheet

CellRanger indexes are not recognized

Closed this issue · 7 comments

Is it possible to bypass index validation?

    sample_sheet = SampleSheet(args.samplesheet)
  File "/home/ec2-user/cellranger-docker/env/lib/python3.6/site-packages/sample_sheet/__init__.py", line 418, in __init__
    self._parse(self.path)
  File "/home/ec2-user/cellranger-docker/env/lib/python3.6/site-packages/sample_sheet/__init__.py", line 524, in _parse
    self.add_sample(Sample(dict(zip(sample_header, line))))
  File "/home/ec2-user/cellranger-docker/env/lib/python3.6/site-packages/sample_sheet/__init__.py", line 296, in __init__
    raise ValueError(f'Not a valid index: {value}')
ValueError: Not a valid index: SI-GA-F8

Looks reasonable to me! We could update what is considered a valid index to include the union of characters Illumina and 10x allow here:

_valid_index_value_pattern = re.compile(r'^[ACGTN]*$')

I probably won't have time to get to in the next few days FYI but it's now on my radar.

Thank you for the patch, and the unit test! I just published sample_sheet==0.10.0 with this feature. Please pip install! Bioconda will find the change automatically in the next few days.

I'm migrating to an official public API freeze in 1.0.0. The API may change slightly, but function should remain the same.

Any feature requests, critiques of the API, and criticisms welcome before I commit. Thanks!

I just pushed a final change as I missed an index set in the first PR. I wonder if an option to bypass index checking would be good for a future release.

Thanks for the idea! Noted!

Just published 0.11.0 to PyPi, Bioconda should follow after some period of lag.