Ejemplo n.º 1
0
############ Mutation Data Extraction and Aggregation ###########

import glob
import os
import sys

sys.path.append("../../common/")  ## to analysis/
import config as cf  ## some basic shit that I don't want to do myself

cf.addpath("run_file_aggregation/")
import run_file_aggregation as rf


## aggregate the contents of the tasks.dat file
def aggregate_coding_mutations_timeseries(directories,
                                          grouping="",
                                          subgrouping="",
                                          verbose=False,
                                          test=False,
                                          expected=None):

    input_files_glob = ["mutation_metrics.csv*"
                        ]  ## this is actually a globbing pattern
    column = 1
    outfile = "coding_mutations"

    return rf.aggregate_timeseries(directories,
                                   input_files_glob,
                                   outfile,
                                   column,
                                   grouping=grouping,
Ejemplo n.º 2
0
###################
# Analyze
###################

# system includes
import glob
import os
from optparse import OptionParser
import sys

sys.path.append(os.path.abspath(os.path.join(sys.path[0],
                                             "../common/")))  ## to common/
import config as cf

cf.addpath("generic/")
cf.addpath("fitness/")
cf.addpath("modularity/")
cf.addpath("coalescence/")
cf.addpath("mutations/")
cf.addpath("task_ct/")
cf.addpath("stats.dat/")
cf.addpath("count.dat/")

import fitness as fitness
import functional_modularity as functional_modularity
import coalescence as coalescence
import mutations as mutations
import task_ct as task_ct
import stats_dat as stats_dat
import count_dat as count_dat
Ejemplo n.º 3
0
############ Fitness Data Extraction and Aggregation ###########

import glob
import os
import sys
sys.path.append("../../common/") ## to common/
import config as cf## some basic shit that I don't want to do myself


cf.addpath( "commongraph/" )
import commongraph as cg


## plot a fitness timeseries
def plot_timeseries( grouping="", subgrouping="" ):

    input_files_glob = "*fitness.timeseries.csv" ## this is actually a globbing pattern
    outfile = "fitness"
    legend = True
    datasources = 1 ## this is weird, but an artifact of plot_from_csv. bar_chart_from_csv is more sane.
    title = "Fitness by Treatment"
    xlabel = "Updates"
    ylabel = "Fitness"
    ploterror = True
    xtickinterval = 50 ## maybe make this saner or configurable at some point, but all my stuff is this right now
    type = "median_only"

    return cg.plot_timeseries( input_files_glob, outfile, 
        grouping=grouping,
        subgrouping=subgrouping,
        legend=legend,
Ejemplo n.º 4
0
############ Tasks Count Data Extraction and Aggregation ###########

import glob
import os
import sys

sys.path.append("../../common/") ## to analysis/
import config as cf## some basic shit that I don't want to do myself

cf.addpath( "run_file_aggregation/" )
import run_file_aggregation as rf


## aggregate the contents of the tasks.dat file
def aggregate_timeseries( directories, grouping="", subgrouping="", verbose=False, test=False, expected=None ):

    input_files_glob = ["tasks.dat*"] ## this is actually a globbing pattern
    column = 3
    outfile = "task_ct"

    return rf.aggregate_timeseries( directories, input_files_glob, outfile, column, grouping=grouping, subgrouping=subgrouping, verbose=verbose, test=test, expected=expected )
Ejemplo n.º 5
0
############ Task Count Data Plotting ###########

import glob
import os
import sys
sys.path.append("../../common/")  ## to common/
import config as cf  ## some basic shit that I don't want to do myself

cf.addpath("commongraph/")
import commongraph as cg


## plot a fitness timeseries
def plot_timeseries(grouping="", subgrouping=""):

    input_files_glob = "*task_ct.timeseries.csv"  ## this is actually a globbing pattern
    outfile = "task_ct"
    legend = True
    datasources = 1  ## this is weird, but an artifact of plot_from_csv. bar_chart_from_csv is more sane.
    title = "Task Count by Treatment"
    xlabel = "Updates"
    ylabel = "Task Count"
    ploterror = True
    xtickinterval = 50  ## maybe make this saner or configurable at some point, but all my stuff is this right now
    type = "median_only"

    return cg.plot_timeseries(input_files_glob,
                              outfile,
                              grouping=grouping,
                              subgrouping=subgrouping,
                              legend=legend,
############ Run File Data Extraction and Aggregation ###########

import glob
import os
import sys
sys.path.append("../../common/") ## to analysis/
import config as cf## some basic shit that I don't want to do myself

cf.addpath( "integrity_testing/" )
import integrity_testing as it

extract_single_column_to_csv_path = cf.getpath( "common/extract_single_column_to_csv.py" )
aggregate_file_path = cf.getpath( "common/aggregate_file.py" )

def aggregate_timeseries( directories, input_files_glob, outfile, column, grouping="", subgrouping="", verbose=False, separator=" ", header=False, test=False, expected=None ):

    cwd = cf.Config.Script.cwd

    if grouping:
        grouping = "%s_" % grouping
    if subgrouping:
        subgrouping = "%s__" % subgrouping

    headeropt = ""
    if header:
        headeropt = "--header"


    aggregate_filename = os.path.join( cwd, "%s%s%s.timeseries.csv" % (grouping, subgrouping, outfile) )
    
    if test:
Ejemplo n.º 7
0
#!/usr/bin/python

###################
# Analyze
###################

# system includes
import glob
import os
from optparse import OptionParser
import sys

sys.path.append( os.path.abspath( os.path.join( sys.path[0], "../common/" ) ) ) ## to common/
import config as cf
cf.addpath( "generic/" )
cf.addpath( "fitness/" )
cf.addpath( "modularity/" )
cf.addpath( "coalescence/" )
cf.addpath( "mutations/" )
cf.addpath( "task_ct/" )
cf.addpath( "stats.dat/" )
cf.addpath( "count.dat/" )


import fitness as fitness
import functional_modularity as functional_modularity
import coalescence as coalescence
import mutations as mutations
import task_ct as task_ct
import stats_dat as stats_dat
import count_dat as count_dat
Ejemplo n.º 8
0
###################
# Make Graphs
###################

# system includes
import glob
import os
from optparse import OptionParser
import sys

sys.path.append( os.path.abspath( os.path.join( sys.path[0], "../common/" ) ) ) ## to common/
#print sys.path
import config as cf

cf.addpath( "fitness/" )
#cf.addpath( "modularity/" )
#cf.addpath( "coalescence/" )
#cf.addpath( "mutations/" )
cf.addpath( "task_ct/" )
cf.addpath( "stats.dat/" )
cf.addpath( "count.dat/" )

import fitness as fitness
import task_ct as task_ct
#import functional_modularity as functional_modularity
#import coalescence as coalescence
#import mutations as mutations
import stats_dat as stats_dat
import count_dat as count_dat
Ejemplo n.º 9
0
###################
# Make Graphs
###################

# system includes
import glob
import os
from optparse import OptionParser
import sys

sys.path.append(os.path.abspath(os.path.join(sys.path[0],
                                             "../common/")))  ## to common/
#print sys.path
import config as cf

cf.addpath("fitness/")
#cf.addpath( "modularity/" )
#cf.addpath( "coalescence/" )
#cf.addpath( "mutations/" )
cf.addpath("task_ct/")
cf.addpath("stats.dat/")
cf.addpath("count.dat/")

import fitness as fitness
import task_ct as task_ct
#import functional_modularity as functional_modularity
#import coalescence as coalescence
#import mutations as mutations
import stats_dat as stats_dat
import count_dat as count_dat