Skip to content

Commit 81b4690

Browse files
committed
Update URL and corrected test data to match current schema
- corrected "DNA" and "RNA" to "Total DNA" and "Total RNA" respectively
1 parent b92149c commit 81b4690

9 files changed

Lines changed: 11 additions & 12 deletions

payload-gen-seq-experiment/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import requests
3434
import re
3535
import jsonschema
36-
import traceback
3736

3837

3938
TSV_FIELDS = {}
@@ -174,20 +173,20 @@ def validate_args(args):
174173
Usage:
175174
When '-m' is provided, no other arguments can be used
176175
When '-m' is not provided, please provide all of these arguments: -x, -r and -f
176+
Optionally '-s' a schema URL can be provided, which the payload will be validated against
177177
"""
178178
))
179179

180180
def validatePayload(payload,args):
181181
if args.schema_url:
182182
url=args.schema_url
183183
else:
184-
url="https://raw.githubusercontent.com/icgc-argo/argo-metadata-schemas/master/schemas/sequencing_experiment.json"
184+
url="https://submission-song.rdpc.cancercollaboratory.org/schemas/sequencing_experiment"
185185

186186
resp=requests.get(url)
187187
if not resp.status_code==200:
188188
sys.exit("Unable to retrieve schema. Please check URL\n")
189-
#print(payload)
190-
#print(resp.json()['schema'])
189+
191190
try:
192191
jsonschema.validate(instance=payload,schema=resp.json()['schema'])
193192
except jsonschema.exceptions.ValidationError as err:

payload-gen-seq-experiment/tests/input/208c5ea6-c17a-4a63-981e-4bb91d3119f2.sequencing_experiment.payload.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{
5959
"submitterSampleId": "HCC1143_BAM_INPUT",
6060
"matchedNormalSubmitterSampleId": null,
61-
"sampleType": "RNA",
61+
"sampleType": "Total RNA",
6262
"specimen": {
6363
"submitterSpecimenId": "HCC1143_BAM_INPUT",
6464
"tumourNormalDesignation": "Normal",

payload-gen-seq-experiment/tests/input/d9c99af9-b97d-4481-9be8-f65e57d86673.sequencing_experiment.payload.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
{
5858
"submitterSampleId": "HCC1143_BAM_INPUT",
5959
"matchedNormalSubmitterSampleId": null,
60-
"sampleType": "DNA",
60+
"sampleType": "Total DNA",
6161
"specimen": {
6262
"submitterSpecimenId": "HCC1143_BAM_INPUT",
6363
"tumourNormalDesignation": "Normal",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
type study_id submitter_sequencing_experiment_id submitter_donor_id gender submitter_specimen_id tumour_normal_designation specimen_type specimen_tissue_source submitter_sample_id sample_type submitter_matched_normal_sample_id sequencing_center platform platform_model experimental_strategy sequencing_date read_group_count library_strandedness
2-
sequencing_experiment TEST-PRO TEST_EXP HCC1143 Female HCC1143_BAM_INPUT Normal Cell line - derived from normal Blood derived HCC1143_BAM_INPUT RNA EXT ILLUMINA HiSeq 2000 RNA-Seq 2014-12-12 3 FIRST_READ_ANTISENSE_STRAND
2+
sequencing_experiment TEST-PRO TEST_EXP HCC1143 Female HCC1143_BAM_INPUT Normal Cell line - derived from normal Blood derived HCC1143_BAM_INPUT Total RNA EXT ILLUMINA HiSeq 2000 RNA-Seq 2014-12-12 3 FIRST_READ_ANTISENSE_STRAND

tests/data/98690064-627e-4a2b-a0c2-60fc9ca8433c.sequencing_experiment.payload.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
{
5858
"submitterSampleId": "HCC1143_BAM_INPUT",
5959
"matchedNormalSubmitterSampleId": null,
60-
"sampleType": "DNA",
60+
"sampleType": "Total DNA",
6161
"specimen": {
6262
"submitterSpecimenId": "HCC1143_BAM_INPUT",
6363
"tumourNormalDesignation": "Normal",

tests/data/cab531fd-dc75-462f-8a73-fb7fcbf73185.sequencing_experiment.payload.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
{
5555
"submitterSampleId": "HCC1143_FASTQ_INPUT",
5656
"matchedNormalSubmitterSampleId": "HCC1143_BAM_INPUT",
57-
"sampleType": "DNA",
57+
"sampleType": "Total DNA",
5858
"specimen": {
5959
"submitterSpecimenId": "HCC1143_FASTQ_INPUT",
6060
"tumourNormalDesignation": "Cell line - derived from tumour",

tests/data/experiment-fq.v2.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
type study_id submitter_sequencing_experiment_id submitter_donor_id gender submitter_specimen_id tumour_normal_designation specimen_type specimen_tissue_source submitter_sample_id sample_type submitter_matched_normal_sample_id sequencing_center platform platform_model experimental_strategy sequencing_date read_group_count
2-
sequencing_experiment TEST-PRO TEST_EXP HCC1143 Female HCC1143_FASTQ_INPUT Tumour Cell line - derived from tumour Blood derived HCC1143_FASTQ_INPUT DNA HCC1143_BAM_INPUT EXT ILLUMINA HiSeq 2000 WGS 2014-12-12 3
2+
sequencing_experiment TEST-PRO TEST_EXP HCC1143 Female HCC1143_FASTQ_INPUT Tumour Cell line - derived from tumour Blood derived HCC1143_FASTQ_INPUT Total DNA HCC1143_BAM_INPUT EXT ILLUMINA HiSeq 2000 WGS 2014-12-12 3

tests/data/experiment.v2.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
type study_id submitter_sequencing_experiment_id submitter_donor_id gender submitter_specimen_id tumour_normal_designation specimen_type specimen_tissue_source submitter_sample_id sample_type submitter_matched_normal_sample_id sequencing_center platform platform_model experimental_strategy sequencing_date read_group_count
2-
sequencing_experiment TEST-PRO TEST_EXP HCC1143 Female HCC1143_BAM_INPUT Normal Cell line - derived from normal Blood derived HCC1143_BAM_INPUT DNA EXT ILLUMINA HiSeq 2000 WGS 2014-12-12 3
2+
sequencing_experiment TEST-PRO TEST_EXP HCC1143 Female HCC1143_BAM_INPUT Normal Cell line - derived from normal Blood derived HCC1143_BAM_INPUT Total DNA EXT ILLUMINA HiSeq 2000 WGS 2014-12-12 3

tests/data/fc003ffc-f0cf-4ef6-b9bd-df5010acdbbb.sequencing_experiment.payload.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
{
5858
"submitterSampleId": "HCC1143_FASTQ_INPUT",
5959
"matchedNormalSubmitterSampleId": "HCC1143_BAM_INPUT",
60-
"sampleType": "DNA",
60+
"sampleType": "Total DNA",
6161
"specimen": {
6262
"submitterSpecimenId": "HCC1143_FASTQ_INPUT",
6363
"tumourNormalDesignation": "Tumour",

0 commit comments

Comments
 (0)