From 32cbb204c1b45dea0d1bcd8c9368925809aca063 Mon Sep 17 00:00:00 2001 From: Evan Bolyen Date: Fri, 8 Nov 2024 13:44:17 -0700 Subject: [PATCH 1/2] Reformat test data & update author --- q2_fmt/_examples.py | 6 +-- .../data.ndjson => peds_dist.table.jsonl} | 51 ++++++++++--------- q2_fmt/tests/data/peds_dist/dataresource.json | 51 ------------------- setup.py | 6 +-- 4 files changed, 30 insertions(+), 84 deletions(-) rename q2_fmt/tests/data/{peds_dist/data.ndjson => peds_dist.table.jsonl} (67%) delete mode 100644 q2_fmt/tests/data/peds_dist/dataresource.json diff --git a/q2_fmt/_examples.py b/q2_fmt/_examples.py index b4233af..8fee5ad 100644 --- a/q2_fmt/_examples.py +++ b/q2_fmt/_examples.py @@ -66,13 +66,9 @@ def peds_md_factory(): def peds_dist_factory(): - import pandas as pd - df = transform(_get_data_from_tests('peds_dist'), - from_type=TabularDataResourceDirFmt, - to_type=pd.DataFrame) return qiime2.Artifact.import_data( "Dist1D[Ordered, Matched] % Properties('peds')", - df + _get_data_from_tests('peds_dist.table.jsonl') ) diff --git a/q2_fmt/tests/data/peds_dist/data.ndjson b/q2_fmt/tests/data/peds_dist.table.jsonl similarity index 67% rename from q2_fmt/tests/data/peds_dist/data.ndjson rename to q2_fmt/tests/data/peds_dist.table.jsonl index cfe5d0c..1d4a048 100644 --- a/q2_fmt/tests/data/peds_dist/data.ndjson +++ b/q2_fmt/tests/data/peds_dist.table.jsonl @@ -1,25 +1,26 @@ -{"id":"76575c97","measure":0.2868217054,"transfered_donor_features":37,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":1.0} -{"id":"efb2f65b","measure":0.6434108527,"transfered_donor_features":83,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":2.0} -{"id":"45d2f050","measure":0.4728682171,"transfered_donor_features":61,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":3.0} -{"id":"ed726564","measure":0.5426356589,"transfered_donor_features":70,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":4.0} -{"id":"c9e65e6b","measure":0.5968992248,"transfered_donor_features":77,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":5.0} -{"id":"32882f3f","measure":0.2325581395,"transfered_donor_features":30,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":1.0} -{"id":"702ac37a","measure":0.480620155,"transfered_donor_features":62,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":2.0} -{"id":"ec83471f","measure":0.3953488372,"transfered_donor_features":51,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":3.0} -{"id":"e9b009ec","measure":0.511627907,"transfered_donor_features":66,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":4.0} -{"id":"cd005b96","measure":0.519379845,"transfered_donor_features":67,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":5.0} -{"id":"2769cc8e","measure":0.4226190476,"transfered_donor_features":71,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":1.0} -{"id":"a04549ba","measure":0.7202380952,"transfered_donor_features":121,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":2.0} -{"id":"ea845f9c","measure":0.6845238095,"transfered_donor_features":115,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":3.0} -{"id":"d1c602df","measure":0.7083333333,"transfered_donor_features":119,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":4.0} -{"id":"743793ec","measure":0.7321428571,"transfered_donor_features":123,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":5.0} -{"id":"8ea7fa9e","measure":0.4341085271,"transfered_donor_features":56,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":1.0} -{"id":"d1a7bf51","measure":0.6356589147,"transfered_donor_features":82,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":2.0} -{"id":"df976735","measure":0.4263565891,"transfered_donor_features":55,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":3.0} -{"id":"2028a351","measure":0.5581395349,"transfered_donor_features":72,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":4.0} -{"id":"a628cc67","measure":0.5968992248,"transfered_donor_features":77,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":5.0} -{"id":"f88f3e2c","measure":0.4418604651,"transfered_donor_features":57,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":1.0} -{"id":"3597719a","measure":0.3643410853,"transfered_donor_features":47,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":2.0} -{"id":"baafb929","measure":0.5348837209,"transfered_donor_features":69,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":3.0} -{"id":"dd9369b1","measure":0.503875969,"transfered_donor_features":65,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":4.0} -{"id":"e868515c","measure":0.5658914729,"transfered_donor_features":73,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":5.0} +{"doctype":{"name":"table.jsonl","format":"application/x-json-lines","version":"1.0"},"direction":"row","style":"key:value","fields":[{"name":"id","type":"string","missing":false,"title":"Sample ID","description":"Sample IDs","extra":{"name":"id"}},{"name":"measure","type":"number","missing":false,"title":"Sample PEDS","description":"Proportional Engraftment of Donor Strains","extra":{"name":"measure"}},{"name":"transfered_donor_features","type":"integer","missing":false,"title":"Transfered Reference Features","description":"...","extra":{"name":"transfered_donor_features"}},{"name":"total_donor_features","type":"integer","missing":false,"title":"Total Reference Features","description":"...","extra":{"name":"total_donor_features"}},{"name":"donor","type":"string","missing":false,"title":"Donor","description":"Donor","extra":{"name":"donor"}},{"name":"subject","type":"string","missing":false,"title":"SubjectID","description":"Subject IDs linking samples across time","extra":{"name":"subject"}},{"name":"group","type":"integer","missing":false,"title":"time_point","description":"Time","extra":{"name":"group"}}],"index":[],"title":"","description":"","extra":{}} +{"id":"76575c97","measure":0.2868217054,"transfered_donor_features":37,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":1} +{"id":"efb2f65b","measure":0.6434108527,"transfered_donor_features":83,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":2} +{"id":"45d2f050","measure":0.4728682171,"transfered_donor_features":61,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":3} +{"id":"ed726564","measure":0.5426356589,"transfered_donor_features":70,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":4} +{"id":"c9e65e6b","measure":0.5968992248,"transfered_donor_features":77,"total_donor_features":129,"donor":"a74441b7","subject":"s1","group":5} +{"id":"32882f3f","measure":0.2325581395,"transfered_donor_features":30,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":1} +{"id":"702ac37a","measure":0.480620155,"transfered_donor_features":62,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":2} +{"id":"ec83471f","measure":0.3953488372,"transfered_donor_features":51,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":3} +{"id":"e9b009ec","measure":0.511627907,"transfered_donor_features":66,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":4} +{"id":"cd005b96","measure":0.519379845,"transfered_donor_features":67,"total_donor_features":129,"donor":"a74441b7","subject":"s2","group":5} +{"id":"2769cc8e","measure":0.4226190476,"transfered_donor_features":71,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":1} +{"id":"a04549ba","measure":0.7202380952,"transfered_donor_features":121,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":2} +{"id":"ea845f9c","measure":0.6845238095,"transfered_donor_features":115,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":3} +{"id":"d1c602df","measure":0.7083333333,"transfered_donor_features":119,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":4} +{"id":"743793ec","measure":0.7321428571,"transfered_donor_features":123,"total_donor_features":168,"donor":"cfd4c979","subject":"s3","group":5} +{"id":"8ea7fa9e","measure":0.4341085271,"transfered_donor_features":56,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":1} +{"id":"d1a7bf51","measure":0.6356589147,"transfered_donor_features":82,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":2} +{"id":"df976735","measure":0.4263565891,"transfered_donor_features":55,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":3} +{"id":"2028a351","measure":0.5581395349,"transfered_donor_features":72,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":4} +{"id":"a628cc67","measure":0.5968992248,"transfered_donor_features":77,"total_donor_features":129,"donor":"a74441b7","subject":"s4","group":5} +{"id":"f88f3e2c","measure":0.4418604651,"transfered_donor_features":57,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":1} +{"id":"3597719a","measure":0.3643410853,"transfered_donor_features":47,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":2} +{"id":"baafb929","measure":0.5348837209,"transfered_donor_features":69,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":3} +{"id":"dd9369b1","measure":0.503875969,"transfered_donor_features":65,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":4} +{"id":"e868515c","measure":0.5658914729,"transfered_donor_features":73,"total_donor_features":129,"donor":"a74441b7","subject":"s5","group":5} diff --git a/q2_fmt/tests/data/peds_dist/dataresource.json b/q2_fmt/tests/data/peds_dist/dataresource.json deleted file mode 100644 index d4345cc..0000000 --- a/q2_fmt/tests/data/peds_dist/dataresource.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "schema": { - "fields": [ - { - "title": "Sample ID", - "description": "Sample IDs", - "name": "id", - "type": "string" - }, - { - "title": "Sample PEDS", - "description": "Proportional Engraftment of Donor Strains", - "name": "measure", - "type": "number" - }, - { - "title": "Transfered Reference Features", - "description": "...", - "name": "transfered_donor_features", - "type": "integer" - }, - { - "title": "Total Reference Features", - "description": "...", - "name": "total_donor_features", - "type": "integer" - }, - { - "title": "Donor", - "description": "Donor", - "name": "donor", - "type": "string" - }, - { - "title": "SubjectID", - "description": "Subject IDs linking samples across time", - "name": "subject", - "type": "string" - }, - { - "title": "time_point", - "description": "Time", - "name": "group", - "type": "integer" - } - ] - }, - "format": "ndjson", - "path": "data.ndjson", - "name": "data" -} \ No newline at end of file diff --git a/setup.py b/setup.py index a2c3f26..eac47a1 100644 --- a/setup.py +++ b/setup.py @@ -18,11 +18,11 @@ 'q2_fmt': [ 'assets/*', 'citations.bib'], - 'q2_fmt.tests': ['data/*', 'data/peds_dist/*'], + 'q2_fmt.tests': ['data/*'], }, - author='Liz Gehret', - author_email='elizabeth.gehret@nau.edu', + author='Chloe Herman', + author_email='crh423@nau.edu', description='QIIME 2 Plugin used for FMT analyses.', license='BSD-3-Clause', url='https://github.com/qiime2/q2-fmt', From 37e1dc9b77a57319ba1861f12021c0736d233911 Mon Sep 17 00:00:00 2001 From: Evan Bolyen Date: Fri, 8 Nov 2024 13:47:17 -0700 Subject: [PATCH 2/2] remove frictionless --- environment-files/2024.10-q2-fmt-environment.yml | 1 - environment-files/development-q2-fmt-environment.yml | 1 - environment-files/q2-fmt-qiime2-amplicon-2024.10.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/environment-files/2024.10-q2-fmt-environment.yml b/environment-files/2024.10-q2-fmt-environment.yml index caacbf4..23a058c 100644 --- a/environment-files/2024.10-q2-fmt-environment.yml +++ b/environment-files/2024.10-q2-fmt-environment.yml @@ -7,4 +7,3 @@ dependencies: - pip - pip: - q2-fmt@git+https://github.com/qiime2/q2-fmt.git@dev - - frictionless diff --git a/environment-files/development-q2-fmt-environment.yml b/environment-files/development-q2-fmt-environment.yml index caacbf4..23a058c 100644 --- a/environment-files/development-q2-fmt-environment.yml +++ b/environment-files/development-q2-fmt-environment.yml @@ -7,4 +7,3 @@ dependencies: - pip - pip: - q2-fmt@git+https://github.com/qiime2/q2-fmt.git@dev - - frictionless diff --git a/environment-files/q2-fmt-qiime2-amplicon-2024.10.yml b/environment-files/q2-fmt-qiime2-amplicon-2024.10.yml index caacbf4..23a058c 100644 --- a/environment-files/q2-fmt-qiime2-amplicon-2024.10.yml +++ b/environment-files/q2-fmt-qiime2-amplicon-2024.10.yml @@ -7,4 +7,3 @@ dependencies: - pip - pip: - q2-fmt@git+https://github.com/qiime2/q2-fmt.git@dev - - frictionless