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

Make Additional Attributes into an array #105

Closed
wants to merge 4 commits into from

Conversation

rjawesome
Copy link
Contributor

@rjawesome rjawesome commented Jul 8, 2022

This PR is meant to solve this issue. I currently have made all additional attributes to an array, even if they only have one value similar to biolink attributes such as the ones in this screenshot. The behavior could be changed to make single values into normal values rather than single value arrays.
image

@colleenXu
Copy link
Contributor

added a comment biothings/biothings_explorer#463 (comment). However, as I note, it may be a separate issue rather than something that can go with this

@colleenXu
Copy link
Contributor

@rjawesome I tried copying the code changes, and testing them...

when I run the original test query, I do not see the 9 figures' information...instead I see:

                        {
                            "attribute_type_id": "figure_title",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "figure_url",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "pmc_reference",
                            "value": {}
                        }

I tried only keeping the change c07de55 but I still see the same thing.

@colleenXu
Copy link
Contributor

colleenXu commented Jul 13, 2022

I see the same issue for the MyVariant query; all affected "additional attributes" are empty objects:

see edge
                "78b67564f4347c389299252402c104d7": {
                    "predicate": "biolink:affects",
                    "subject": "DBSNP:rs121913521",
                    "object": "MONDO:0011996",
                    "attributes": [
                        {
                            "attribute_type_id": "biolink:aggregator_knowledge_source",
                            "value": [
                                "infores:biothings-explorer"
                            ],
                            "value_type_id": "biolink:InformationResource"
                        },
                        {
                            "attribute_type_id": "biolink:primary_knowledge_source",
                            "value": [
                                "infores:civic"
                            ],
                            "value_type_id": "biolink:InformationResource"
                        },
                        {
                            "attribute_type_id": "biolink:aggregator_knowledge_source",
                            "value": [
                                "infores:myvariant-info"
                            ],
                            "value_type_id": "biolink:InformationResource"
                        },
                        {
                            "attribute_type_id": "biolink:publications",
                            "value": [
                                "PMID:21364689",
                                "PMID:19039322",
                                "PMID:18955458",
                                "PMID:26772734",
                                "PMID:14645423",
                                "PMID:25239608"
                            ]
                        },
                        {
                            "attribute_type_id": "civic_clinical_significance",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_description",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_drug_interaction",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_drugs_involved",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_evidence_direction",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_evidence_level",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_evidence_type",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_variant_in_gene",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "civic_variant_origin",
                            "value": {}
                        },
                        {
                            "attribute_type_id": "clinical_trial_url",
                            "value": {}
                        }
                    ]
                }
            }

@rjawesome
Copy link
Contributor Author

rjawesome commented Jul 13, 2022

The queries are working locally on my machine, but I did notice that I was missing an Array.from which I had in my workspace and not in my PR, although that shouldn't have affected the earlier commit? (I do note in my testing removing the Array.from causes the value to be an empty object so that seems to be the most likely culprit) Is there any other differences I could check between my environment and the one you are testing on?

@rjawesome
Copy link
Contributor Author

Replacing this PR with #108

@rjawesome rjawesome closed this Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants