diff options
author | Lei Yan | 2016-02-25 16:42:15 +0000 |
---|---|---|
committer | Lei Yan | 2016-02-25 16:42:15 +0000 |
commit | e55f38a72d47fbdf5f652a08e8da1db78f1dcdb5 (patch) | |
tree | 68161b76858cf72f7a7b5576de6384042e214d8e /wqflask/maintenance/dataset/correlations.py | |
parent | 7263c52a7d903a2dbdd5d05411821ec960961b4d (diff) | |
parent | ece60a2d25ed71980121ac1c1854c3ab3514f453 (diff) | |
download | genenetwork2-e55f38a72d47fbdf5f652a08e8da1db78f1dcdb5.tar.gz |
Merge /home/zas1024/gene
Diffstat (limited to 'wqflask/maintenance/dataset/correlations.py')
-rw-r--r-- | wqflask/maintenance/dataset/correlations.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/wqflask/maintenance/dataset/correlations.py b/wqflask/maintenance/dataset/correlations.py deleted file mode 100644 index b089e446..00000000 --- a/wqflask/maintenance/dataset/correlations.py +++ /dev/null @@ -1,47 +0,0 @@ -# Author: Lei Yan -# Create Date: 2014-01-21 -# Last Update Date: 2014-01-24 - -# import -import sys -import os -import re -import MySQLdb -import ConfigParser - -def main(argv): - - # load configuration from configuration file - config = ConfigParser.ConfigParser() - config.read(argv[1]) - genofile = config.get('configuration', 'genofile') - - # parse genofile - genotypes = [] - file_geno = open(genofile, 'r') - for line in file_geno: - line = line.strip() - if line.startswith('#'): - continue - if line.startswith('@'): - continue - cells = line.split() - if line.startswith("Chr"): - strains = cells[4:] - continue - genotype = {} - genotype['chr'] = cells[0] - genotype['locus'] = cells[1] - genotype['cm'] = cells[2] - genotype['mb'] = cells[3] - genotype['values'] = cells[4:] - genotypes.append(genotype) - print "get %d strains:\t%s" % (len(strains), strains) - print "load %d genotypes" % len(genotypes) - - # phenotypes - -# main -if __name__ == "__main__": - main(sys.argv) - print "exit successfully" |