Skip to main content
zenodoopen

LD data from CEU hg18

<p>LD data from CEU hg18, based on&nbsp;<a>ftp://ftp.ncbi.nlm.nih.gov/hapmap/ld_data/latest</a></p> <p>&nbsp;</p> <p>Algo for computing:</p> <p>&nbsp;</p> <p>import pandas as pd</p> <p>rule ld_blocks:<br> &nbsp; &nbsp; input:<br> &nbsp; &nbsp; &nbsp; &nbsp; expand(&quot;blocks/{chromosome}_blocks.gz&quot;, chromosome=[&quot;chr{}&quot;.format(c) for c in list(range(1, 23)) + [&quot;X&quot;]])</p> <p>rule get_blocks:<br> &nbsp; &nbsp; output:<br> &nbsp; &nbsp; &nbsp; &nbsp; &quot;blocks/{chromosome}_blocks.gz&quot;<br> &nbsp; &nbsp; run:</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; c = wildcards.chromosome<br> &nbsp; &nbsp; &nbsp; &nbsp; f = r&quot;ftp://ftp.ncbi.nlm.nih.gov/hapmap/ld_data/latest/ld_{}_CEU.txt.gz&quot;.format(c)<br> &nbsp; &nbsp; &nbsp; &nbsp; print(f)<br> &nbsp; &nbsp; &nbsp; &nbsp; df = pd.read_csv(f,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sep=&quot; &quot;, header=None, usecols=[0, 1, 8])<br> &nbsp; &nbsp; &nbsp; &nbsp; print(df.head())</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; df.columns = &quot;Start End Block&quot;.split()<br> &nbsp; &nbsp; &nbsp; &nbsp; ls = df.groupby(&quot;Block&quot;).agg({&quot;Start&quot;: &quot;first&quot;, &quot;End&quot;: &quot;last&quot;, &quot;Block&quot;: [&quot;first&quot;, &quot;count&quot;]}).reset_index(drop=True)<br> &nbsp; &nbsp; &nbsp; &nbsp; ls.columns = &quot;Start End LDBlock Count&quot;.split()<br> &nbsp; &nbsp; &nbsp; &nbsp; lengths = ls[&quot;End&quot;] - ls[&quot;Start&quot;]<br> &nbsp; &nbsp; &nbsp; &nbsp; ls.insert(ls.shape[1], &quot;Length&quot;, lengths)<br> &nbsp; &nbsp; &nbsp; &nbsp; ls.insert(0, &quot;Chromosome&quot;, c)</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; ls.to_csv(output[0], sep=&quot;\t&quot;, index=None)<br> &nbsp;</p>

ShareScore

32/100

Overall dataset sharing score

Score breakdown

These five areas show where the dataset supports — or may limit — practical reuse.

Stewardship
4
Harmonization
4
Access
16
Reuse readiness
8
Engagement
0