Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL checks error reformatting #1315

Merged
merged 5 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Update GeoMx NGS directory schema
- Ported murine from SenNet
- Update Histology directory schema
- Converted upload `_url_checks` to use `_get_method` for SenNet compatibility

## v0.0.17

Expand Down
27 changes: 13 additions & 14 deletions examples/dataset-examples/bad-cedar-assay-histology/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,26 @@ Upload Errors:
column 'contributors_path', value './contributors.tsv'
: CEDAR Validation Errors:
examples/dataset-examples/bad-cedar-assay-histology/upload/contributors.tsv:
examples/dataset-examples/bad-cedar-assay-histology/upload/contributors.tsv:
- Validation Errors:
- On row 0, column "orcid", value "0000-0002-8928-abcd" fails because
of error "invalidValueFormat".
Validation Errors:
- On row 0, column "orcid", value "0000-0002-8928-abcd" fails because of
error "invalidValueFormat".
Metadata TSV Validation Errors:
CEDAR Validation Errors:
examples/dataset-examples/bad-cedar-assay-histology/upload/bad-histology-metadata.tsv:
examples/dataset-examples/bad-cedar-assay-histology/upload/bad-histology-metadata.tsv:
- URL Errors:
- 'Row 2, field "parent_sample_id" with value "wrong": Field value is not
valid; URL https://entity.api.hubmapconsortium.org/entities/wrong returned
a 400 Error.'
Validation Errors:
- On row 0, column "parent_sample_id", value "wrong" fails because of error
"invalidValueFormat".
- On row 1, column "contributors_path", value "" fails because of error "missingRequired".
URL Errors:
- 'On row 2, column "parent_sample_id", value "wrong" fails because of error
"HTTPError": 401 Client Error: Unauthorized for url: https://entity.api.hubmapconsortium.org/entities/wrong.'
- 'On row 3, column "parent_sample_id", value "HBM854.FXDQ.783" fails because
of error "HTTPError": 401 Client Error: Unauthorized for url: https://entity.api.hubmapconsortium.org/entities/HBM854.FXDQ.783'
Validation Errors:
- On row 0, column "parent_sample_id", value "wrong" fails because of error
"invalidValueFormat".
- On row 1, column "contributors_path", value "" fails because of error "missingRequired".
Reference Errors:
No References:
Files:
- unreferenced_file.
Hint: 'If validation fails because of extra whitespace in the TSV, try:

src/cleanup_whitespace.py --tsv_in original.tsv --tsv_out clean.tsv.'
```
```
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {"h-and-e": {"examples/dataset-examples/bad-cedar-assay-histology/upload/bad-histology-metadata.tsv": [{"URL Errors": ["Row 2, field 'parent_sample_id' with value 'wrong': 400 Client Error: Bad Request for url: https://entity.api.hubmapconsortium.org/entities/wrong"], "Validation Errors": ["On row 0, column \"parent_sample_id\", value \"wrong\" fails because of error \"invalidValueFormat\"", "On row 1, column \"contributors_path\", value \"\" fails because of error \"missingRequired\""]}]}, "contributors": {"examples/dataset-examples/bad-cedar-assay-histology/upload/contributors.tsv": [{"Validation Errors": ["On row 0, column \"orcid\", value \"0000-0002-8928-abcd\" fails because of error \"invalidValueFormat\""]}]}}}
{"assaytype": {"Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {"h-and-e": {"URL Errors": ["On row 2, column \"parent_sample_id\", value \"wrong\" fails because of error \"HTTPError\": 400 Client Error: Bad Request for url: https://entity.api.hubmapconsortium.org/entities/wrong"], "Validation Errors": ["On row 0, column \"parent_sample_id\", value \"wrong\" fails because of error \"invalidValueFormat\"", "On row 1, column \"contributors_path\", value \"\" fails because of error \"missingRequired\""]}, "contributors": {"Validation Errors": ["On row 0, column \"orcid\", value \"0000-0002-8928-abcd\" fails because of error \"invalidValueFormat\""]}}}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
Metadata TSV Validation Errors:
CEDAR Validation Errors:
examples/dataset-examples/bad-cedar-multi-assay-visium-bad-child-metadata/upload/bad-visium-rnaseq-metadata.tsv:
examples/dataset-examples/bad-cedar-multi-assay-visium-bad-child-metadata/upload/bad-visium-rnaseq-metadata.tsv:
- URL Errors:
- 'Row 3, field "parent_sample_id" with value "": 404 Client Error: Not Found
for url: https://entity.api.hubmapconsortium.org/entities/.'
Validation Errors:
- On row 1, column "parent_sample_id", value "" fails because of error "missingRequired".
- On row 2, column "preparation_protocol_doi", value "wrong" fails because
of error "invalidUrl".
URL Errors:
- 'On row 3, column "parent_sample_id", value "" fails because of error "HTTPError":
404 Client Error: Not Found for url: https://entity.api.hubmapconsortium.org/entities/.'
Validation Errors:
- On row 1, column "parent_sample_id", value "" fails because of error "missingRequired".
- On row 2, column "preparation_protocol_doi", value "wrong" fails because of
error "invalidUrl".
Reference Errors:
No References:
Files:
- unreferenced_file.
Hint: 'If validation fails because of extra whitespace in the TSV, try:

