Commit db8937a
authored
Metadata JSON design (#30)
* added metadataJSON.py and query_mapper.yaml
* addressing design comments:clean up init function, connect to db once, merged create_json_file and write_json_file, moving away from manual queries towards using pypika to generate SQL
* submitter details added to JSON.
* started to add project.
* set up unit tests
* moved sql queries _fetch functions. started on samples. unit tests added.
* test.config file
* added _get_analysis, _get_files function. changed placeholders to UNSPECIFIED. added validate to fetch functions
* added unit tests
* added gather_metadata function
* edit fetching file name
* remove TODO
* requirements.txt: add oracledb
* requirements.txt: add pypika
* change _get_sample_new
* removed query mapper
* fix(metadataJSON.py): correct the dot notation for sample_status
* fix(metadataJSON.py): change the return value
* fix(metadataJSON.py): change how unregistered samples are handled
* fix(metadataJSON.py): change how preregistered samples are handled
* fix(metadataJSON.py): change use of next() to calling validate_fetch_result
* fix(metadataJSON.py): change use of next() to calling validate_fetch_result
* fix(convertGVFtoVCF.py): check if config is present before obtaining metadata
* fix(convertGVFtoVCF.py): make arguments optional
* fix(metadataJSON.py): validate the project accession
* fix(metadataJSON.py): change the sampleinvcf to match the sample id
* fix(test_metadataJSON.py): edit tests
* fix(test_metadataJSON.py): remove place holder and raise ValueError for missing results
* fix(test_metadataJSON.py): fetch methods changed to fetch what is named in the function name
* fix(test_metadataJSON.py): edit mock data to represent the real return type
* feat(gather_metadata.py): make gather_metadata its own executable
* edit comment
* fix(metadataJSON.py): improve error handling
* fix(metadataJSON.py): correct typo
* fix(metadataJSON.py): replace UNSPECIFIED placeholders with empty strings
* fix(metadataJSON.py): edit unit test
* fix(metadataJSON.py, test_metadataJSON.py): fix typos, remove dead code
* fix(metadataJSON.py, test_metadataJSON.py): fix typos1 parent 8b255f0 commit db8937a
File tree
7 files changed
+914
-4
lines changed- convert_gvf_to_vcf
- tests
- input
7 files changed
+914
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| 381 | + | |
| 382 | + | |
380 | 383 | | |
381 | 384 | | |
382 | 385 | | |
383 | 386 | | |
384 | 387 | | |
| 388 | + | |
| 389 | + | |
385 | 390 | | |
386 | 391 | | |
| 392 | + | |
| 393 | + | |
387 | 394 | | |
388 | 395 | | |
389 | 396 | | |
| |||
393 | 400 | | |
394 | 401 | | |
395 | 402 | | |
396 | | - | |
397 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
398 | 408 | | |
399 | 409 | | |
400 | 410 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments