Week 6 Quiz - question 10

Hi all,

I have been working on the week 6 quiz and everything seems to work fine except for question 10.
When I run the command:

pynidm query -nl nidm.ttl -q male_subj_IDs.sparql

I get the following output:
Empty DataFrame
Columns: [ID, Gender]
Index: []

Does anyone have the same problem or any idea how to resolve it? Both files are in my working directory and the spelling is correct.



1 Like

Hi Helene,

I can replicate your problem if I change what semantic term I associate the variable sex with. For example, when I use this semantic term in my dataset: http://id.nlm.nih.gov/mesh/2018/M0446358 (Genotypic Sex)

but I have this semantic term in my sparql query: https://id.nlm.nih.gov/mesh/2018/M0446359.html (Phenotypic Sex),

then I get the empty response you have posted.

Here is the relevant entry in the participants.json:

"sex": {
        "label": "",
        "description": "sex of the participant as reported by the participant",
        "levels": {
            "M": "male",
            "F": "female"
        "source_variable": "sex",
        "isAbout": {
            "url": "http://id.nlm.nih.gov/mesh/2018/M0446358",
            "label": "Genotypic Sex"

which should match the URL referenced in male_subj_IDs.sparql:

# find sex data element uuid
                        {?sex_measure a nidm:DataElement ;
                                        nidm:isAbout <http://id.nlm.nih.gov/mesh/2018/M0446358> .

If the URLs are different between files that could explain why, if this doesn’t not fix your issue, could you paste the contents of your participants.json and male_subj_IDs.sparql file?

Hope this helps!

1 Like

Thank you James for your quick reply. It was very helpful.


1 Like