Table exporter with all fields?

I have created a cohort, added some tiles, filtered etc. I now want to export the result, with the tiles as columns, to a table. I point table exported to this cohort but it only yields the EIDs. What do I need to do to get it to yield the other columns?

Comments

7 comments

  • Comment author
    Ondrej Klempir DNAnexus Team

    I think you will need to explicitly define all the columns you are interested in.

     

    As an alternative to Table Exporter, you can also try to test the recent dx_extract_dataset feature (which is part of dx toolkit):

    https://documentation.dnanexus.com/user/helpstrings-of-sdk-command-line-utilities#extract_dataset

     

    If you do not have it installed locally, you can run ttyd app or JupyterLab where dx-toolkit should be already installed. This example command worked for me and a csv file was exported:

     

    dx extract_dataset record-XXXX --fields "participant.eid,participant.p31,participant.p25024_i2" -o export.csv

     

    record-XXXX should refer to your existing cohort

    "participant.eid,participant.p31,participant.p25024_i2" specifies which fields you want to export, I found the coding for "p31", "p25024_i2" etc. in Cohort Browser

     

    You can then "dx upload" the resulting file back to dnax project.

    0
  • i have dx installed so trying that. not quite sure how to input my cohort i.e. the record-XXXX bit. what goes there exactly?

    0
  • Comment author
    Ondrej Klempir DNAnexus Team

    Each cohort has a unique record-id. One way how you can find it is via clicking on the saved cohort:

     

    f 

    0
  • Ah that's it, many thanks.

    0
  • Comment author
    Donald M. Lyall

    Hello,

     

    Thank you - I have found this thread very useful. One thing I would love, though, is to be able to extract according to UKB_FORMAT headers.

    So rather than

    > dx extract_dataset record-XXX --fields "participant.eid,participant.p_19_i0,participant.p21_i0" -o export.csv

    I'd prefer

    > dx extract_dataset record-XXX --fields "participant.eid,participant.100260-0.0,participant.100261-0.0" -o export.csv

    Having looked at the documentation, I can't find an approach similar to this. Is it possible?

    Thank you.

    Best wishes,

    Donald.

     

    0
  • Comment author
    Rachael W The helpers that keep the community running smoothly. UKB Community team Data Analyst

    Hi Donald,

    I don't think it is possible.

    As you have found, the dx extract_dataset command doesn't provide options to use ukb-format fields.

    The table exporter tool will produce its output in ukb-format, but it expects its input as field names or field titles.

    If anybody knows better, please do add an answer.

     

    1
  • Comment author
    Donald M. Lyall
    • Edited

    Hi Rachael,

    Ah well. Thank you for your response. 

    0

Please sign in to leave a comment.