######################################################
#
# Make a copy of this file and edit it to your liking
#
######################################################

snp_str = "NC_009614|1358863 NC_009614|1359300 NC_009614|1359644 NC_009614|1359604 NC_009614|1359607 NC_009614|1359610 NC_009614|1359613 NC_009614|1359474 NC_009614|1359650 NC_009614|1359836 NC_009614|1360034 NC_009614|1359986 NC_009614|1360025 NC_009614|1360067 NC_009614|1359994 NC_009614|1360604 NC_009614|1361747 NC_009614|1361745 NC_009614|1361746 NC_009614|1717704 NC_009614|1717234 NC_009614|1717624 NC_009614|1717718 NC_009614|1718781 NC_009614|2132489 NC_009614|2133645 NC_009614|2135208 NC_009614|2135207 NC_009614|3397049 NC_009614|3397051 NC_009614|3397641 NC_009614|3397983 NC_009614|3397995 NC_009614|3398562 NC_009614|3398541 NC_009614|3398544 NC_009614|3398811 NC_009614|3399946 NC_009614|3399922 NC_009614|3401002 NC_009614|3428239 NC_009614|3429694 NC_009614|3429695 NC_009614|3532039 NC_009614|3542553 NC_009614|3542597 NC_009614|4434369 NC_009614|4434400 NC_009614|4435351 NC_009614|4436797 NC_009614|4436809 NC_009614|4436293 NC_009614|4437269 NC_009614|4440302 NC_009614|4439005"

snp_str = "NC_009614|1359644 NC_009614|1359610 NC_009614|1359613 NC_009614|1359650 NC_009614|1360034 NC_009614|1360025 NC_009614|1359994 NC_009614|1360604 NC_009614|1361747 NC_009614|1361745 NC_009614|1361746 NC_009614|1718781 NC_009614|2132489 NC_009614|2133645 NC_009614|2135208 NC_009614|2135207 NC_009614|3401002 NC_009614|3428239 NC_009614|3532039 NC_009614|4439005"

snp_str = "NC_009614|1361747 NC_009614|1361746 NC_009614|3401002 NC_009614|4439005" 
items = snp_str.split()
target_snps = set()
for item in items:
    subitems = item.split("|")
    contig = subitems[0]
    location = long(subitems[1])
    target_snps.add((contig,location))
    
# Which population to plot
species_names = ['Bacteroides_vulgatus_57955']

# Alternative: can access entire list using function:
#species_names = parse_midas_data.parse_good_species_list()

# Output filename (alter as needed)
filename = parse_midas_data.analysis_directory+'Bacteroides_vulgatus_clusters_timecourse.png'

####################################################################
#
#  Function controlling which mutations are colored
#
#      Returns: true for colored
#               false for not colored
#
####################################################################
def color_condition(population_idx, chromosome, location, gene_name, variant_type, times, freqs, depths):

    condition = ((chromosome,location) in target_snps)
        
    return condition
