Skip to content

Commit

Permalink
v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker-Jerome committed Apr 18, 2018
1 parent e710492 commit 681abe9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions joint_covariance.py
Expand Up @@ -61,6 +61,7 @@ def __init__(self, args):
self.db_logic_dict = {}
self.gene_rsid_dict = {}
self.db_file_list = []
self.gene_count = 0

# preprocessing filter
self.min_maf_filter = float(args.min_maf_filter) if args.min_maf_filter else None
Expand Down Expand Up @@ -195,15 +196,15 @@ def buildCovarianceEntries(self, name, gene, weight_db_logic, snps_by_rsid):
if len(related_rsids) == 0:
return []

self.updateFoundCovariance(gene, name)
#self.updateFoundCovariance(gene, name)

#covariance matrix of related SNP's data
array = np.array(related_data)
cov = np.cov(array)
self.total_gene += 1;
logging.info("GENE:" + str(self.total_gene))
self.gene_count += 1;
logging.info("GENE:" + str(self.gene_count))

#save the covariance matrix
# save the covariance matrix
# write the cov matrix
cov_filename = self.covariance_output + "/" + gene + ".cov"
with open(cov_filename,"w") as fo:
Expand Down

0 comments on commit 681abe9

Please sign in to comment.