# HG changeset patch # User davidvanzessen # Date 1453121731 18000 # Node ID f2010de70741ebe56a2e88ea15d303b2a40b4fee # Parent 2d38d7c1d0d0d4e332931ab0c1a114e8118d97e0 Uploaded diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/RScript.r --- a/report_clonality/RScript.r Wed Jan 13 05:05:32 2016 -0500 +++ b/report_clonality/RScript.r Mon Jan 18 07:55:31 2016 -0500 @@ -484,10 +484,42 @@ } +# ---------------------- output tables for the circos plots ---------------------- + +print("Report Clonality - Circos data") + +for(smpl in unique(PRODF$Sample)){ + PRODF.sample = PRODF[PRODF$Sample == smpl,] + + fltr = PRODF.sample$Top.V.Gene == "" + if(sum(fltr) > 0){ + PRODF.sample[fltr, "Top.V.Gene"] = "NA" + } + + fltr = PRODF.sample$Top.D.Gene == "" + if(sum(fltr) > 0){ + PRODF.sample[fltr, "Top.D.Gene"] = "NA" + } + + fltr = PRODF.sample$Top.J.Gene == "" + if(sum(fltr) > 0){ + PRODF.sample[fltr, "Top.J.Gene"] = "NA" + } + + v.d = table(PRODF.sample$Top.V.Gene, PRODF.sample$Top.D.Gene) + v.j = table(PRODF.sample$Top.V.Gene, PRODF.sample$Top.J.Gene) + d.j = table(PRODF.sample$Top.D.Gene, PRODF.sample$Top.J.Gene) + + write.table(v.d, file=paste(smpl, "_VD_circos.txt", sep=""), sep="\t", quote=F, row.names=T, col.names=NA) + write.table(v.j, file=paste(smpl, "_VJ_circos.txt", sep=""), sep="\t", quote=F, row.names=T, col.names=NA) + write.table(d.j, file=paste(smpl, "_DJ_circos.txt", sep=""), sep="\t", quote=F, row.names=T, col.names=NA) +} + # ---------------------- calculating the clonality score ---------------------- if("Replicate" %in% colnames(inputdata)) #can only calculate clonality score when replicate information is available { + print("Report Clonality - Clonality") if(clonality_method == "boyd"){ samples = split(clonalityFrame, clonalityFrame$Sample, drop=T) diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/circos/circos.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/report_clonality/circos/circos.conf Mon Jan 18 07:55:31 2016 -0500 @@ -0,0 +1,146 @@ + +# This is the main configuration file for the Circos tableviewer. This file also +# depends on colors.conf (definition on basic colors), ideogram.conf (size and spacing of +# row/cell segments), and ticks.conf (tick spacing and label definitions - these are turned +# off by default). +# +# In addition to these configuration files, the bin/make-conf script creates +# colors.conf (colors of row/col segments) and colors_percentile.conf (colors based on +# cell percentile values). These configuration files are also included via the <> directive. +# +# Some elements of the output image are toggled off by default (e.g. row and column highlights, +# anchor links to segment labels, tick marks). + + +<> +<> +#<> + + + +<> + + +<> +<> + +karyotype = karyotype.txt + + +dir = . +file = circos.png +24bit = yes +svg = no +png = yes +pdf = no +# radius of inscribed circle in image +radius = 1500p +background = white +# by default angle=0 is at 3 o'clock position +angle_offset = -180 +auto_alpha_colors = yes +auto_alpha_steps = 5 + + +chromosomes_units = 10 +chromosomes_display_default = yes +chromosomes_order_by_karyotype = yes + + + +show = yes + + +show = no +file = data/row.txt +r0 = 1r+200p +r1 = 1r+220p +stroke_color = black +stroke_thickness = 2 + + + +show = no +file = data/col.txt +r0 = 1r+230p +r1 = 1r+250p +stroke_color = black +stroke_thickness = 2 + + + +show = no +file = data/all.txt +r0 = 1r+10p +r1 = 1r+35p +stroke_color = black +stroke_thickness = 2 + + + + + + + +type = text +file = data/segmentlabel.txt +label_font = condensedbold +color = black +label_size = 30p +r0 = 1r+50p +r1 = 1r+500p +rpadding = 0p +padding = 0p + +show_links = no +link_dims = 0p,10p,32p,10p,5p +link_thickness = 3p +link_color = black + +label_snuggle = no +# shift label up to its height in pixels in the angular direction +max_snuggle_distance = 2r +snuggle_sampling = 2 +snuggle_tolerance = 0.25r + + + + + + + + +ribbon = yes +flat = yes +file = data/cells.txt +bezier_radius = 0.0r +radius = 0.999r-15p +thickness = 1 +color = grey +stroke_color = black +stroke_thickness = 1 + + + +importance = 95 +condition = 1 +radius1 = 0.999r+2p +flow = continue + + + + + + + + +anglestep = 0.5 +minslicestep = 10 +beziersamples = 40 +debug = no +warnings = no +imagemap = no + +units_ok = bupr +units_nounit = n + diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/circos/etc_colors.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/report_clonality/circos/etc_colors.conf Mon Jan 18 07:55:31 2016 -0500 @@ -0,0 +1,142 @@ +# RGB color definition. Colors are refered to within configuration files +# by their name. In order to use a color, you must define it here. +# +# e.g. if you really must use 'bisque', then add +# +# bisque = 255,228,196 +# +# Many useful colors are already defined. In general, given a HUE, these +# colors are defined +# +# vlHUE (very light HUE, e.g. vlred) +# lHUE (light HUE, e.g. red) +# HUE (e.g. red) +# dHUE (dark HUE, e.g. dred) +# +# In addition to hues, two other color groups are defined. +# +# - cytogenetic band colors (e.g. gposNNN, acen, stalk, etc.) which +# correspond to colors on ideogram bands +# - UCSC chromosome color palette (e.g. chrNN, chrUn, chrNA) + +optblue = 55,133,221 +optgreen = 55,221,125 +optyellow = 221,215,55 +optorange = 221,164,55 +optred = 221,55,55 +optviolet = 145,55,221 +optpurple = 219,55,221 + +white = 255,255,255 +vvvvlgrey = 250,250,250 +vvvlgrey = 240,240,240 +vvlgrey = 230,230,230 +vlgrey = 220,220,220 +lgrey = 210,210,210 +grey = 200,200,200 +dgrey = 170,170,170 +vdgrey = 140,140,140 +vvdgrey = 100,100,100 +vvvdgrey = 70,70,70 +vvvvdgrey = 40,40,40 +black = 0,0,0 + +vlred = 255,193,200 +lred = 255,122,137 +red = 247,42,66 +dred = 205,51,69 + +vlgreen = 204,255,218 +lgreen = 128,255,164 +green = 51,204,94 +dgreen = 38,153,71 + +vlblue = 128,176,255 +lblue = 64,137,255 +blue = 54,116,217 +dblue = 38,82,153 + +vlpurple= 242,128,255 +lpurple = 236,64,255 +purple = 189,51,204 +dpurple = 118,32,128 + +vlyellow = 255,253,202 +lyellow = 255,252,150 +yellow = 255,255,0 +dyellow = 191,186,48 + +lime = 186,255,0 + +vlorange = 255,228,193 +lorange = 255,187,110 +orange = 255,136,0 +dorange = 221,143,55 + +# karyotype colors + +gpos100 = 0,0,0 +gpos = 0,0,0 +gpos75 = 130,130,130 +gpos66 = 160,160,160 +gpos50 = 200,200,200 +gpos33 = 210,210,210 +gpos25 = 200,200,200 +gvar = 220,220,220 +gneg = 255,255,255 +acen = 217,47,39 +stalk = 100,127,164 + +# others + +select = 135,177,255 + +# new york times cmyk-safe + +# roygbiv - normal +nyt_blue = 104,152,178 +nyt_green = 137,129,96 +nyt_yellow = 241,221,117 +nyt_orange = 230,146,57 +nyt_red = 217,47,39 + +# chromosome color map (UCSC) + +chr1 = 153,102,0 +chr2 = 102,102,0 +chr3 = 153,153,30 +chr4 = 204,0,0 +chr5 = 255,0,0 +chr6 = 255,0,204 +chr7 = 255,204,204 +chr8 = 255,153,0 +chr9 = 255,204,0 +chr10 = 255,255,0 +chr11 = 204,255,0 +chr12 = 0,255,0 +chr13 = 53,128,0 +chr14 = 0,0,204 +chr15 = 102,153,255 +chr16 = 153,204,255 +chr17 = 0,255,255 +chr18 = 204,255,255 +chr19 = 153,0,204 +chr20 = 204,51,255 +chr21 = 204,153,255 +chr22 = 102,102,102 +chr23 = 153,153,153 +chrX = 153,153,153 +chr24 = 204,204,204 +chrY = 204,204,204 +chrM = 204,204,153 +chr0 = 204,204,153 +chrUn = 121,204,61 +chrNA = 255,255,255 + + + + + + + + diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/circos/fonts.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/report_clonality/circos/fonts.conf Mon Jan 18 07:55:31 2016 -0500 @@ -0,0 +1,8 @@ + +default = fonts/LTe50046.ttf +normal = fonts/LTe50046.ttf +bold = fonts/LTe50048.ttf +condensed = fonts/LTe50050.ttf +condensedbold = fonts/LTe50054.ttf +mono = fonts/pragmata.ttf +glyph = fonts/wingding.ttf diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/circos/ideogram.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/report_clonality/circos/ideogram.conf Mon Jan 18 07:55:31 2016 -0500 @@ -0,0 +1,37 @@ + + + + + +default = 0.0025r + + + +thickness = 50p +stroke_thickness = 0 +# ideogram border color +stroke_color = black +fill = yes +# the default chromosome color is set here and any value +# defined in the karyotype file overrides it +fill_color = black + +# fractional radius position of chromosome ideogram within image +radius = 0.85r +show_label = no +label_font = condensedbold +label_radius = 0.99r +label_size = 36 + +# cytogenetic bands +band_stroke_thickness = 2 + +# show_bands determines whether the outline of cytogenetic bands +# will be seen +show_bands = no +# in order to fill the bands with the color defined in the karyotype +# file you must set fill_bands +fill_bands = yes + + + diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/circos/parse-table.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/report_clonality/circos/parse-table.conf Mon Jan 18 07:55:31 2016 -0500 @@ -0,0 +1,391 @@ + +################################################################ +# +# This is a fairly complicated configuration file. Take your time in +# experimenting and adjust one thing at a time :) +# +################################################################ + +max_col_num = 200 +max_row_num = 200 + +# skip this many rows before reading in header and data +skip_rows = 0 + +# is there a header line that identifies the columns? +header = yes + +# is there a row that specifies the order of columns in the image? +# - if so, this must be the first line of the header +# - if the line exists (col_order_row=yes), employ the use_col_order_row to toggle whether it is used +col_order_row = no +use_col_order_row = no + +# is there a row that specifies the size of columns in the image? +# - if so, this must be the next line of the header +# - if the line exists (col_size_row=yes), employ the use_col_size_row to toggle whether it is used +col_size_row = no +use_col_size_row = no + +# is there a row that specifies the color of each column segment in the image? +# - if so, this must be the next line of the header +# - if the line exists (col_color_row=yes), employ the use_col_color_row to toggle whether it is used +col_color_row = no +use_col_color_row = no + +# is there a column that specifies the order of rows in the image? +# - if so, this must be the first column +# - if the line exists (row_order_col=yes), employ the use_row_order_col to toggle whether it is used +row_order_col = no +use_row_order_col = no + +# is there a column that specifies the color of each row segment in the image? +# - if so, this must be the second column +# - if the line exists (row_color_col=yes), employ the use_row_color_col to toggle whether it is used +row_color_col = no +use_row_color_col = no + +# if you do not have a column/row that explicitly defines order +# of segments in the image, you can set this here. Use one (or more) of +# these values to specify how segments should be ordered. +# - row_major (row segments first, then column) +# - col_major (col segments first, then row) +# - ascii (asciibetic order) +# - row_size (total of rows for the segment - useful if the segment has both row and column contributions) +# - col_size (total of colums for the segment - useful if the segment has both row and column contributions) +# - row_to_col_ratio (ratio of total of rows to columns for the segment) +# - col_to_row_ratio (ratio of total of rows to columns for the segment) +# - size_asc (size, in ascending order) +# - size_desc (size, in descending order) + +#segment_order = row_to_col_ratio,size_desc # col_major,size_desc +#segment_order = size_desc +segment_order = row_major,size_desc +#segment_order = ascii +#segment_order = file:etc/order-by-table-remapped.txt +#segment_order = size_desc,row_to_col_ratio +segment_color_order = row_major,size_desc + +# values for segments can be normalized if the use_segment_normalization is set to yes +use_segment_normalization = no + +# the normalization function can be one of the following, and is applied to +# all values that correspond to the segment's label +# total - sum of cell values for the segment label (row and col) +# average - average of cell values for the segment label (row and col) +# row_total, row_average - sum or average for cell values for the segment row +# col_total, col_average - sum or average for cell values for the segment col +# row_size, col_size, total_size - based on the optional size column (see col_size_row and row_size_col above) +# VALUE - segments are scaled to a constant VALUE (e.g. 1000) +segment_normalization_function = 1000 + +# normalization can be performed by either altering the actual data values or +# by applying a visual scaling of the segments. When 'value' is used, the data +# is changed. When 'visual' is used, then a chromosomes_scale line is reported +# by this script which you must include in circos.conf for the scaling to be applied +segment_normalization_scheme = value + +################################################################ +# placement of cell ribbons on row/column segments +# +# for segments that share both column and row ribbons, the +# order of ribbon position can be adjusted with placement_order + +placement_order = row,col # col,row or row,col + +# within the row/column ribbon bundle for each segment, +# ribbon_bundle_order determines how the ribbons will be +# ordered +# - size - by value of the cell +# - ascii - sorted by destination label +# - native - sorted by order of destination segment + +ribbon_bundle_order = native # size, ascii, native + +# reverse the position of links in table/row segments? + +reverse_rows = no +reverse_columns = no + +# values for cells with the same row/column name can be treated +# independently. You can +# show - show these cells and not filter them at all +# hide - hide these cells from the image, but not resize the row/columns +# remove - entirely remove these cells from the data set (equivalent to setting cells to missing value) +intra_cell_handling = show + +# ribbon layering - order in which the ribbons are drawn on the image +# size_asc - ascending by ribbon size (small ribbons drawn first, therefore large ribbons will be at front) +# size_desc - descending by ribbon size (large ribbons drawn first, therefore small ribbons will be at front) + +ribbon_layer_order = size_asc + +# if both (A,B)=x and (B,A)=y cells exist, you can choose to have the ribbon +# ends sized variably so that ribbon at A has width x and at B has width y + +ribbon_variable = no +ribbon_variable_intra_collapse = yes + +################################################################ +# cell value mapping allows you to remap the cell values using +# any Perl expression that uses X as the cell value. For example, +# +# cell_remap_formula = log(X) +# = sqrt(X) +# = X/10 +# = X ? log(X) : 0 +# +# This remapping takes place before any filters or scaling is applied. Its effect +# is the same as remapping the cell values in the input file. + +use_cell_remap = no +cell_remap_formula = round(10*X) + +################################################################ +# scale your values with a power rule (useful if the range of values +# is very large) to +# - atten_large: attenuate large values and maintain visibility +# of ribbons corresponding to small values, or +# - atten_small: attenuate small values to increase visibility +# of ribbons corresponding to large values +# +# given a value, v, and a maximum, m +# +# atten_small: +# +# v_new = m * ( exp(scale_factor * v / m) - 1 ) / ( exp(scale_factor) - 1 ) +# +# atten_large: +# +# v_new = m * ( log(scale_factor * v ) ) / ( log(scale_factor * m ) ) +# +# essentially the values are remapped to a log-type scale +# with the range 0..m + +use_scaling = no +scaling_type = atten_large +scale_factor = 1 + +blank_means_missing = no +missing_cell_value = - + +################################################################ +# Value cutoffs for cell values and ribbon formatting. +# +# You can toggle the visibility of ribbons for cells outside +# a min/max range. You can define one or more of these cutoffs. +# The cutoffs are applied to unscaled cell values. + +#cell_min_value = 10 +#cell_min_percentile = 10 +#cell_max_value = 100 +#cell_max_percentile = 100 + +# For cell values that do not pass the min/max filters above, +# you can specify whether they are hidden or removed. If the +# parameter is not defined, "hide" will be assumed. +# hide - cell values won't be shown, but row/col will not be resized +# remove - entirely remove these cells from the data set (equivalent to setting cells to missing value) + +cutoff_cell_handling = hide + +# The color of ribbons is by default the color of the row segment from +# which they originate. The block below allows you to remap the color +# of the ribbons based on cell percentile values. There are two ways +# to remap colors +# +# - color_remap=yes, color_autoremap=no +# Uses blocks to define the percentile values and associated +# color/stroke_color characteristics for ribbons. Percentile value defined +# in the block (e.g. ) is the max percentile value for +# cells associated with this block. +# - color_remap=yes, color_autoremap=yes +# Uses colors associated with each percentile window of size +# percentile_sampling for each cell + + +color_source = row +percentile_source = larger +color_transparency = 1 +color_remap = yes +color_autoremap = no + + +color = dgrey +transparency = 5 + + + +color = dgrey +transparency = 5 + + + +transparency = 1 + + + +transparency = 1 + + + +transparency = 1 +stroke_color = black +stroke_thickness = 1p + + + +transparency = 1 +stroke_color = black +stroke_thickness = 3p + + + + + +color = vdgrey +#stroke_color = black +#stroke_thickness = 1p + + +# If you are using color_autoremap=yes above, then +# define the percentile sampling window and +# the start/end HSV color values. Percentile window +# colors are interpolated between this HSV pair. +# +# HSV = (hue saturation value) +# hue=(0..360) saturation=(0..1) value=(0..1) + +percentile_sampling = 5 + +# count - percentile based on counts +# value - percentile based on value + +percentile_method = count + +# use all values or only unique values when +# calculating percentiles +percentile_unique_only = yes + +# use a function, f(X), to remap cell values when calculating percentiles +# for the purpose of color mapping. This allows you to apply a remapping to how +# colors are calculated, without actually changing the values. The remap +# applies only if percentile_method=value + +# percentile_remap = sqrt(X) + +# Which cell value set to use for percentile color mapping +# raw - original values +# filtered - values that pass min/max filters +# scaled - filtered values that have been scaled if use_scaling is set +percentile_data_domain = raw + + +h0 = 0 +s0 = 1 +v0 = 1 +h1 = 300 +s1 = 1 +v1 = 1 + + +# You can control the color and stroke of ribbons for each +# quartile (q1, q2, q3, q4). Any values defined here will +# overwrite colors determined by remapping. +# +# For example, if you have a lot of cells and wish to attenuate +# the visibility of ribbons associated with small values, you can +# set cell_q1_color=vvlgrey,cell_q1_nostroke=yes to fade the +# ribbons into the background. + +#cell_q1_color = vvlgrey +#cell_q2_color = vlgrey +#cell_q3_color = lgrey +#cell_q4_color = red +#cell_q1_nostroke = yes +#cell_q2_nostroke = yes +#cell_q3_nostroke = yes +#cell_q4_nostroke = yes + +# cell value multiplier, required when all data is small (e.g. <1), in which +# case set the multiplier to something like 1000 because Circos +# works only with integer scales + +data_mult = 1 + +################################################################ +# Segment labels can be optionally set to a size that is +# proportional to the size of the segment. Set min/max size +# values here. If this line is commented out, then the label +# size is determined by the circos.conf file used to draw the image + +#segment_label_size_range = 60,60 + +# progression controls how fast the label size changes from +# min to max (larger value of progression means values close to max +# are achieved for smaller segments) + +segment_label_size_progression = 4 + +segment_label_uppercase = no + +################################################################ +# Segment colors can be specified in the data file (in this +# case use row_color_col and col_color_row), otherwise colors +# are interpolated within an HSV range. Color interpolation can be +# done in two ways: based on segment index (interpolation steps through +# colors uniformly for each segment) and total size (interpolation +# steps through colors in proportion to segment size). + + +interpolate_type = size # size or count +h0 = 0 +s0 = 0.8 +v0 = 0.9 +h1 = 300 +s1 = 0.8 +v1 = 0.9 + + +################################################################ +# Shorten the labels of segments. Specify whether to do this +# with shorten_text=yes|no parameter and provide regular +# expressions in string_replace which define the text to +# replace. + +shorten_text = yes + + +IGH = + + +# exit on any error +strict_sanity = yes + +################################################################ +# if the segment_prefix is set, then rows and columns will be +# renamed to internal fields segment_prefix + DIGIT + +#segment_prefix = id +color_prefix = color + +################################################################ +# Delimiters + +# field delimiter regular expression +# if this is not defined, any whitespace will be considered a delimiter +field_delim = \s + +# collapse adjacent delimiters? +field_delim_collapse = yes + +# remove any leading space in the input file +# by default, this is on - if you set this to "no", make sure that you don't have any leading spaces in your table! +strip_leading_space = yes + +# remove quotes and thousand separators - concatenate characters to remove +# +# e.g. to remove characters a b c set remove_cell_rx=abc +# e.g. to remove characters " ' , set remove_cell_rx="', +remove_cell_rx = "', + diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/circos/ticks.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/report_clonality/circos/ticks.conf Mon Jan 18 07:55:31 2016 -0500 @@ -0,0 +1,65 @@ + +show_ticks = no +show_tick_labels = no +chrticklabels = yes +chrticklabelfont = default + +grid_start = dims(ideogram,radius_inner)-0.5r +grid_end = dims(ideogram,radius_outer)+100 + + +skip_first_label = no +skip_last_label = no +radius = dims(ideogram,radius_outer) +label_offset = 0p +color = black + + +spacing = 5u +spacing_type = relative +rspacing = 0.1 +size = 3p +thickness = 2p +color = dgrey +show_label = yes +label_size = 16p +label_offset = 3p +label_relative = yes +format = %d +grid = yes +grid_color = dgrey +grid_thickness = 1p +suffix = % +rmultiplier = 100 +offset = 40p + + + +spacing = 50u +size = 3p +thickness = 2p +color = black +show_label = yes +label_size = 12p +label_offset = 3p +format = %d +grid = yes +grid_color = dgrey +grid_thickness = 1p + + + +spacing = 10u +size = 2p +thickness = 1p +color = black +show_label = no +label_size = 12p +label_offset = 3p +format = %d +grid = yes +grid_color = dgrey +grid_thickness = 1p + + + diff -r 2d38d7c1d0d0 -r f2010de70741 report_clonality/r_wrapper.sh --- a/report_clonality/r_wrapper.sh Wed Jan 13 05:05:32 2016 -0500 +++ b/report_clonality/r_wrapper.sh Mon Jan 18 07:55:31 2016 -0500 @@ -31,6 +31,7 @@ cp $dir/script.js $outputDir cp $dir/jquery-1.11.0.min.js $outputDir samples=`cat $outputDir/samples.txt` +CIRCOSTOOLS="/home/galaxy/Downloads/circos-master/tools" echo "

