diff options
Diffstat (limited to 'wqflask/wqflask/static/new/javascript/manhattan_plot.coffee')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/manhattan_plot.coffee | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/wqflask/wqflask/static/new/javascript/manhattan_plot.coffee b/wqflask/wqflask/static/new/javascript/manhattan_plot.coffee index cc087493..d637183d 100644 --- a/wqflask/wqflask/static/new/javascript/manhattan_plot.coffee +++ b/wqflask/wqflask/static/new/javascript/manhattan_plot.coffee @@ -370,95 +370,3 @@ lodchart = () -> # return the chart function
chart
-
-
-# reorganize lod/pos by chromosome
-# lodvarname==null -> case for multiple LOD columns (lodheatmap)
-# lodvarname provided -> case for one LOD column (lodchart)
-#reorgLodData = (data, lodvarname=null) ->
-# data.posByChr = {}
-# data.lodByChr = {}
-#
-# for chr,i in data.chrnames
-# data.posByChr[chr[0]] = []
-# data.lodByChr[chr[0]] = []
-# for pos, j in data.pos
-# if data.chr[j] == chr[0]
-# data.posByChr[chr[0]].push(pos)
-# data.lodnames = [data.lodnames] unless Array.isArray(data.lodnames)
-# lodval = (data[lodcolumn][j] for lodcolumn in data.lodnames)
-# data.lodByChr[chr[0]].push(lodval)
-#
-#
-# if lodvarname?
-# data.markers = []
-# for marker,i in data.markernames
-# if marker != ""
-# data.markers.push({name:marker, chr:data.chr[i], pos:data.pos[i], lod:data[lodvarname][i]})
-#
-# data
-
-
-# calculate chromosome start/end + scales, for heat map
-#chrscales = (data, width, chrGap, leftMargin, pad4heatmap) ->
-# # start and end of chromosome positions
-# chrStart = []
-# chrEnd = []
-# chrLength = []
-# totalChrLength = 0
-# maxd = 0
-# for chr in data.chrnames
-# d = maxdiff(data.posByChr[chr[0]])
-# maxd = d if d > maxd
-#
-# rng = d3.extent(data.posByChr[chr[0]])
-# chrStart.push(rng[0])
-# chrEnd.push(rng[1])
-# L = rng[1] - rng[0]
-# chrLength.push(L)
-# totalChrLength += L
-#
-# # adjust lengths for heatmap
-# if pad4heatmap
-# data.recwidth = maxd
-# chrStart = chrStart.map (x) -> x-maxd/2
-# chrEnd = chrEnd.map (x) -> x+maxd/2
-# chrLength = chrLength.map (x) -> x+maxd
-# totalChrLength += (chrLength.length*maxd)
-#
-# # break up x axis into chromosomes by length, with gaps
-# data.chrStart = []
-# data.chrEnd = []
-# cur = leftMargin
-# cur += chrGap/2 unless pad4heatmap
-# data.xscale = {}
-# for chr,i in data.chrnames
-# data.chrStart.push(cur)
-# w = Math.round((width-chrGap*(data.chrnames.length-pad4heatmap))/totalChrLength*chrLength[i])
-# data.chrEnd.push(cur + w)
-# cur = data.chrEnd[i] + chrGap
-# # x-axis scales, by chromosome
-# data.xscale[chr[0]] = d3.scale.linear()
-# .domain([chrStart[i], chrEnd[i]])
-# .range([data.chrStart[i], data.chrEnd[i]])
-#
-# # return data with new stuff added
-# data
-#
-## maximum difference between adjacent values in a vector
-#maxdiff = (x) ->
-# return null if x.length < 2
-# result = x[1] - x[0]
-# return result if x.length < 3
-# for i in [2...x.length]
-# d = x[i] - x[i-1]
-# result = d if d > result
-# result
-#
-## determine rounding of axis labels
-#formatAxis = (d) ->
-# d = d[1] - d[0]
-# ndig = Math.floor( Math.log(d % 10) / Math.log(10) )
-# ndig = 0 if ndig > 0
-# ndig = Math.abs(ndig)
-# d3.format(".#{ndig}f")
|