changeset 45:ee7209928db8 draft

Uploaded
author davidvanzessen
date Wed, 27 Jan 2016 05:35:55 -0500
parents 4c5033eb708f
children fee06348bfad
files complete.sh report_clonality/circos/circos.conf report_clonality/circos/housekeeping.conf report_clonality/r_wrapper.sh
diffstat 4 files changed, 264 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/complete.sh	Tue Jan 26 10:10:04 2016 -0500
+++ b/complete.sh	Wed Jan 27 05:35:55 2016 -0500
@@ -53,10 +53,6 @@
 	count=$((count+1))
 done
 
-echo "<tr><td>after loooop</td></tr>" >> $html
-
-echo "after loop"
-
 echo "<tr><td>-----------------------------------</td></tr>" >> $html
 echo "<tr><td>merging</td></tr>" >> $html
 
--- a/report_clonality/circos/circos.conf	Tue Jan 26 10:10:04 2016 -0500
+++ b/report_clonality/circos/circos.conf	Wed Jan 27 05:35:55 2016 -0500
@@ -134,13 +134,15 @@
 
 </links>
 
-anglestep       = 0.5
-minslicestep    = 10
-beziersamples   = 40
-debug           = no
-warnings        = no
-imagemap        = no
+#anglestep       = 0.5
+#minslicestep    = 10
+#beziersamples   = 40
+#debug           = no
+#warnings        = no
+#imagemap        = no
 
-units_ok = bupr
-units_nounit = n
+#units_ok = bupr
+#units_nounit = n
 
+<<include DATA_DIR/housekeeping.conf>>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/report_clonality/circos/housekeeping.conf	Wed Jan 27 05:35:55 2016 -0500
@@ -0,0 +1,230 @@
+# Housekeeping parameters, which must be included
+# at the top level of the configuration.
+#
+# Don't adjust these, unless you know what you are doing, or
+# feel like experimenting
+
+anglestep       = 0.5
+minslicestep    = 10
+beziersamples   = 40 # bezier curves are drawn piece-wise
+                     # linear, with this many samples
+debug           = no
+warnings        = no
+imagemap        = no
+paranoid        = yes
+
+units_ok        = bupr
+units_nounit    = n
+
+# \t  tab
+# \s  any whitespace
+file_delim = \s
+# collapse adjacent whitespace
+# e.g. two spaces are treated as one, not as a missing field
+file_delim_collapse = yes
+
+# Record delimiter for parameter values that are lists, such as
+# hs1:0.25;hs2:0.10. By default, both ; and , are accepted
+#
+# e.g. hs1:0.25,hs2:0.10
+#      hs1:0.25;hs2:0.10
+list_record_delim = \s*[;,]\s*
+# Field delimiter specifies the assignment operator, e.g.
+list_field_delim  = \s*[:=]\s*]
+
+# Rule fields and other parameters accept var(VARIABLE) syntax
+# to reference parameters of data points. By default, if
+# VARIABLE does not exist, Circos quits with an error, unless
+# the skip parameter below is set.
+#
+# This feature is useful when you have data that don't always
+# have the same options. For example,
+#
+# chr1 10 20 a=10
+# chr1 50 60 b=10
+skip_missing_expression_vars = no
+
+# In old versions, data point parameters were referenced using _NAME_
+# syntax. This has been replaced with var(NAME). The _NAME_ syntax is
+# deprecated (for example, it will break when dealing with fields like
+# gene_a_1). If you must use it, set the parameter below.
+
+legacy_underline_expression_syntax = no
+
+# Magnification factor for text in SVG files.
+svg_font_scale = 1.3
+
+# default font - pick one of the keys from <fonts> block
+default_font   = default
+# default font name is used for SVG files for cases where
+# the font definition does not include a name
+# see etc/fonts.conf for details
+default_font_name  = Arial
+default_font_color = black
+
+# default color for cases when color is not specified
+default_color  = black
+
+<guides>
+thickness      = 1
+size           = 5
+type           = outline
+<object>
+all            = no
+ideogram       = no
+ideogram_label = no
+</object>
+<color>
+default = lblue
+text    = red
+</color>
+</guides>
+
+# Receive debug messages about actions
+#
+# Comma-separated list of one or more of the following
+#
+# summary   - top level indications of what's happening
+# chrfilter - ideogram filtering (parsing 'chromosomes' parameter)
+# conf      - configuration file
+# counter   - plot counters
+# spacing   - ideogram spacing
+# scale     - ideogram scaling
+# ideogram  - ideogram reporting
+# anglepos  - report angle positions for base pair coordinates
+# zoom      - zoom regions
+# layers    - specific plot z-layers
+# rules     - dynamic rules
+# text      - text tracks
+# heatmap   - detailed heatmap reports
+# brush     - brushes
+# color     - color allocation and definition
+# ticks     - tick marks and labels
+# timers    - some benchmark timings
+# cache     - caches
+# _all      - turn on all groups
+debug_group = summary
+
+# run length duration after which timing report is automatically
+# generated at the end of the run
+debug_auto_timer_report = 30
+
+debug_word_separator = " "
+debug_undef_text     = _undef_
+debug_empty_text     = _emptylist_
+
+# parameters passed to functions can be
+# validated to check consistency. turn this
+# off to speed things up
+debug_validate       = yes
+
+# Reformat numbers in debug output for consistency.
+# If you have a lot of debug output (e.g. -debug_group _all)
+# this will slow things considerably.
+debug_output_tidy    = no
+
+# pixel sub-sampling for text tracks
+text_pixel_subsampling = 1
+# array or span - use 'span' if applying snuggle refinement
+text_snuggle_method    = array
+
+# restrict names of parameters?
+# if 'yes' then only certain named parameters are allowed within
+# blocks and option fields for data
+#
+# if 'no' then you can define parameters with any name what-so-ever,
+# useful if you wish to define states or labels for your data
+#
+# e.g. hs1 10 20 0.5 paired=yes,special=no,myvar=0.5
+#
+# ordinarily, 'paired', 'special' and 'myvar' would not be allowed
+restrict_parameter_names = no
+
+# Unless set to 'yes', parameter names will be converted to lowercase
+case_sensitive_parameter_names = no
+
+# The location of configuration and data files will be guessed if
+# (a) configuration file is not specified
+# (b) data file paths are relative
+# Circos will look in the following locations, where
+# SCRIPTPATH is the location of the 'circos' script (e.g. /usr/local/bin) and
+# CWD is the current directory (where the 'circos' command was executed).
+# All paths under CWD will be scanned first, then under SCRIPTPATH.
+#
+# {CWD,SCRIPTPATH}/.
+# {CWD,SCRIPTPATH}/..
+# {CWD,SCRIPTPATH}/etc/
+# {CWD,SCRIPTPATH}/../etc
+# {CWD,SCRIPTPATH}/../../etc
+# {CWD,SCRIPTPATH}/data
+# {CWD,SCRIPTPATH}/../data
+# {CWD,SCRIPTPATH}/../../data
+#
+# If you would like to prepend this list with custom directories for
+# data files, enter them as a CSV list here
+# data_path = /home/martink/circos-tutorials
+# If the cache is static, it will always be used and will not be updated
+# unless it is deleted (use -color_cache_rebuild on the command line).
+# Otherwise, the cache will be updated if
+#  - config file is newer than cache file
+#  - list of colors in config file is different than in cache file
+color_cache_static = yes
+color_cache_file   = circos.colorlist
+color_lists_use    = yes
+# if the directory is not defined, then the system will guess a temporary
+# directory compatible with your operating system (using File::Temp)
+# color_cache_dir    = /tmp
+
+# Make some functions faster. This should always be 'yes' unless you
+# want things to run slowly or suspect deep issues.
+memoize = yes
+
+# This is a debugging flag and should be set to 'no' for regular use
+quit_on_dump = yes
+
+offsets = 0,0
+
+# Maximum number of image and data elements. If these are exceeded,
+# Circos will quit with an error. These values are arbitrary, but in
+# my experience images with significantly more data points than this
+# are uninterpretable.
+
+max_ticks            = 5000
+max_ideograms        = 200
+max_links            = 25000
+max_points_per_track = 25000
+
+# What to do when data is found for an ideogram that does not appear in the karyotype file.
+
+# Set to 'skip' or 'exit'
+undefined_ideogram = skip
+
+# Number of iterations for determining ideogram sizes when
+# relative scale is used.
+relative_scale_iterations = 10
+
+# min, max, average, mode             - based on scale statistics of ALL ideograms
+# minadj, maxadj, averageadj, modeadj - based on scale statistics of adjacent ideograms
+#
+# You can specify a fixed scale for spacing using a floating value
+#
+# e.g. relative_scale_spacing = 1.5
+relative_scale_spacing    = mode
+
+# What to do with out-of-range data. Either 'clip' or 'hide'
+data_out_of_range = clip
+
+# Track default directory
+track_defaults = etc/tracks
+
+# Use round brushes for elements with thickness greater than round_brush_min_thickness?
+round_brush_use           = yes
+round_brush_min_thickness = 5
+
+# Use anti aliasing, where possible? I've seen bugs in some gd libraries
+# that cause artefacts to appear when lines are anti-aliased. If your
+# image contains unexpected elements, turn aa off.
+anti_aliasing = yes
+
+# A parameter that must be set. Checks whether this file was imported.
+housekeeping = yes
--- a/report_clonality/r_wrapper.sh	Tue Jan 26 10:10:04 2016 -0500
+++ b/report_clonality/r_wrapper.sh	Wed Jan 27 05:35:55 2016 -0500
@@ -53,10 +53,18 @@
 cp $dir/circos/* $outputDir/circos/
 CIRCOSTOOLS="/data/galaxy/galaxy-dist/toolsheddependencies/circos/0.64/saskia-hiltemann/cg_circos_plots/bbfdd52d64fd/circos-tools-0.21/tools"
 CIRCOSDIR="/data/galaxy/galaxy-dist/toolsheddependencies/circos/0.64/saskia-hiltemann/cg_circos_plots/bbfdd52d64fd/bin/"
+USECIRCOS="no"
+if [ -d "$CIRCOSDIR" ]; then
+	USECIRCOS="yes"
+fi
 sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf
 for sample in $samples; do #output the samples to a file and create the circos plots with the R script output
 	echo " $sample" >> $outputFile
 	
+	if [[ "$USECIRCOS" == "no" ]]; then
+		continue
+	fi
+	
 	circos_file="$outputDir/${sample}_VJ_circos.txt"
 	echo -e -n "labels$(cat ${circos_file})" > ${circos_file}
 	cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/
@@ -119,21 +127,23 @@
 
 #circos
 
-echo "<div class='tabbertab' title='Circos'><div class='tabber'>" >> $outputFile
-for sample in $samples; do
-	echo "<div class='tabbertab' title='$sample'><table border='1'><center>" >> $outputFile
-	if [[ "$useD" == "true" ]] ; then
-		echo "<tr><td>V-D</td><td><img src='circosVD_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile
-	fi
-	echo "<tr><td>V-J</td><td><img src='circosVJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile
-	if [[ "$useD" == "true" ]] ; then
-		echo "<tr><td>D-J</td><td><img src='circosDJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile
-	fi
-	echo "<center></table></div>" >> $outputFile
-	count=$((count+1))
-done
-echo "</div></div>" >> $outputFile
+if [[ "$USECIRCOS" == "no" ]]; then
 
+	echo "<div class='tabbertab' title='Circos'><div class='tabber'>" >> $outputFile
+	for sample in $samples; do
+		echo "<div class='tabbertab' title='$sample'><table border='1'><center>" >> $outputFile
+		if [[ "$useD" == "true" ]] ; then
+			echo "<tr><td>V-D</td><td><img src='circosVD_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile
+		fi
+		echo "<tr><td>V-J</td><td><img src='circosVJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile
+		if [[ "$useD" == "true" ]] ; then
+			echo "<tr><td>D-J</td><td><img src='circosDJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile
+		fi
+		echo "<center></table></div>" >> $outputFile
+		count=$((count+1))
+	done
+	echo "</div></div>" >> $outputFile
+fi
 #echo "<div class='tabbertab' title='Interactive'><svg class='chart'></svg><script src='http://d3js.org/d3.v3.min.js'></script></div>" >> $outputFile
 
 hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)"