UK Biobank/Downloading the data: Difference between revisions

From Vrieze Wiki
Jump to navigation Jump to search
Lessem (talk | contribs)
No edit summary
Line 8: Line 8:
<li>The key, k1234.key was saved from the PI's email.</li>
<li>The key, k1234.key was saved from the PI's email.</li>
<li> This command was run to decrypt the downloaded phenotype file
<li> This command was run to decrypt the downloaded phenotype file
<pre>
<syntaxhighlight lang="bash">
$ ./ukb_unpack ukb1234.enc k1234.key
$ ./ukb_unpack ukb1234.enc k1234.key
</pre>
</syntaxhighlight>
which produced the file ukb1234.enc_ukb</li>
which produced the file ukb1234.enc_ukb</li>
<li>Once decrypted, the following commands were run to extract the data into useful formats
<li>Once decrypted, the following commands were run to extract the data into useful formats
<pre>
<syntaxhighlight lang="bash">
$ ./ukb_conv ukb1234.enc_ukb bulk -eencoding.ukb
$ ./ukb_conv ukb1234.enc_ukb bulk -eencoding.ukb
$ ./ukb_conv ukb1234.enc_ukb docs -eencoding.ukb
$ ./ukb_conv ukb1234.enc_ukb docs -eencoding.ukb
$ ./ukb_conv ukb1234.enc_ukb r -eencoding.ukb
$ ./ukb_conv ukb1234.enc_ukb r -eencoding.ukb
</pre>
</syntaxhighlight>
<ol>
<ol>
<li>bulk is a list of IDs for use with the ukbfetch utility</li>
<li>bulk is a list of IDs for use with the ukbfetch utility</li>
Line 25: Line 25:
</li>
</li>
</ol>
</ol>


== Genotypic data ==
== Genotypic data ==

Revision as of 18:22, 29 February 2016

These procedures were all derived from the documentation at the UK Biobank. This information is here as a record and reference. Researchers should not have to repeat these steps.

Phenotypic data

  1. The phenotype file was downloaded from UK Biobank by the project PI as instructed in the data accessibility email.
  2. All of the utilities from the UK Biobank download page were retrieved.
  3. The key, k1234.key was saved from the PI's email.
  4. This command was run to decrypt the downloaded phenotype file
    $ ./ukb_unpack ukb1234.enc k1234.key
    which produced the file ukb1234.enc_ukb
  5. Once decrypted, the following commands were run to extract the data into useful formats
    $ ./ukb_conv ukb1234.enc_ukb bulk -eencoding.ukb
    $ ./ukb_conv ukb1234.enc_ukb docs -eencoding.ukb
    $ ./ukb_conv ukb1234.enc_ukb r -eencoding.ukb
    1. bulk is a list of IDs for use with the ukbfetch utility
    2. docs produces an html file containing documentation of the variables in this dataset
    3. r produces a tab deliminated file and an R script for labeling and putting levels on the variables.

Genotypic data

  1. Genetic data is downloaded following the instructions at the UK Biobank site.
  2. Scripted downloads of all chromosomes were done using a command such as
    $ seq 1 26 | parallel -j1 ./gfetch cal {}
    $ seq 1 26 | parallel -j1 ./gfetch imp {}
    
  3. A single sample map (impv1.sample) for the imputed data also was downloaded
    $ ./gfetch imp 1 -m