@@ -388,27 +388,11 @@ async def test_query_genome_analyses_crams(self, mock_query):
388
388
},
389
389
],
390
390
},
391
- {
392
- 'id' : 'CPGbbb' ,
393
- 'type' : 'exome' ,
394
- 'analyses' : [
395
- {
396
- 'id' : 2 ,
397
- 'meta' : {
398
- 'sequencing_type' : 'exome' ,
399
- 'sample_ids' : [
400
- 'CPGbbb' ,
401
- ],
402
- },
403
- 'output' : 'gs://cpg-dataset-main/exome/cram/CPGaaa.cram' ,
404
- },
405
- ],
406
- },
407
391
]
408
392
}
409
393
]
410
394
411
- test_result = auditor .get_analysis_cram_paths_for_dataset_sgs (
395
+ test_result = await auditor .get_analysis_cram_paths_for_dataset_sgs (
412
396
assay_sg_id_map = {1 : 'CPGaaa' }
413
397
)
414
398
expected_result = {'CPGaaa' : {1 : 'gs://cpg-dataset-main/cram/CPGaaa.cram' }}
@@ -440,11 +424,7 @@ async def test_query_genome_and_exome_analyses_crams(self, mock_query):
440
424
'output' : 'gs://cpg-dataset-main/cram/CPGaaa.cram' ,
441
425
},
442
426
],
443
- }
444
- ]
445
- },
446
- {
447
- 'sequencingGroups' : [
427
+ },
448
428
{
449
429
'id' : 'CPGbbb' ,
450
430
'type' : 'exome' ,
@@ -465,7 +445,7 @@ async def test_query_genome_and_exome_analyses_crams(self, mock_query):
465
445
},
466
446
]
467
447
468
- test_result = auditor .get_analysis_cram_paths_for_dataset_sgs (
448
+ test_result = await auditor .get_analysis_cram_paths_for_dataset_sgs (
469
449
assay_sg_id_map = {1 : 'CPGaaa' , 2 : 'CPGbbb' }
470
450
)
471
451
@@ -507,7 +487,7 @@ async def test_query_broken_analyses_crams(self, mock_query):
507
487
}
508
488
509
489
with self .assertRaises (ValueError ):
510
- auditor .get_analysis_cram_paths_for_dataset_sgs (
490
+ await auditor .get_analysis_cram_paths_for_dataset_sgs (
511
491
assay_sg_id_map = {1 : 'CPGaaa' }
512
492
)
513
493
@@ -527,23 +507,22 @@ async def test_query_analyses_crams_warning(self, mock_query):
527
507
'id' : 1 ,
528
508
'meta' : {
529
509
'sequencing_type' : 'genome' ,
530
- 'sampling_id' : 'CPGaaa' ,
531
510
},
532
- 'output' : 'gs://cpg-dataset-main/cram/CPGaaa.cram ' ,
511
+ 'output' : 'gs://cpg-dataset-main/cram/CPGaaa.notcram ' ,
533
512
},
534
513
],
535
514
}
536
515
]
537
516
}
538
517
539
518
with self .assertLogs (level = 'WARNING' ) as log :
540
- _ = auditor .get_analysis_cram_paths_for_dataset_sgs (
519
+ _ = await auditor .get_analysis_cram_paths_for_dataset_sgs (
541
520
assay_sg_id_map = {1 : 'CPGaaa' }
542
521
)
543
522
self .assertEqual (len (log .output ), 1 )
544
523
self .assertEqual (len (log .records ), 1 )
545
524
self .assertIn (
546
- 'WARNING:root:Analysis 1 invalid output path: gs://cpg-dataset-main/cram/CPG123 .notcram' ,
525
+ 'WARNING:root:Analysis 1 invalid output path: gs://cpg-dataset-main/cram/CPGaaa .notcram' ,
547
526
log .output [0 ],
548
527
)
549
528
@@ -631,7 +610,7 @@ async def test_get_complete_and_incomplete_sgs(
631
610
)
632
611
633
612
expected_result = {
634
- 'complete' : {'CPGaaa' : [ 1 ] , 'CPGbbb' : [ 2 ] },
613
+ 'complete' : {'CPGaaa' : 1 , 'CPGbbb' : 2 },
635
614
'incomplete' : ['CPGccc' ],
636
615
}
637
616
0 commit comments