Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Added script to print out finemapping results
Browse files Browse the repository at this point in the history
  • Loading branch information
dzerbino committed Jun 26, 2018
1 parent 2688bdb commit 2781a80
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions extract_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import sys
import cPickle as pickle

file = open('postgap_output')
data = pickle.load(file)
file.close()

for genecluster_association in data:
gene = genecluster_association.gene
cluster = genecluster_association.cluster
chrom = cluster.ld_snps[0].chrom
start = min(X.pos for X in cluster.ld_snps)
end = max(X.pos for X in cluster.ld_snps)
posterior = genecluster_association.collocation_posterior
for tissue in posterior:
print "\t".join(map(str, [gene.name, gene.id, tissue, chrom, start, end, posterior[tissue]]))

0 comments on commit 2781a80

Please sign in to comment.