sys.stderr.write("Loading core genes...\n") core_genes = parse_midas_data.load_core_genes(species_name) sys.stderr.write("Done! %d core genes\n" % len(core_genes)) ################# # Load metadata # ################# # Load subject and sample metadata sys.stderr.write("Loading HMP metadata...\n") subject_sample_map = parse_midas_data.parse_subject_sample_map() sys.stderr.write("Done!\n") # Load time metadata subject_sample_time_map_all_samples = parse_midas_data.parse_subject_sample_time_map( ) ###################### # Load coverage data # ###################### # Load genomic coverage distributions sample_coverage_histograms, samples = parse_midas_data.parse_coverage_distribution( species_name) median_coverages = numpy.array([ stats_utils.calculate_median_from_histogram(sample_coverage_histogram) for sample_coverage_histogram in sample_coverage_histograms ]) sample_coverage_map = { samples[i]: median_coverages[i] for i in xrange(0, len(samples))
min_change = 0.8 # Minimum median coverage of sample to look at min_coverage = 20 ################# # Load metadata # ################# # Load subject and sample metadata sys.stderr.write("Loading HMP metadata...\n") subject_sample_map = parse_midas_data.parse_subject_sample_map() sys.stderr.write("Done!\n") # Load time metadata subject_sample_time_map = parse_midas_data.parse_subject_sample_time_map() ###################### # Load coverage data # ###################### # Load genomic coverage distributions sample_coverage_histograms, samples = parse_midas_data.parse_coverage_distribution( species_name) median_coverages = numpy.array([ stats_utils.calculate_median_from_histogram(sample_coverage_histogram) for sample_coverage_histogram in sample_coverage_histograms ]) sample_coverage_map = { samples[i]: median_coverages[i] for i in xrange(0, len(samples))