src/cleanup_whitespace.py --tsv_in original.tsv --tsv_out clean.tsv.'
```
```
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"RNAseq": {"assaytype": "scRNAseq-10Genomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}, "Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {"scRNAseq-10Genomics-v3": {"examples/dataset-examples/bad-cedar-multi-assay-visium-bad-child-metadata/upload/bad-visium-rnaseq-metadata.tsv": [{"URL Errors": ["Row 3, field 'parent_sample_id' with value '': 404 Client Error: Not Found for url: https://entity.api.hubmapconsortium.org/entities/"], "Validation Errors": ["On row 1, column \"parent_sample_id\", value \"\" fails because of error \"missingRequired\"", "On row 2, column \"preparation_protocol_doi\", value \"wrong\" fails because of error \"invalidUrl\""]}]}, "contributors": null, "visium-no-probes": null, "h-and-e": null}}
{"assaytype": {"RNAseq": {"assaytype": "scRNAseq-10xGenomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}, "Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {"scRNAseq-10xGenomics-v3": {"URL Errors": ["On row 3, column \"parent_sample_id\", value \"\" fails because of error \"HTTPError\": 404 Client Error: Not Found for url: https://entity.api.hubmapconsortium.org/entities/"], "Validation Errors": ["On row 1, column \"parent_sample_id\", value \"\" fails because of error \"missingRequired\"", "On row 2, column \"preparation_protocol_doi\", value \"wrong\" fails because of error \"invalidUrl\""]}, "contributors": null, "visium-no-probes": null, "h-and-e": null}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10Genomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {"visium-no-probes": null, "contributors": null, "h-and-e": null, "scRNAseq-10Genomics-v3": null}}
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10xGenomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {"visium-no-probes": null, "contributors": null, "h-and-e": null, "scRNAseq-10xGenomics-v3": null}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10Genomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10xGenomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10Genomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10xGenomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"RNAseq (with probes)": {"assaytype": "scRNAseq-visium-with-probes", "contains-pii": true, "dataset-type": "RNAseq (with probes)", "description": "Visium RNAseq with probes", "dir-schema": "rnaseq-with-probes-v2", "primary": true, "vitessce-hints": []}, "Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
{"assaytype": {"RNAseq (with probes)": {"assaytype": "scRNAseq-visium-with-probes", "contains-pii": true, "dataset-type": "RNAseq (with probes)", "description": "Visium RNAseq with probes", "dir-schema": "rnaseq-with-probes-v2", "primary": true, "vitessce-hints": []}, "Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}}, "validation": {}}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TSVs:
Metadata schema version: '2'
Directory schema versions: histology-v2
good-visium-rnaseq-metadata.tsv:
Schema: scRNAseq-10Genomics-v3-v2
Schema: scRNAseq-10xGenomics-v3-v2
Metadata schema version: '2'
Directory schema versions: rnaseq-v2

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10Genomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {"visium-no-probes": null, "contributors": null, "h-and-e": null, "scRNAseq-10Genomics-v3": null}}
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10xGenomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {"visium-no-probes": null, "contributors": null, "h-and-e": null, "scRNAseq-10xGenomics-v3": null}}
2 changes: 1 addition & 1 deletion examples/plugin-tests/expected-failure/fixtures.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (No probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10Genomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {"visium-no-probes": null, "contributors": null, "h-and-e": null, "scRNAseq-10Genomics-v3": null}}
{"assaytype": {"Visium (no probes)": {"assaytype": "visium-no-probes", "contains-pii": true, "dataset-type": "Visium (no probes)", "description": "Visium (no probes)", "dir-schema": "visium-no-probes-v2", "is-multi-assay": true, "must-contain": ["Histology", "RNAseq"], "primary": true, "vitessce-hints": []}, "Histology": {"assaytype": "h-and-e", "contains-pii": false, "dataset-type": "Histology", "description": "H&E Stained Microscopy", "dir-schema": "histology-v2", "primary": true, "vitessce-hints": []}, "RNAseq": {"assaytype": "scRNAseq-10xGenomics-v3", "contains-pii": true, "dataset-type": "RNAseq", "description": "scRNA-seq (10x Genomics v3)", "dir-schema": "rnaseq-v2", "primary": true, "vitessce-hints": []}}, "validation": {"visium-no-probes": null, "contributors": null, "h-and-e": null, "scRNAseq-10xGenomics-v3": null}}
Loading
Loading