<commit_before># illustration of EM algorithm for QTL mapping

h = 600
w = 800
margin = {left:110, top:80, right:80, bottom: 140, inner:15}
axispos = {xtitle:50, ytitle:85, xlabel:10, ylabel:10}
radius = 4
bigradius = 6
pointcolor = "slateblue"
hilitpointcolor = "Orchid"
pointstrokecolor = "black"
pointstrokewidth = 1

# permute button
buttonw = 80
buttonh = 40

# back button
buttonw2 = 80

totalh = h + buttonh + margin.bottom*1.5


svg = d3.select("div#chart")
        .append("svg")
        .attr("height", totalh)
        .attr("width", w+margin.left*margin.right)

# globals
permbutton = null
backbutton = null
backbuttontext = null
iteration = 0


d3.json "data.json", (data) ->

    add_buttons()
    
    toplot = {data:{x: data.p[0], y: data.y}, indID:[]}

    for i of data.y
        toplot.indID[i] = d3.format(".%f")(data.p[0])

    # using scatterplot just to get the frame, really
    mychart = scatterplot().xvar("x")
                           .yvar("y")
                           .xlab("Pr(AB | marker data)")
                           .ylab("Phenotype")
                           .xlim([-0.05, 1.05])
                           .height(h)
                           .width(w)
                           .margin(margin)
                           .axispos(axispos)
                           .dataByInd(false)
                           .title("Iteration 0, LOD = #{d3.format(".2f")(data.lod[0])}")
  
    d3.select("svg")
      .datum(toplot)
      .call(mychart)

    # x and y axis labels
    d3.select("g.x.axis text.title").text(() ->
                         return "Pr(AB | marker data)" if iteration == 0
                         "Pr(AB | marker data, y, theta-hat)")
    d3.select("g.y.axis text.title").text("Phenotype")

    # erase the points produced by scatterplot
    mychart.pointsSelect().remove()
    <commit_msg>em_alg: style changes (e.g. bigger text)<commit_after># illustration of EM algorithm for QTL mapping

h = 600
w = 800
margin = {left:110, top:80, right:80, bottom: 140, inner:15}
axispos = {xtitle:50, ytitle:85, xlabel:10, ylabel:10}
radius = 4
bigradius = 6
pointcolor = "slateblue"
hilitpointcolor = "Orchid"
pointstrokecolor = "black"
pointstrokewidth = 1

# permute button
buttonw = 80
buttonh = 40

# back button
buttonw2 = 80

totalh = h + buttonh + margin.bottom*1.5


svg = d3.select("div#chart")
        .append("svg")
        .attr("height", totalh)
        .attr("width", w+margin.left*margin.right)

# globals
permbutton = null
backbutton = null
backbuttontext = null
iteration = 0


d3.json "data.json", (data) ->

    add_buttons()
    
    toplot = {data:{x: data.p[0], y: data.y}, indID:[]}

    for i of data.y
        toplot.indID[i] = d3.format(".%f")(data.p[0])

    # using scatterplot just to get the frame, really
    mychart = scatterplot().xvar("x")
                           .yvar("y")
                           .xlab("Pr(AB | marker data)")
                           .ylab("Phenotype")
                           .xlim([-0.05, 1.05])
                           .height(h)
                           .width(w)
                           .margin(margin)
                           .axispos(axispos)
                           .dataByInd(false)
                           .title("Iteration 0, LOD = #{d3.format(".2f")(data.lod[0])}")
  
    d3.select("svg")
      .datum(toplot)
      .call(mychart)

    # erase the points produced by scatterplot
    mychart.pointsSelect().remove()
    
{'fraction_non_alphanumeric': 0.14096281349091958, 'fraction_numerical': 0.03257422888440473, 'mean_word_length': 1.8188464662875712, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4782655', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1133, 'n_words': 262}