Click here for the results

Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)
" > $2 echo "" >> $2 echo "" >> $2 @@ -47,8 +48,18 @@ echo "productive_counting.txt" echo "Report on:" >> $outputFile + +mkdir $outputDir/circos +cp $dir/circos/* $outputDir/circos/ for sample in $samples; do echo " $sample" >> $outputFile + + circos_file="$outputDir/${sample}_VD_circos.txt" + echo -e -n "labels$(cat ${circos_file})" > ${circos_file} + #echo -n "labels" > $outputDir/tmp.txt + #cat ${circos_file} >> $outputDir/tmp.txt + #mv $outputDir/tmp.txt ${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/; /home/galaxy/Downloads/circos-master/bin/circos -param karyotype=$outputDir/circos/karyotype.txt -conf $dir/circos/circos.conf 2>&1 done echo "" >> $outputFile echo "" >> $outputFile @@ -90,7 +101,7 @@ hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)" echo "$hasReplicateColumn" #if its a 'new' merged file with replicate info -if [[ "$hasReplicateColumn" == "Yes" && "$clonalType" != "none" ]] ; then +if [[ "$hasReplicateColumn" == "Yes" ]] ; then echo "
" >> $outputFile for sample in $samples; do echo "${clonality_method}" @@ -137,9 +148,10 @@ echo "
" >> $outputFile fi -hasJunctionData="$(if head -n 1 $inputFile | grep -qE '3V.REGION.trimmed.nt.nb'; then echo 'Yes'; else echo 'No'; fi)" +#hasJunctionData="$(if head -n 1 $inputFile | grep -qE '3V.REGION.trimmed.nt.nb'; then echo 'Yes'; else echo 'No'; fi)" -if [[ "$hasJunctionData" == "Yes" ]] ; then +#if [[ "$hasJunctionData" == "Yes" ]] ; then +if [ -a "$outputDir/junctionAnalysisProd.csv" ] ; then echo "
" >> $outputFile echo "
Sample/ReplicateAllProductiveUnique ProductiveUnproductiveUnique Unproductive
" >> $outputFile while IFS=, read Sample unique VHDEL P1 N1 P2 DELDH DHDEL P3 N2 P4 DELJH TotalDel TotalN TotalP
Productive
SamplecountVH.DELP1N1P2DEL.DHDH.DELP3N2P4DEL.JHTotal.DelTotal.NTotal.P