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

# Which population to plot
species_names = ["Faecalibacterium_prausnitzii_61481", "Eubacterium_eligens_61678"]
 
 
# Output filename
filename = parse_midas_data.analysis_directory+'strain_figure.png'
output_filename = parse_midas_data.analysis_directory+'strain_figure_snps.txt'

####################################################################
#
#  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 = False
    
    #condition = (freqs.max()-freqs.min() > 0.8)
    #condition = (freqs[0]<0.05)*(freqs[1]<0.05)*((freqs.max()-freqs.min()) > 0.5)
    # Examples:
    # 
    # Mutation is in the majority at the end of the experiment
    # condition = f(60000) > 0.5
    #
    # Mutation is a structural variant in the nadR gene
    # condition = (gene_name == 'nadR') and var_type='sv'
    #
    # Mutation is in one of the mut* genes
    # condition = gene_name.startswith('mut')
    # ... 
    
    return condition
