galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions
galaxy-dist commit 04c59f0a5202: New config option to prevent Galaxy from retrying set_meta internally if it fails externally, and accompanying code to allow users to retry set_meta upon failure.
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1283437371 14400
# Node ID 04c59f0a5202a89731f76b33525a4e753e0cfa42
# Parent a37dacb261540967fb21a2f5fe928464346a897a
New config option to prevent Galaxy from retrying set_meta internally if it fails externally, and accompanying code to allow users to retry set_meta upon failure.
--- a/templates/dataset/edit_attributes.mako
+++ b/templates/dataset/edit_attributes.mako
@@ -92,7 +92,9 @@
</div></form>
%if data.missing_meta():
- <div class="errormessagesmall">${_('Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.')}</div>
+ <div class="form-row">
+ <div class="errormessagesmall">${_('Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.')}</div>
+ </div>
%endif
</div></div>
--- a/templates/mobile/history/detail.mako
+++ b/templates/mobile/history/detail.mako
@@ -55,8 +55,11 @@
<div>Metadata is being Auto-Detected.</div>
%elif data_state == "empty":
<div>No data: <i>${data.display_info()}</i></div>
- %elif data_state == "ok":
+ %elif data_state in [ "ok", "failed_metadata" ]:
<div>
+ %if data_state == "failed_metadata":
+ Warning: setting metadata failed,
+ %endif
${data.blurb},
format: <span class="${data.ext}">${data.ext}</span>,
database: <span class="${data.dbkey}">${data.dbkey}</span>
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -492,9 +492,12 @@ class JobWrapper( object ):
#either use the metadata from originating output dataset, or call set_meta on the copies
#it would be quicker to just copy the metadata from the originating output dataset,
#but somewhat trickier (need to recurse up the copied_from tree), for now we'll call set_meta()
- if not self.external_output_metadata.external_metadata_set_successfully( dataset, self.sa_session ):
- # Only set metadata values if they are missing...
+ if not self.app.config.set_metadata_externally or \
+ ( not self.external_output_metadata.external_metadata_set_successfully( dataset, self.sa_session ) \
+ and self.app.config.retry_metadata_internally ):
dataset.set_meta( overwrite = False )
+ elif not self.external_output_metadata.external_metadata_set_successfully( dataset, self.sa_session ) and not context['stderr']:
+ dataset._state = model.Dataset.states.FAILED_METADATA
else:
#load metadata from file
#we need to no longer allow metadata to be edited while the job is still running,
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -402,7 +402,8 @@ class Dataset( object ):
EMPTY = 'empty',
ERROR = 'error',
DISCARDED = 'discarded',
- SETTING_METADATA = 'setting_metadata' )
+ SETTING_METADATA = 'setting_metadata',
+ FAILED_METADATA = 'failed_metadata' )
permitted_actions = get_permitted_actions( filter='DATASET' )
file_path = "/tmp/"
engine = None
--- a/static/june_2007_style/blue/history.css
+++ b/static/june_2007_style/blue/history.css
@@ -7,6 +7,8 @@ div.historyItem .historyItemTitle{font-w
div.historyItem div.historyItem{margin-right:-11px;}
div.historyItem-ok{border-color:#66AA66;background:#CCFFCC;}
div.historyItem-ok .state-icon{display:none;}
+div.historyItem-failed_metadata{border-color:#66AA66;background:#CCFFCC;}
+div.historyItem-failed_metadata .state-icon{display:none;}
div.historyItem-error{border-color:#AA6666;background:#FFCCCC;}
div.historyItem-error .state-icon{background:url(history-states.png) no-repeat 0px -0px;}
div.historyItem-empty{border-color:#AA6666;background:#FFCCCC;}
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -1708,6 +1708,11 @@ class SetMetadataTool( Tool ):
external_metadata = galaxy.datatypes.metadata.JobExternalOutputMetadataWrapper( job )
if external_metadata.external_metadata_set_successfully( dataset, app.model.context ):
dataset.metadata.from_JSON_dict( external_metadata.get_output_filenames_by_dataset( dataset, app.model.context ).filename_out )
+ else:
+ dataset._state = model.Dataset.states.FAILED_METADATA
+ self.sa_session.add( dataset )
+ self.sa_session.flush()
+ return
# If setting external metadata has failed, how can we inform the user?
# For now, we'll leave the default metadata and set the state back to its original.
dataset.datatype.after_setting_metadata( dataset )
--- a/templates/root/history.mako
+++ b/templates/root/history.mako
@@ -19,7 +19,7 @@
<script type="text/javascript">
-<% TERMINAL_STATES = ["ok", "error", "empty", "deleted", "discarded"] %>
+<% TERMINAL_STATES = ["ok", "error", "empty", "deleted", "discarded", "failed_metadata"] %>
TERMINAL_STATES = ${ h.to_json_string(TERMINAL_STATES) };
$(function() {
--- a/lib/galaxy/web/controllers/root.py
+++ b/lib/galaxy/web/controllers/root.py
@@ -335,6 +335,9 @@ class RootController( BaseController, Us
if params.annotation:
annotation = sanitize_html( params.annotation, 'utf-8', 'text/html' )
self.add_item_annotation( trans, data, annotation )
+ # If setting metadata previously failed and all required elements have now been set, clear the failed state.
+ if data._state == trans.model.Dataset.states.FAILED_METADATA and not data.missing_meta():
+ data._state = None
trans.sa_session.flush()
return trans.show_ok_message( "Attributes updated%s" % message, refresh_frames=['history'] )
else:
--- a/static/june_2007_style/history.css.tmpl
+++ b/static/june_2007_style/history.css.tmpl
@@ -46,13 +46,15 @@ div.historyItem div.historyItem {
}
## Change background/border color depending on state
-div.historyItem-ok {
+div.historyItem-ok,
+div.historyItem-failed_metadata {
border-color: $history_ok_border;
background: $history_ok_bg;
.state-icon {
display: none;
}
}
+
div.historyItem-error {
border-color: $history_error_border;
background: $history_error_bg;
--- a/templates/root/history_common.mako
+++ b/templates/root/history_common.mako
@@ -100,7 +100,12 @@
<div>${_('Metadata is being Auto-Detected.')}</div>
%elif data_state == "empty":
<div>${_('No data: ')}<i>${data.display_info()}</i></div>
- %elif data_state == "ok":
+ %elif data_state in [ "ok", "failed_metadata" ]:
+ %if data_state == "failed_metadata":
+ <div class="warningmessagesmall" style="margin: 4px 0 4px 0">
+ An error occurred setting the metadata for this dataset. You may be able to <a href="${h.url_for( controller='root', action='edit', id=data.id )}" target="galaxy_main">set it manually or retry auto-detection</a>.
+ </div>
+ %endif
<div>
${data.blurb},
format: <span class="${data.ext}">${data.ext}</span>,
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -53,6 +53,7 @@ class Configuration( object ):
self.tool_secret = kwargs.get( "tool_secret", "" )
self.id_secret = kwargs.get( "id_secret", "USING THE DEFAULT IS NOT SECURE!" )
self.set_metadata_externally = string_as_bool( kwargs.get( "set_metadata_externally", "False" ) )
+ self.retry_metadata_internally = string_as_bool( kwargs.get( "retry_metadata_internally", "True" ) )
self.use_remote_user = string_as_bool( kwargs.get( "use_remote_user", "False" ) )
self.remote_user_maildomain = kwargs.get( "remote_user_maildomain", None )
self.remote_user_logout_href = kwargs.get( "remote_user_logout_href", None )
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -346,6 +346,13 @@ use_interactive = True
# unresponsive when this operation occurs internally.
#set_metadata_externally = False
+# Although it is fairly reliable, setting metadata can occasionally fail. In
+# these instances, you can choose to retry setting it internally or leave it in
+# a failed state (since retrying internally may cause the Galaxy process to be
+# unresponsive). If this option is set to False, the user will be given the
+# option to retry externally, or set metadata manually (when possible).
+#retry_metadata_internally = True
+
# Number of concurrent jobs to run (local job runner)
#local_job_queue_workers = 5
1
0
galaxy-dist commit 833cfa90b337: Add setup of tool-data/shared/jars to the buildbot setup script.
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1283441846 14400
# Node ID 833cfa90b33735f4f30f10d0d7e39cbf1a64d6d9
# Parent fa1d4be027649ad4d745c62a053e024fe2db35e9
Add setup of tool-data/shared/jars to the buildbot setup script.
--- a/buildbot_setup.sh
+++ b/buildbot_setup.sh
@@ -20,6 +20,8 @@ case "$OSTYPE" in
[ ! -d "$HYPHY" ] && unset HYPHY
;;
solaris2.10)
+ # For the psu-production builder which is Solaris, but jobs run on a
+ # Linux cluster
HYPHY="/galaxy/software/linux2.6-x86_64/hyphy"
;;
esac
@@ -73,6 +75,8 @@ database/import
database/pbs
"
+JARS="/galaxy/software/jars"
+
for link in $LINKS; do
echo "Linking $link"
rm -f tool-data/`basename $link`
@@ -85,6 +89,12 @@ if [ -d "$HYPHY" ]; then
ln -sf $HYPHY tool-data/HYPHY
fi
+if [ -d "$JARS" ]; then
+ echo "Linking $JARS"
+ rm -f tool-data/shared/jars
+ ln -sf $JARS tool-data/shared/jars
+fi
+
for sample in $SAMPLES; do
file=`echo $sample | sed -e 's/\.sample$//'`
echo "Copying $sample to $file"
1
0
galaxy-dist commit a37dacb26154: Fix for tools/filters/wig_to_bigwig.xml when coordinates extend beyond chromosome boundaries and -clip was specified.
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1283383585 14400
# Node ID a37dacb261540967fb21a2f5fe928464346a897a
# Parent 77753eec8e43449075a8f5599860e6c5a3d7c9b3
Fix for tools/filters/wig_to_bigwig.xml when coordinates extend beyond chromosome boundaries and -clip was specified.
--- a/tools/filters/wig_to_bigwig.xml
+++ b/tools/filters/wig_to_bigwig.xml
@@ -1,6 +1,6 @@
<tool id="wig_to_bigWig" name="Wig to bigWig" version="1.0.0"><description>converter</description>
- <command>grep -v "^track" $input1 | wigToBigWig stdin $chromInfo $out_file1 -blockSize=$blockSize -itemsPerSlot=$itemsPerSlot $clip $unc</command>
+ <command>grep -v "^track" $input1 | wigToBigWig stdin $chromInfo $out_file1 -blockSize=$blockSize -itemsPerSlot=$itemsPerSlot $clip $unc 2>&1 || echo "Error running wigToBigWig." >&2</command><requirements><requirement type="binary">wigToBigWig</requirement></requirements>
1
0
galaxy-dist commit fa1d4be02764: Add 'NullToolOutputActionOption' to tool output dataset actions. This action option is used implicitly when no ToolOutputActionOption's have been defined. This will allow e.g. setting a metadata value to a static value on a per ToolOutput basis.
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1283439625 14400
# Node ID fa1d4be027649ad4d745c62a053e024fe2db35e9
# Parent 04c59f0a5202a89731f76b33525a4e753e0cfa42
Add 'NullToolOutputActionOption' to tool output dataset actions. This action option is used implicitly when no ToolOutputActionOption's have been defined. This will allow e.g. setting a metadata value to a static value on a per ToolOutput basis.
Example which sets the strand assignment of an interval dataset to column 10:
<outputs>
<data format="interval" name="output1">
<actions>
<action type="metadata" name="strandCol" default="10"/>
</actions>
</data>
</outputs>
--- a/lib/galaxy/tools/parameters/output.py
+++ b/lib/galaxy/tools/parameters/output.py
@@ -104,7 +104,6 @@ class ToolOutputAction( object ):
self.parent = parent
self.default = elem.get( 'default', None )
option_elem = elem.find( 'option' )
- assert option_elem is not None, "Required 'option' element missing from ToolOutputAction"
self.option = ToolOutputActionOption.from_elem( self, option_elem )
def apply_action( self, output_dataset, other_values ):
raise TypeError( "Not implemented" )
@@ -117,20 +116,29 @@ class ToolOutputActionOption( object ):
@classmethod
def from_elem( cls, parent, elem ):
"""Loads the proper action by the type attribute of elem"""
- option_type = elem.get( 'type', None )
+ if elem is None:
+ option_type = NullToolOutputActionOption.tag # no ToolOutputActionOption's have been defined, use implicit NullToolOutputActionOption
+ else:
+ option_type = elem.get( 'type', None )
assert option_type is not None, "Required 'type' attribute missing from ToolOutputActionOption"
return option_types[ option_type ]( parent, elem )
def __init__( self, parent, elem ):
self.parent = parent
self.filters = []
- for filter_elem in elem.findall( 'filter' ):
- self.filters.append( ToolOutputActionOptionFilter.from_elem( self, filter_elem ) )
+ if elem is not None:
+ for filter_elem in elem.findall( 'filter' ):
+ self.filters.append( ToolOutputActionOptionFilter.from_elem( self, filter_elem ) )
def get_value( self, other_values ):
raise TypeError( "Not implemented" )
@property
def tool( self ):
return self.parent.tool
+class NullToolOutputActionOption( ToolOutputActionOption ):
+ tag = "null_option"
+ def get_value( self, other_values ):
+ return None
+
class FromFileToolOutputActionOption( ToolOutputActionOption ):
tag = "from_file"
def __init__( self, parent, elem ):
@@ -454,7 +462,7 @@ for action_type in [ MetadataToolOutputA
action_types[ action_type.tag ] = action_type
option_types = {}
-for option_type in [ FromFileToolOutputActionOption, FromParamToolOutputActionOption, FromDataTableOutputActionOption ]:
+for option_type in [ NullToolOutputActionOption, FromFileToolOutputActionOption, FromParamToolOutputActionOption, FromDataTableOutputActionOption ]:
option_types[ option_type.tag ] = option_type
filter_types = {}
1
0
galaxy-dist commit 695a12fec1e2: Add a wig to bigWig converter tool.
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1283375708 14400
# Node ID 695a12fec1e2195cf8ccdf80d6d5318a464c37e3
# Parent f205636ed466f490a081681e76b23196dbc80e7c
Add a wig to bigWig converter tool.
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -88,6 +88,7 @@
<tool file="filters/wiggle_to_simple.xml" /><tool file="filters/sff_extractor.xml" /><tool file="filters/gtf2bedgraph.xml" />
+ <tool file="filters/wig_to_bigwig.xml" /></section><section name="Extract Features" id="features"><tool file="filters/ucsc_gene_bed_to_exon_bed.xml" />
--- /dev/null
+++ b/tools/filters/wig_to_bigwig.xml
@@ -0,0 +1,54 @@
+<tool id="wig_to_bigWig" name="Wig to bigWig" version="1.0.0">
+ <description>converter</description>
+ <command>grep -v "^track" $input1 | wigToBigWig stdin $chromInfo $out_file1 -blockSize=$blockSize -itemsPerSlot=$itemsPerSlot $clip $unc</command>
+ <requirements>
+ <requirement type="binary">wigToBigWig</requirement>
+ </requirements>
+ <inputs>
+ <param format="wig" name="input1" type="data" label="Convert">
+ <validator type="unspecified_build" />
+ </param>
+ <param name="blockSize" size="4" type="integer" value="256" label="Items to bundle in r-tree" help="Default is 256 (blockSize)" />
+ <param name="itemsPerSlot" size="4" type="integer" value="1024" label="Data points bundled at lowest level" help="Default is 1024 (itemsPerSlot)" />
+ <param name="clip" type="boolean" truevalue="-clip" falsevalue="" checked="False" label="Clip chromosome positions" help="Issue warning messages rather than dying if wig file contains items off end of chromosome. (clip)"/>
+ <param name="unc" type="boolean" truevalue="-unc" falsevalue="" checked="False" label="Do not use compression" help="(unc)"/>
+ </inputs>
+ <outputs>
+ <data format="bigwig" name="out_file1" />
+ </outputs>
+ <tests>
+ <test>
+ <param name="input1" value="2.wig" dbkey="hg17" />
+ <param name="blockSize" value="256" />
+ <param name="itemsPerSlot" value="1024" />
+ <param name="clip" value="False" />
+ <param name="unc" value="False" />
+ <output name="out_file1" file="2.bigwig"/>
+ </test>
+ </tests>
+ <help>
+**Syntax**
+
+This tool converts wiggle data into bigWig type.
+
+- **Wiggle format**: The .wig format is line-oriented. Wiggle data is preceded by a UCSC track definition line. Following the track definition line is the track data, which can be entered in three different formats described below.
+
+ - **BED format** with no declaration line and four columns of data::
+
+ chromA chromStartA chromEndA dataValueA
+ chromB chromStartB chromEndB dataValueB
+
+ - **variableStep** two column data; started by a declaration line and followed with chromosome positions and data values::
+
+ variableStep chrom=chrN [span=windowSize]
+ chromStartA dataValueA
+ chromStartB dataValueB
+
+ - **fixedStep** single column data; started by a declaration line and followed with data values::
+
+ fixedStep chrom=chrN start=position step=stepInterval [span=windowSize]
+ dataValue1
+ dataValue2
+
+</help>
+</tool>
Binary file test-data/2.bigwig has changed
1
0
galaxy-dist commit 77753eec8e43: trackster: Changing display mode from "Auto" now fetches additional detail data and displays features. Displays error messages in canvas elements if present. Limit number of features displayed in one tile due to above feature. Fix bugs in visualization creation from form
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1283379642 14400
# Node ID 77753eec8e43449075a8f5599860e6c5a3d7c9b3
# Parent 4a621d4e127a76467d996fdf25b3a7e1ead4ddb9
trackster: Changing display mode from "Auto" now fetches additional detail data and displays features. Displays error messages in canvas elements if present. Limit number of features displayed in one tile due to above feature. Fix bugs in visualization creation from form
--- a/lib/galaxy/visualization/tracks/data/interval_index.py
+++ b/lib/galaxy/visualization/tracks/data/interval_index.py
@@ -9,6 +9,8 @@ import pkg_resources; pkg_resources.requ
from bx.interval_index_file import Indexes
from galaxy.datatypes.interval import Bed, Gff
+MAX_VALS = 500 # only display first MAX_VALS features
+
class IntervalIndexDataProvider( object ):
def __init__( self, converted_dataset, original_dataset ):
self.original_dataset = original_dataset
@@ -20,8 +22,14 @@ class IntervalIndexDataProvider( object
source = open( self.original_dataset.file_name )
index = Indexes( self.converted_dataset.file_name )
results = []
+ count = 0
+ message = None
for start, end, offset in index.find(chrom, start, end):
+ if count >= MAX_VALS:
+ message = "Only the first %s features are being displayed." % MAX_VALS
+ break
+ count += 1
source.seek(offset)
feature = source.readline().split()
payload = [ offset, start, end ]
@@ -53,4 +61,4 @@ class IntervalIndexDataProvider( object
results.append(payload)
- return results
+ return { 'data': results, 'message': message }
--- a/static/scripts/packed/trackster.js
+++ b/static/scripts/packed/trackster.js
@@ -1,1 +1,1 @@
-var DENSITY=200,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset. ",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),PX_PER_CHAR=CONTEXT.measureText("A").width,RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src=image_path+"/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src=image_path+"/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src=image_path+"/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONT
EXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src=image_path+"/visualization/strand_left_inv.png";left_img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};function round_1000(a){return Math.round(a*1000)/1000}var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(a,c,e,d,b){this.container=a;this.vis_id=d;this.dbkey=b;this.title=e;this.chrom=c;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_id_counter=0;this.zoom_factor=3;this.min_separation=30;this
.has_changes=false;this.init();this.reset()};$.extend(View.prototype,{init:function(){var c=this.container,a=this;this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(c);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(c);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide().appendTo(c);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.nav_container=$("<div/>").addClass("nav-container").appendTo(c);this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.nav_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.nav);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_o
verview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_form=$("<form/>").attr("action",function(){void (0)}).appendTo(this.nav_controls);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.chrom_form);var b=function(d){if(d.type==="focusout"||(d.keyCode||d.which)===13||(d.keyCode||d.which)===27){if((d.keyCode||d.which)!==27){a.go_to($(this).val())}$(this).hide();a.location_span.show();a.chrom_select.show();return false}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keypress focusout",b).appendTo(this.chrom_form);this.location_span=$("<span/>").addClass("location").appendTo(this.chrom_form);this.location_span.bind("click",function(){a.location_span.hide();a.chrom_select.hide();a.nav_input.css("display","inline-block");a.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_i
nput=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.chrom_form)}this.zo_link=$("<a/>").click(function(){a.zoom_out();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom-out.png" />').appendTo(this.chrom_form);this.zi_link=$("<a/>").click(function(){a.zoom_in();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom.png" />').appendTo(this.chrom_form);$.ajax({url:chrom_url,data:(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}),dataType:"json",success:function(d){if(d.reference){a.add_label_track(new ReferenceTrack(a))}a.chrom_data=d.chrom_info;var f='<option value="">Select Chrom/Contig</option>';for(i in a.chrom_data){var e=a.chrom_data[i]["chrom"];f+='<option value="'+e+'">'+e+"</option>"}a.chrom_select.html(f);a.intro_div.show();a.content_div.hide();a.chrom_select.bind("change",function(){a.change_chrom(a.chrom_select.val())})},error:function(){alert("Could not load chroms for this dbkey:",a.dbkey)}});this.content_d
iv.bind("dblclick",function(d){a.zoom_in(d.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(d){this.current_x=d.offsetX}).bind("drag",function(d){var g=d.offsetX-this.current_x;this.current_x=d.offsetX;var f=Math.round(g/a.viewport_container.width()*(a.max_high-a.max_low));a.move_delta(-f)});this.viewport_container.bind("dragstart",function(d){this.original_low=a.low;this.current_height=d.clientY;this.current_x=d.offsetX;this.active=(d.clientX<a.viewport_container.width()-16)?true:false}).bind("drag",function(g){if(!this.active){return}var d=$(this);var j=g.offsetX-this.current_x;var f=d.scrollTop()-(g.clientY-this.current_height);d.scrollTop(f);this.current_height=g.clientY;this.current_x=g.offsetX;var h=Math.round(j/a.viewport_container.width()*(a.high-a.low));a.move_delta(h)});this.top_labeltrack.bind("dragstart",function(d){this.drag_origin_x=d.clientX;this.drag_origin_pos=d.clientX/a.viewport_container.width()*(a.high-a.low)+a.low;this.drag_d
iv=$("<div />").css({height:a.content_div.height()+30,top:"0px",position:"absolute","background-color":"#cfc",border:"1px solid #6a6",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(j){var f=Math.min(j.clientX,this.drag_origin_x)-a.container.offset().left,d=Math.max(j.clientX,this.drag_origin_x)-a.container.offset().left,h=(a.high-a.low),g=a.viewport_container.width();a.update_location(Math.round(f/g*h)+a.low,Math.round(d/g*h)+a.low);this.drag_div.css({left:f+"px",width:(d-f)+"px"})}).bind("dragend",function(k){var f=Math.min(k.clientX,this.drag_origin_x),d=Math.max(k.clientX,this.drag_origin_x),h=(a.high-a.low),g=a.viewport_container.width(),j=a.low;a.low=Math.round(f/g*h)+j;a.high=Math.round(d/g*h)+j;this.drag_div.remove();a.redraw()});this.add_label_track(new LabelTrack(this,this.top_labeltrack));this.add_label_track(new LabelTrack(this,this.nav_labeltrack))},update_location:function(a,b){this.location_span.text(commatize(a)+" - "+commatize(b));this.
nav_input.val(this.chrom+":"+commatize(a)+"-"+commatize(b))},change_chrom:function(d,a,f){var c=this;var e=$.grep(c.chrom_data,function(h,j){return h.chrom===d})[0];if(e===undefined){return}if(d!==c.chrom){c.chrom=d;if(c.chrom===""){c.intro_div.show();c.content_div.hide()}else{c.intro_div.hide();c.content_div.show()}c.chrom_select.val(c.chrom);c.max_high=e.len;c.reset();c.redraw(true);for(var g in c.tracks){var b=c.tracks[g];if(b.init){b.init()}}}if(a!==undefined&&f!==undefined){c.low=Math.max(a,0);c.high=Math.min(f,c.max_high)}c.overview_viewport.find("canvas").remove();c.redraw()},go_to:function(f){var k=this,b=f.split(":"),h=b[0],j=b[1];if(j!==undefined){try{var g=j.split("-"),a=parseInt(g[0].replace(/,/g,"")),d=parseInt(g[1].replace(/,/g,""))}catch(c){return false}}k.change_chrom(h,a,d)},move_delta:function(c){var a=this;var b=a.high-a.low;if(a.low-c<a.max_low){a.low=a.max_low;a.high=a.max_low+b}else{if(a.high-c>a.max_high){a.high=a.max_high;a.low=a.max_high-b}else{a.hig
h-=c;a.low-=c}}a.redraw()},add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tracks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"+a.track_id);this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){this.has_changes=true;a.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(a)];this.num_tracks-=1},update_options:function(){this.has_changes=true;var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];this.viewport_container.append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(f){var d=this.high-this.low,b=this.low,e=this.high;if(b<this.max_low){b=this.max_low}if(e>this.
max_high){e=this.max_high}if(this.high!==0&&d<this.min_separation){e=b+this.min_separation}this.low=Math.floor(b);this.high=Math.ceil(e);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));this.overview_box.css({left:(this.low/(this.max_high-this.max_low))*this.overview_viewport.width(),width:Math.max(12,(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())}).show();this.update_location(this.low,this.high);if(!f){for(var c=0,a=this.tracks.length;c<a;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,a=this.label_tracks.length;c<a;c++){this.label_tracks[c].draw()}}},zoom_in:function(b,c){if(this.max_high===0||this.high-this.low<this.min_separation){return}var d=this.high-this.low,e=d/2+this.low,a=(d/this.zoom_factor)/2;if(b){e=b/this.viewport_container.width(
)*(this.high-this.low)+this.low}this.low=Math.round(e-a);this.high=Math.round(e+a);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var b=this.high-this.low,c=b/2+this.low,a=(b*this.zoom_factor)/2;this.low=Math.round(c-a);this.high=Math.round(c+a);this.redraw()}});var Track=function(b,a,c){this.name=b;this.parent_element=c;this.view=a;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.header_div=$("<div class='track-header'>").text(this.name);this.content_div=$("<div class='track-content'>");this.container_div=$("<div />").addClass("track").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)},init_each:function(c,b){var a=this;a.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();a.initial_canvas=undefined;a.content_div.css("height","auto");if(!a.content_div.text()){a.content_div.text(DATA_LOADING)}a.container_div.removeClass("nodata error pending");if(a.view.chrom){$.getJSO
N(data_url,c,function(d){if(!d||d==="error"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0);'></a>").attr("id",f+"_error");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})});a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d==="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.enabled=true;b(d);a.draw()}}}}})}else{a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}}});var TiledTrack=function(){var c=t
his,b=c.view;if(c.display_modes!==undefined){if(c.mode_div===undefined){c.mode_div=$("<div class='right-float menubutton popup' />").appendTo(c.header_div);var g=c.display_modes[0];c.mode=g;c.mode_div.text(g);var a=function(h){c.mode_div.text(h);c.mode=h;c.tile_cache.clear();c.draw()};var e={};for(var d in c.display_modes){var f=c.display_modes[d];e[f]=function(h){return function(){a(h)}}(f)}make_popupmenu(c.mode_div,e)}else{c.mode_div.hide()}}if(c.overview_check_div===undefined){c.overview_check_div=$("<div class='right-float' />").css("margin-top","-3px").appendTo(c.header_div);c.overview_check=$("<input type='checkbox' class='overview_check' />").appendTo(c.overview_check_div);c.overview_check.bind("click",function(){var h=this;b.overview_viewport.find("canvas").remove();c.set_overview();$(".overview_check").each(function(){if(this!==h){$(this).attr("checked",false)}})});c.overview_check_div.append($("<label />").text("Overview"))}};$.extend(TiledTrack.prototype,Track.pro
totype,{draw:function(){var j=this.view.low,e=this.view.high,f=e-j,d=this.view.resolution;var l=$("<div style='position: relative;'></div>"),m=this.content_div.width()/f,h;this.content_div.children(":first").remove();this.content_div.append(l),this.max_height=0;var a=Math.floor(j/d/DENSITY);while((a*DENSITY*d)<e){var k=this.content_div.width()+"_"+m+"_"+a;var c=this.tile_cache.get(k);if(c){var g=a*DENSITY*d;var b=(g-j)*m;if(this.left_offset){b-=this.left_offset}c.css({left:b});l.append(c);this.max_height=Math.max(this.max_height,c.height());this.content_div.css("height",this.max_height+"px")}else{this.delayed_draw(this,k,j,e,a,d,l,m)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_element){if(!c.initial_canvas){c.initial_canvas=$(tile_element).clone();var l=tile_element.get(0).getContext("2d");var j=c.initial_canvas.get(0).getContext("2d");var k=l.getImageData(0,0,l.canvas.width,
l.canvas.height);j.putImageData(k,0,0);c.set_overview()}c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height+"px")}}},50)},set_overview:function(){var a=this.view;a.overview_viewport.height(a.default_overview_height);a.overview_box.height(a.default_overview_height);if(this.initial_canvas&&this.overview_check.is(":checked")){a.overview_viewport.append(this.initial_canvas);a.overview_viewport.height(this.initial_canvas.height());a.overview_box.height(this.initial_canvas.height())}$(window).trigger("resize")}});var LabelTrack=function(a,b){Track.call(this,null,a,b);this.track_type="LabelTrack";this.hidden=true;this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height
: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var ReferenceTrack=function(a){this.track_type="ReferenceTrack";Track.call(this,null,a,a.top_labeltrack);TiledTrack.call(this);this.hidden=true;this.height_px=12;this.container_div.addClass("reference-track");this.dummy_canvas=$("<canvas></canvas>").get(0).getContext("2d");this.data_queue={};this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE)};$.extend(ReferenceTrack.prototype,TiledTrack.prototype,{get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:reference_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dbkey:this.view.dbkey},success:function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()},error:function(h,g,j){consol
e.log(h,g,j)}})}},draw_tile:function(f,b,k,o){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),n=e.get(0).getContext("2d"),j=f+"_"+b;if(o>PX_PER_CHAR){if(this.data_cache.get(j)===undefined){this.get_data(f,b);return}var m=this.data_cache.get(j);if(m===null){this.content_div.css("height","0px");return}e.get(0).width=Math.ceil(d*o+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*o-this.left_offset});for(var h=0,l=m.length;h<l;h++){var a=Math.round(h*o);n.fillText(m[h],a+this.left_offset,10)}k.append(e);return e}this.content_div.css("height","0px")}});var LineTrack=function(d,b,a,c){this.track_type="LineTrack";this.display_modes=["Line","Filled","Intensity"];this.mode="Line";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=80;this.dataset_id=a;this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE);this.prefs={min_value:undefined,max_value:undefin
ed,mode:"Line"};if(c.min_value!==undefined){this.prefs.min_value=c.min_value}if(c.max_value!==undefined){this.prefs.max_value=c.max_value}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.max;$("#track_"+b+"_minval").val(a.prefs.min_value);$("#track_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;a.total_frequency=data.total_frequency;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").remove();var e=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(round_1000(a.prefs.min_value));var d=$("<div />").addClass("yaxislabel").attr("id","
linetrack_"+b+"_maxval").text(round_1000(a.prefs.max_value));d.css({position:"relative",top:"32px",left:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+32+"px",left:"10px"});e.prependTo(a.container_div)})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:function(p,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get
(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_value,g=this.prefs.max_value,n=this.vertical_range,t=this.total_frequency,d=this.height_px,m=this.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;h=data[q][1];if(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}else{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRect(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(k){var a=$("<div />").addClass("form-row");var e="track_"+k+"_minval",h=$("<label></label>").attr("for",e).text("Min value:"),b=(this
.prefs.min_value===undefined?"":this.prefs.min_value),j=$("<input></input>").attr("id",e).val(b),g="track_"+k+"_maxval",d=$("<label></label>").attr("for",g).text("Max value:"),f=(this.prefs.max_value===undefined?"":this.prefs.max_value),c=$("<input></input>").attr("id",g).val(f);return a.append(h).append(j).append(d).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(b);this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+c+"_minval").text(this.prefs.min_value);$("#linetrack_"+c+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(d,b,a,c){this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=0;this.container_div.addCl
ass("feature-track");this.dataset_id=a;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=2;this.summary_draw_height=20;this.default_font="9px Monaco, Lucida Console, monospace";this.inc_slots={};this.data_queue={};this.s_e_by_tile={};this.tile_cache=new Cache(CACHED_TILES_FEATURE);this.data_cache=new Cache(20);this.left_offset=200;this.prefs={block_color:"black",label_color:"black",show_counts:true};if(c.block_color!==undefined){this.prefs.block_color=c.block_color}if(c.label_color!==undefined){this.prefs.label_color=c.label_color}if(c.show_counts!==undefined){this.prefs.show_counts=c.show_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b="initial";this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution},function(c){a.mode_div.show();a.data_cache.set(b,c);a.draw()})},get_data:function(
a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,resolution:this.view.resolution,mode:this.mode},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incremental_slots:function(a,h,c,r){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.inc_slots[a].mode=r;this.s_e_by_tile[a]={}}var n=this.inc_slots[a].w_scale,z=[],l=0,b=$("<canvas></canvas>").get(0).getContext("2d"),o=this.view.max_low;var B=[];if(this.inc_slots[a].mode!==r){delete this.inc_slots[a];this.inc_slots[a]={mode:r,w_scale:n};delete this.s_e_by_tile[a];this.s_e_by_tile[a]={}}for(var w=0,x=h.length;w<x;w++){var g=h[w],m=g[0];if(this.inc_slots[a][m]!==undefined){l=Math.max(l,this.inc_slots[a][m]);B.push(this.inc_slots[a][m])}else{z.push(w)}}for(var w=0,x=z.length;w<x;w++){var g=h[z[w]],m=g[0],s=g[1],d=g[2],q=g[3],e=Math.floor((s-o)*n),f=Math.ceil((d-o)*n);if(q!==undefined&&!c){v
ar t=b.measureText(q).width;if(e-t<0){f+=t}else{e-=t}}var v=0;while(true){var p=true;if(this.s_e_by_tile[a][v]!==undefined){for(var u=0,A=this.s_e_by_tile[a][v].length;u<A;u++){var y=this.s_e_by_tile[a][v][u];if(f>y[0]&&e<y[1]){p=false;break}}}if(p){if(this.s_e_by_tile[a][v]===undefined){this.s_e_by_tile[a][v]=[]}this.s_e_by_tile[a][v].push([e,f]);this.inc_slots[a][m]=v;l=Math.max(l,v);break}v++}}return l},rect_or_text:function(n,o,f,m,b,d,k,e,h){n.textAlign="center";var j=Math.round(o/2);if((this.mode==="Pack"||this.mode==="Auto")&&d!==undefined&&o>PX_PER_CHAR){n.fillStyle=this.prefs.block_color;n.fillRect(k,h+1,e,9);n.fillStyle="#eee";for(var g=0,l=d.length;g<l;g++){if(b+g>=f&&b+g<=m){var a=Math.floor(Math.max(0,(b+g-f)*o));n.fillText(d[g],a+this.left_offset+j,h+9)}}}else{n.fillStyle=this.prefs.block_color;n.fillRect(k,h+4,e,3)}},draw_tile:function(Y,l,o,al){var F=l*DENSITY*Y,ae=(l+1)*DENSITY*Y,E=ae-F;var af=(!this.initial_canvas?"initial":F+"_"+ae);var A=this.data_cache.g
et(af);var d;if(A===undefined){this.data_queue[[F,ae]]=true;this.get_data(F,ae);return}var a=Math.ceil(E*al),M=$("<canvas class='tile'></canvas>"),aa=this.prefs.label_color,g=this.prefs.block_color,n=this.mode,W=(n==="Squish")||(n==="Dense")&&(n!=="Pack")||(n==="Auto"&&(A.extra_info==="no_detail")),Q=this.left_offset,ak,t,am;if(A.dataset_type==="summary_tree"){t=this.summary_draw_height}else{if(n==="Dense"){t=15;am=10}else{am=(W?this.vertical_nodetail_px:this.vertical_detail_px);t=this.incremental_slots(this.view.zoom_res,A.data,W,n)*am+15;ak=this.inc_slots[this.view.zoom_res]}}M.css({position:"absolute",top:0,left:(F-this.view.low)*al-Q});M.get(0).width=a+Q;M.get(0).height=t;o.parent().css("height",Math.max(this.height_px,t)+"px");var B=M.get(0).getContext("2d");B.fillStyle=g;B.font=this.default_font;B.textAlign="right";if(A.dataset_type=="summary_tree"){var L,I=55,ad=255-I,h=ad*2/3,S=A.data,D=A.max,m=A.avg,b=Math.ceil(A.delta*al);for(var ah=0,z=S.length;ah<z;ah++){var U=Ma
th.floor((S[ah][0]-F)*al);var T=S[ah][1];if(!T){continue}L=Math.floor(ad-(T/D)*ad);B.fillStyle="rgb("+L+","+L+","+L+")";B.fillRect(U+Q,0,b,this.summary_draw_height);if(this.prefs.show_counts&&B.measureText(T).width<b){if(L>h){B.fillStyle="black"}else{B.fillStyle="#ddd"}B.textAlign="center";B.fillText(T,U+Q+(b/2),12)}}d="Summary";o.append(M);return M}var aj=A.data;var ag=0;for(var ah=0,z=aj.length;ah<z;ah++){var N=aj[ah],K=N[0],ai=N[1],V=N[2],G=N[3];if(ai<=ae&&V>=F){var X=Math.floor(Math.max(0,(ai-F)*al)),C=Math.ceil(Math.min(a,Math.max(0,(V-F)*al))),R=(n==="Dense"?0:ak[K]*am);if(A.dataset_type==="bai"){B.fillStyle=g;if(N[4] instanceof Array){var u=Math.floor(Math.max(0,(N[4][0]-F)*al)),J=Math.ceil(Math.min(a,Math.max(0,(N[4][1]-F)*al))),s=Math.floor(Math.max(0,(N[5][0]-F)*al)),q=Math.ceil(Math.min(a,Math.max(0,(N[5][1]-F)*al)));if(N[4][1]>=F&&N[4][0]<=ae){this.rect_or_text(B,al,F,ae,N[4][0],N[4][2],u+Q,J-u,R)}if(N[5][1]>=F&&N[5][0]<=ae){this.rect_or_text(B,al,F,ae,N[5][0],N[
5][2],s+Q,q-s,R)}if(s>J){B.fillStyle="#999";B.fillRect(J+Q,R+5,s-J,1)}}else{B.fillStyle=g;this.rect_or_text(B,al,F,ae,ai,G,X+Q,C-X,R)}if(n!=="Dense"&&!W&&ai>F){B.fillStyle=this.prefs.label_color;if(l===0&&X-B.measureText(G).width<0){B.textAlign="left";B.fillText(K,C+2+Q,R+8)}else{B.textAlign="right";B.fillText(K,X-2+Q,R+8)}B.fillStyle=g}}else{if(A.dataset_type==="interval_index"){if(W){B.fillRect(X+Q,R+5,C-X,1)}else{var w=N[4],P=N[5],Z=N[6],f=N[7];var v,ab,H=null,an=null;if(P&&Z){H=Math.floor(Math.max(0,(P-F)*al));an=Math.ceil(Math.min(a,Math.max(0,(Z-F)*al)))}if(n!=="Dense"&&G!==undefined&&ai>F){B.fillStyle=aa;if(l===0&&X-B.measureText(G).width<0){B.textAlign="left";B.fillText(G,C+2+Q,R+8)}else{B.textAlign="right";B.fillText(G,X-2+Q,R+8)}B.fillStyle=g}if(f){if(w){if(w=="+"){B.fillStyle=RIGHT_STRAND}else{if(w=="-"){B.fillStyle=LEFT_STRAND}}B.fillRect(X+Q,R,C-X,10);B.fillStyle=g}for(var af=0,e=f.length;af<e;af++){var p=f[af],c=Math.floor(Math.max(0,(p[0]-F)*al)),O=Math.ceil(M
ath.min(a,Math.max((p[1]-F)*al)));if(c>O){continue}v=5;ab=3;B.fillRect(c+Q,R+ab,O-c,v);if(H!==undefined&&!(c>an||O<H)){v=9;ab=1;var ac=Math.max(c,H),r=Math.min(O,an);B.fillRect(ac+Q,R+ab,r-ac,v)}}}else{v=9;ab=1;B.fillRect(X+Q,R+ab,C-X,v);if(N.strand){if(N.strand=="+"){B.fillStyle=RIGHT_STRAND_INV}else{if(N.strand=="-"){B.fillStyle=LEFT_STRAND_INV}}B.fillRect(X+Q,R,C-X,10);B.fillStyle=prefs.block_color}}}}}ag++}}o.append(M);return M},gen_options:function(j){var a=$("<div />").addClass("form-row");var e="track_"+j+"_block_color",l=$("<label />").attr("for",e).text("Block color:"),m=$("<input />").attr("id",e).attr("name",e).val(this.prefs.block_color),k="track_"+j+"_label_color",g=$("<label />").attr("for",k).text("Text color:"),h=$("<input />").attr("id",k).attr("name",k).val(this.prefs.label_color),f="track_"+j+"_show_count",c=$("<label />").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("
checked",this.prefs.show_counts),d=$("<div />").append(b).append(c);return a.append(l).append(m).append(g).append(h).append(d)},update_options:function(e){var b=$("#track_"+e+"_block_color").val(),d=$("#track_"+e+"_label_color").val(),c=$("#track_"+e+"_mode option:selected").val(),a=$("#track_"+e+"_show_count").attr("checked");if(b!==this.prefs.block_color||d!==this.prefs.label_color||a!==this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=d;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(d,b,a,c){FeatureTrack.call(this,d,b,a,c);this.track_type="ReadTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
+var DENSITY=200,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset. ",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),PX_PER_CHAR=CONTEXT.measureText("A").width,RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src=image_path+"/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src=image_path+"/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src=image_path+"/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONT
EXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src=image_path+"/visualization/strand_left_inv.png";left_img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};function round_1000(a){return Math.round(a*1000)/1000}var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(a,c,e,d,b){this.container=a;this.vis_id=d;this.dbkey=b;this.title=e;this.chrom=c;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_id_counter=0;this.zoom_factor=3;this.min_separation=30;this
.has_changes=false;this.init();this.reset()};$.extend(View.prototype,{init:function(){var c=this.container,a=this;this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(c);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(c);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide().appendTo(c);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.nav_container=$("<div/>").addClass("nav-container").appendTo(c);this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.nav_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.nav);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_o
verview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_form=$("<form/>").attr("action",function(){void (0)}).appendTo(this.nav_controls);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.chrom_form);var b=function(d){if(d.type==="focusout"||(d.keyCode||d.which)===13||(d.keyCode||d.which)===27){if((d.keyCode||d.which)!==27){a.go_to($(this).val())}$(this).hide();a.location_span.show();a.chrom_select.show();return false}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keypress focusout",b).appendTo(this.chrom_form);this.location_span=$("<span/>").addClass("location").appendTo(this.chrom_form);this.location_span.bind("click",function(){a.location_span.hide();a.chrom_select.hide();a.nav_input.css("display","inline-block");a.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_i
nput=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.chrom_form)}this.zo_link=$("<a/>").click(function(){a.zoom_out();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom-out.png" />').appendTo(this.chrom_form);this.zi_link=$("<a/>").click(function(){a.zoom_in();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom.png" />').appendTo(this.chrom_form);$.ajax({url:chrom_url,data:(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}),dataType:"json",success:function(d){if(d.reference){a.add_label_track(new ReferenceTrack(a))}a.chrom_data=d.chrom_info;var f='<option value="">Select Chrom/Contig</option>';for(i in a.chrom_data){var e=a.chrom_data[i]["chrom"];f+='<option value="'+e+'">'+e+"</option>"}a.chrom_select.html(f);a.intro_div.show();a.content_div.hide();a.chrom_select.bind("change",function(){a.change_chrom(a.chrom_select.val())})},error:function(){alert("Could not load chroms for this dbkey:",a.dbkey)}});this.content_d
iv.bind("dblclick",function(d){a.zoom_in(d.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(d){this.current_x=d.offsetX}).bind("drag",function(d){var g=d.offsetX-this.current_x;this.current_x=d.offsetX;var f=Math.round(g/a.viewport_container.width()*(a.max_high-a.max_low));a.move_delta(-f)});this.viewport_container.bind("dragstart",function(d){this.original_low=a.low;this.current_height=d.clientY;this.current_x=d.offsetX;this.active=(d.clientX<a.viewport_container.width()-16)?true:false}).bind("drag",function(g){if(!this.active){return}var d=$(this);var j=g.offsetX-this.current_x;var f=d.scrollTop()-(g.clientY-this.current_height);d.scrollTop(f);this.current_height=g.clientY;this.current_x=g.offsetX;var h=Math.round(j/a.viewport_container.width()*(a.high-a.low));a.move_delta(h)});this.top_labeltrack.bind("dragstart",function(d){this.drag_origin_x=d.clientX;this.drag_origin_pos=d.clientX/a.viewport_container.width()*(a.high-a.low)+a.low;this.drag_d
iv=$("<div />").css({height:a.content_div.height()+30,top:"0px",position:"absolute","background-color":"#cfc",border:"1px solid #6a6",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(j){var f=Math.min(j.clientX,this.drag_origin_x)-a.container.offset().left,d=Math.max(j.clientX,this.drag_origin_x)-a.container.offset().left,h=(a.high-a.low),g=a.viewport_container.width();a.update_location(Math.round(f/g*h)+a.low,Math.round(d/g*h)+a.low);this.drag_div.css({left:f+"px",width:(d-f)+"px"})}).bind("dragend",function(k){var f=Math.min(k.clientX,this.drag_origin_x),d=Math.max(k.clientX,this.drag_origin_x),h=(a.high-a.low),g=a.viewport_container.width(),j=a.low;a.low=Math.round(f/g*h)+j;a.high=Math.round(d/g*h)+j;this.drag_div.remove();a.redraw()});this.add_label_track(new LabelTrack(this,this.top_labeltrack));this.add_label_track(new LabelTrack(this,this.nav_labeltrack))},update_location:function(a,b){this.location_span.text(commatize(a)+" - "+commatize(b));this.
nav_input.val(this.chrom+":"+commatize(a)+"-"+commatize(b))},change_chrom:function(d,a,f){var c=this;var e=$.grep(c.chrom_data,function(h,j){return h.chrom===d})[0];if(e===undefined){return}if(d!==c.chrom){c.chrom=d;if(c.chrom===""){c.intro_div.show();c.content_div.hide()}else{c.intro_div.hide();c.content_div.show()}c.chrom_select.val(c.chrom);c.max_high=e.len;c.reset();c.redraw(true);for(var g in c.tracks){var b=c.tracks[g];if(b.init){b.init()}}}if(a!==undefined&&f!==undefined){c.low=Math.max(a,0);c.high=Math.min(f,c.max_high)}c.overview_viewport.find("canvas").remove();c.redraw()},go_to:function(f){var k=this,b=f.split(":"),h=b[0],j=b[1];if(j!==undefined){try{var g=j.split("-"),a=parseInt(g[0].replace(/,/g,"")),d=parseInt(g[1].replace(/,/g,""))}catch(c){return false}}k.change_chrom(h,a,d)},move_delta:function(c){var a=this;var b=a.high-a.low;if(a.low-c<a.max_low){a.low=a.max_low;a.high=a.max_low+b}else{if(a.high-c>a.max_high){a.high=a.max_high;a.low=a.max_high-b}else{a.hig
h-=c;a.low-=c}}a.redraw()},add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tracks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"+a.track_id);this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){this.has_changes=true;a.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(a)];this.num_tracks-=1},update_options:function(){this.has_changes=true;var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];this.viewport_container.append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(f){var d=this.high-this.low,b=this.low,e=this.high;if(b<this.max_low){b=this.max_low}if(e>this.
max_high){e=this.max_high}if(this.high!==0&&d<this.min_separation){e=b+this.min_separation}this.low=Math.floor(b);this.high=Math.ceil(e);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));this.overview_box.css({left:(this.low/(this.max_high-this.max_low))*this.overview_viewport.width(),width:Math.max(12,(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())}).show();this.update_location(this.low,this.high);if(!f){for(var c=0,a=this.tracks.length;c<a;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,a=this.label_tracks.length;c<a;c++){this.label_tracks[c].draw()}}},zoom_in:function(b,c){if(this.max_high===0||this.high-this.low<this.min_separation){return}var d=this.high-this.low,e=d/2+this.low,a=(d/this.zoom_factor)/2;if(b){e=b/this.viewport_container.width(
)*(this.high-this.low)+this.low}this.low=Math.round(e-a);this.high=Math.round(e+a);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var b=this.high-this.low,c=b/2+this.low,a=(b*this.zoom_factor)/2;this.low=Math.round(c-a);this.high=Math.round(c+a);this.redraw()}});var Track=function(b,a,c){this.name=b;this.parent_element=c;this.view=a;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.header_div=$("<div class='track-header'>").text(this.name);this.content_div=$("<div class='track-content'>");this.container_div=$("<div />").addClass("track").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)},init_each:function(c,b){var a=this;a.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();a.initial_canvas=undefined;a.content_div.css("height","auto");if(!a.content_div.text()){a.content_div.text(DATA_LOADING)}a.container_div.removeClass("nodata error pending");if(a.view.chrom){$.getJSO
N(data_url,c,function(d){if(!d||d==="error"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0);'></a>").attr("id",f+"_error");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})});a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d==="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.enabled=true;b(d);a.draw()}}}}})}else{a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}}});var TiledTrack=function(){var c=t
his,b=c.view;if(c.display_modes!==undefined){if(c.mode_div===undefined){c.mode_div=$("<div class='right-float menubutton popup' />").appendTo(c.header_div);var g=c.display_modes[0];c.mode=g;c.mode_div.text(g);var a=function(h){c.mode_div.text(h);c.mode=h;c.tile_cache.clear();c.draw()};var e={};for(var d in c.display_modes){var f=c.display_modes[d];e[f]=function(h){return function(){a(h)}}(f)}make_popupmenu(c.mode_div,e)}else{c.mode_div.hide()}}if(c.overview_check_div===undefined){c.overview_check_div=$("<div class='right-float' />").css("margin-top","-3px").appendTo(c.header_div);c.overview_check=$("<input type='checkbox' class='overview_check' />").appendTo(c.overview_check_div);c.overview_check.bind("click",function(){var h=this;b.overview_viewport.find("canvas").remove();c.set_overview();$(".overview_check").each(function(){if(this!==h){$(this).attr("checked",false)}})});c.overview_check_div.append($("<label />").text("Overview"))}};$.extend(TiledTrack.prototype,Track.pro
totype,{draw:function(){var j=this.view.low,e=this.view.high,f=e-j,d=this.view.resolution;var l=$("<div style='position: relative;'></div>"),m=this.content_div.width()/f,h;this.content_div.children(":first").remove();this.content_div.append(l),this.max_height=0;var a=Math.floor(j/d/DENSITY);while((a*DENSITY*d)<e){var k=this.content_div.width()+"_"+m+"_"+a;var c=this.tile_cache.get(k);if(c){var g=a*DENSITY*d;var b=(g-j)*m;if(this.left_offset){b-=this.left_offset}c.css({left:b});l.append(c);this.max_height=Math.max(this.max_height,c.height());this.content_div.css("height",this.max_height+"px")}else{this.delayed_draw(this,k,j,e,a,d,l,m)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_element){if(!c.initial_canvas){c.initial_canvas=$(tile_element).clone();var l=tile_element.get(0).getContext("2d");var j=c.initial_canvas.get(0).getContext("2d");var k=l.getImageData(0,0,l.canvas.width,
l.canvas.height);j.putImageData(k,0,0);c.set_overview()}c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height+"px")}}},50)},set_overview:function(){var a=this.view;a.overview_viewport.height(a.default_overview_height);a.overview_box.height(a.default_overview_height);if(this.initial_canvas&&this.overview_check.is(":checked")){a.overview_viewport.append(this.initial_canvas);a.overview_viewport.height(this.initial_canvas.height());a.overview_box.height(this.initial_canvas.height())}$(window).trigger("resize")}});var LabelTrack=function(a,b){Track.call(this,null,a,b);this.track_type="LabelTrack";this.hidden=true;this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height
: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var ReferenceTrack=function(a){this.track_type="ReferenceTrack";Track.call(this,null,a,a.top_labeltrack);TiledTrack.call(this);this.hidden=true;this.height_px=12;this.container_div.addClass("reference-track");this.dummy_canvas=$("<canvas></canvas>").get(0).getContext("2d");this.data_queue={};this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE)};$.extend(ReferenceTrack.prototype,TiledTrack.prototype,{get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:reference_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dbkey:this.view.dbkey},success:function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()},error:function(h,g,j){consol
e.log(h,g,j)}})}},draw_tile:function(f,b,k,o){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),n=e.get(0).getContext("2d"),j=f+"_"+b;if(o>PX_PER_CHAR){if(this.data_cache.get(j)===undefined){this.get_data(f,b);return}var m=this.data_cache.get(j);if(m===null){this.content_div.css("height","0px");return}e.get(0).width=Math.ceil(d*o+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*o-this.left_offset});for(var h=0,l=m.length;h<l;h++){var a=Math.round(h*o);n.fillText(m[h],a+this.left_offset,10)}k.append(e);return e}this.content_div.css("height","0px")}});var LineTrack=function(d,b,a,c){this.track_type="LineTrack";this.display_modes=["Line","Filled","Intensity"];this.mode="Line";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=80;this.dataset_id=a;this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE);this.prefs={min_value:undefined,max_value:undefin
ed,mode:"Line"};if(c.min_value!==undefined){this.prefs.min_value=c.min_value}if(c.max_value!==undefined){this.prefs.max_value=c.max_value}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.max;$("#track_"+b+"_minval").val(a.prefs.min_value);$("#track_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;a.total_frequency=data.total_frequency;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").remove();var e=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(round_1000(a.prefs.min_value));var d=$("<div />").addClass("yaxislabel").attr("id","
linetrack_"+b+"_maxval").text(round_1000(a.prefs.max_value));d.css({position:"relative",top:"32px",left:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+32+"px",left:"10px"});e.prependTo(a.container_div)})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:function(p,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get
(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_value,g=this.prefs.max_value,n=this.vertical_range,t=this.total_frequency,d=this.height_px,m=this.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;h=data[q][1];if(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}else{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRect(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(k){var a=$("<div />").addClass("form-row");var e="track_"+k+"_minval",h=$("<label></label>").attr("for",e).text("Min value:"),b=(this
.prefs.min_value===undefined?"":this.prefs.min_value),j=$("<input></input>").attr("id",e).val(b),g="track_"+k+"_maxval",d=$("<label></label>").attr("for",g).text("Max value:"),f=(this.prefs.max_value===undefined?"":this.prefs.max_value),c=$("<input></input>").attr("id",g).val(f);return a.append(h).append(j).append(d).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(b);this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+c+"_minval").text(this.prefs.min_value);$("#linetrack_"+c+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(d,b,a,c){this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=0;this.container_div.addCl
ass("feature-track");this.dataset_id=a;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=2;this.summary_draw_height=20;this.default_font="9px Monaco, Lucida Console, monospace";this.inc_slots={};this.data_queue={};this.s_e_by_tile={};this.tile_cache=new Cache(CACHED_TILES_FEATURE);this.data_cache=new Cache(20);this.left_offset=200;this.prefs={block_color:"black",label_color:"black",show_counts:true};if(c.block_color!==undefined){this.prefs.block_color=c.block_color}if(c.label_color!==undefined){this.prefs.label_color=c.label_color}if(c.show_counts!==undefined){this.prefs.show_counts=c.show_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b="initial";this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution,mode:a.mode},function(c){a.mode_div.show();a.data_cache.set(b,c);a.draw()})},get_da
ta:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,resolution:this.view.resolution,mode:this.mode},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incremental_slots:function(a,h,c,r){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.inc_slots[a].mode=r;this.s_e_by_tile[a]={}}var n=this.inc_slots[a].w_scale,z=[],l=0,b=$("<canvas></canvas>").get(0).getContext("2d"),o=this.view.max_low;var B=[];if(this.inc_slots[a].mode!==r){delete this.inc_slots[a];this.inc_slots[a]={mode:r,w_scale:n};delete this.s_e_by_tile[a];this.s_e_by_tile[a]={}}for(var w=0,x=h.length;w<x;w++){var g=h[w],m=g[0];if(this.inc_slots[a][m]!==undefined){l=Math.max(l,this.inc_slots[a][m]);B.push(this.inc_slots[a][m])}else{z.push(w)}}for(var w=0,x=z.length;w<x;w++){var g=h[z[w]],m=g[0],s=g[1],d=g[2],q=g[3],e=Math.floor((s-o)*n),f=Math.ceil((d-o)*n);if(q!==unde
fined&&!c){var t=b.measureText(q).width;if(e-t<0){f+=t}else{e-=t}}var v=0;while(true){var p=true;if(this.s_e_by_tile[a][v]!==undefined){for(var u=0,A=this.s_e_by_tile[a][v].length;u<A;u++){var y=this.s_e_by_tile[a][v][u];if(f>y[0]&&e<y[1]){p=false;break}}}if(p){if(this.s_e_by_tile[a][v]===undefined){this.s_e_by_tile[a][v]=[]}this.s_e_by_tile[a][v].push([e,f]);this.inc_slots[a][m]=v;l=Math.max(l,v);break}v++}}return l},rect_or_text:function(n,o,f,m,b,d,k,e,h){n.textAlign="center";var j=Math.round(o/2);if((this.mode==="Pack"||this.mode==="Auto")&&d!==undefined&&o>PX_PER_CHAR){n.fillStyle=this.prefs.block_color;n.fillRect(k,h+1,e,9);n.fillStyle="#eee";for(var g=0,l=d.length;g<l;g++){if(b+g>=f&&b+g<=m){var a=Math.floor(Math.max(0,(b+g-f)*o));n.fillText(d[g],a+this.left_offset+j,h+9)}}}else{n.fillStyle=this.prefs.block_color;n.fillRect(k,h+4,e,3)}},draw_tile:function(Y,l,o,al){var F=l*DENSITY*Y,ae=(l+1)*DENSITY*Y,E=ae-F;var af=(!this.initial_canvas?"initial":F+"_"+ae);var A=this.
data_cache.get(af);var d;if(A===undefined||(this.mode!=="Auto"&&A.dataset_type==="summary_tree")){this.data_queue[[F,ae]]=true;this.get_data(F,ae);return}var a=Math.ceil(E*al),M=$("<canvas class='tile'></canvas>"),aa=this.prefs.label_color,g=this.prefs.block_color,n=this.mode,W=(n==="Squish")||(n==="Dense")&&(n!=="Pack")||(n==="Auto"&&(A.extra_info==="no_detail")),Q=this.left_offset,ak,t,am;if(A.dataset_type==="summary_tree"){t=this.summary_draw_height}else{if(n==="Dense"){t=25;am=10}else{am=(W?this.vertical_nodetail_px:this.vertical_detail_px);t=this.incremental_slots(this.view.zoom_res,A.data,W,n)*am+15;ak=this.inc_slots[this.view.zoom_res]}}M.css({position:"absolute",top:0,left:(F-this.view.low)*al-Q});M.get(0).width=a+Q;M.get(0).height=t;o.parent().css("height",Math.max(this.height_px,t)+"px");var B=M.get(0).getContext("2d");B.fillStyle=g;B.font=this.default_font;B.textAlign="right";if(A.dataset_type=="summary_tree"){var L,I=55,ad=255-I,h=ad*2/3,S=A.data,D=A.max,m=A.avg,
b=Math.ceil(A.delta*al);for(var ah=0,z=S.length;ah<z;ah++){var U=Math.floor((S[ah][0]-F)*al);var T=S[ah][1];if(!T){continue}L=Math.floor(ad-(T/D)*ad);B.fillStyle="rgb("+L+","+L+","+L+")";B.fillRect(U+Q,0,b,this.summary_draw_height);if(this.prefs.show_counts&&B.measureText(T).width<b){if(L>h){B.fillStyle="black"}else{B.fillStyle="#ddd"}B.textAlign="center";B.fillText(T,U+Q+(b/2),12)}}d="Summary";o.append(M);return M}if(A.message){M.css({border:"solid red","border-width":"2px 2px 2px 0px"});B.fillStyle="red";B.textAlign="left";B.fillText(A.message,100+Q,am)}var aj=A.data;var ag=0;for(var ah=0,z=aj.length;ah<z;ah++){var N=aj[ah],K=N[0],ai=N[1],V=N[2],G=N[3];if(ai<=ae&&V>=F){var X=Math.floor(Math.max(0,(ai-F)*al)),C=Math.ceil(Math.min(a,Math.max(0,(V-F)*al))),R=(n==="Dense"?1:(1+ak[K]))*am;if(A.dataset_type==="bai"){B.fillStyle=g;if(N[4] instanceof Array){var u=Math.floor(Math.max(0,(N[4][0]-F)*al)),J=Math.ceil(Math.min(a,Math.max(0,(N[4][1]-F)*al))),s=Math.floor(Math.max(0,(N[5
][0]-F)*al)),q=Math.ceil(Math.min(a,Math.max(0,(N[5][1]-F)*al)));if(N[4][1]>=F&&N[4][0]<=ae){this.rect_or_text(B,al,F,ae,N[4][0],N[4][2],u+Q,J-u,R)}if(N[5][1]>=F&&N[5][0]<=ae){this.rect_or_text(B,al,F,ae,N[5][0],N[5][2],s+Q,q-s,R)}if(s>J){B.fillStyle="#999";B.fillRect(J+Q,R+5,s-J,1)}}else{B.fillStyle=g;this.rect_or_text(B,al,F,ae,ai,G,X+Q,C-X,R)}if(n!=="Dense"&&!W&&ai>F){B.fillStyle=this.prefs.label_color;if(l===0&&X-B.measureText(G).width<0){B.textAlign="left";B.fillText(K,C+2+Q,R+8)}else{B.textAlign="right";B.fillText(K,X-2+Q,R+8)}B.fillStyle=g}}else{if(A.dataset_type==="interval_index"){if(W){B.fillStyle=g;B.fillRect(X+Q,R+5,C-X,1)}else{var w=N[4],P=N[5],Z=N[6],f=N[7];var v,ab,H=null,an=null;if(P&&Z){H=Math.floor(Math.max(0,(P-F)*al));an=Math.ceil(Math.min(a,Math.max(0,(Z-F)*al)))}if(n!=="Dense"&&G!==undefined&&ai>F){B.fillStyle=aa;if(l===0&&X-B.measureText(G).width<0){B.textAlign="left";B.fillText(G,C+2+Q,R+8)}else{B.textAlign="right";B.fillText(G,X-2+Q,R+8)}B.fillStyle=
g}if(f){if(w){if(w=="+"){B.fillStyle=RIGHT_STRAND}else{if(w=="-"){B.fillStyle=LEFT_STRAND}}B.fillRect(X+Q,R,C-X,10);B.fillStyle=g}for(var af=0,e=f.length;af<e;af++){var p=f[af],c=Math.floor(Math.max(0,(p[0]-F)*al)),O=Math.ceil(Math.min(a,Math.max((p[1]-F)*al)));if(c>O){continue}v=5;ab=3;B.fillRect(c+Q,R+ab,O-c,v);if(H!==undefined&&!(c>an||O<H)){v=9;ab=1;var ac=Math.max(c,H),r=Math.min(O,an);B.fillRect(ac+Q,R+ab,r-ac,v)}}}else{v=9;ab=1;B.fillRect(X+Q,R+ab,C-X,v);if(N.strand){if(N.strand=="+"){B.fillStyle=RIGHT_STRAND_INV}else{if(N.strand=="-"){B.fillStyle=LEFT_STRAND_INV}}B.fillRect(X+Q,R,C-X,10);B.fillStyle=g}}}}}ag++}}o.append(M);return M},gen_options:function(j){var a=$("<div />").addClass("form-row");var e="track_"+j+"_block_color",l=$("<label />").attr("for",e).text("Block color:"),m=$("<input />").attr("id",e).attr("name",e).val(this.prefs.block_color),k="track_"+j+"_label_color",g=$("<label />").attr("for",k).text("Text color:"),h=$("<input />").attr("id",k).attr("name
",k).val(this.prefs.label_color),f="track_"+j+"_show_count",c=$("<label />").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("checked",this.prefs.show_counts),d=$("<div />").append(b).append(c);return a.append(l).append(m).append(g).append(h).append(d)},update_options:function(e){var b=$("#track_"+e+"_block_color").val(),d=$("#track_"+e+"_label_color").val(),c=$("#track_"+e+"_mode option:selected").val(),a=$("#track_"+e+"_show_count").attr("checked");if(b!==this.prefs.block_color||d!==this.prefs.label_color||a!==this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=d;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(d,b,a,c){FeatureTrack.call(this,d,b,a,c);this.track_type="ReadTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -951,9 +951,8 @@ var FeatureTrack = function ( name, view
var track = this,
key = "initial";
- this.init_each({ low: track.view.max_low,
- high: track.view.max_high, dataset_id: track.dataset_id,
- chrom: track.view.chrom, resolution: this.view.resolution }, function (result) {
+ this.init_each({ low: track.view.max_low, high: track.view.max_high, dataset_id: track.dataset_id,
+ chrom: track.view.chrom, resolution: this.view.resolution, mode: track.mode }, function (result) {
track.mode_div.show();
track.data_cache.set(key, result);
track.draw();
@@ -1089,12 +1088,11 @@ var FeatureTrack = function ( name, view
break;
}
}*/
-
var k = (!this.initial_canvas ? "initial" : tile_low + '_' + tile_high);
var result = this.data_cache.get(k);
var cur_mode;
- if (result === undefined) {
+ if (result === undefined || (this.mode !== "Auto" && result.dataset_type === "summary_tree")) {
this.data_queue[ [tile_low, tile_high] ] = true;
this.get_data(tile_low, tile_high);
return;
@@ -1112,7 +1110,7 @@ var FeatureTrack = function ( name, view
if (result.dataset_type === "summary_tree") {
required_height = this.summary_draw_height;
} else if (mode === "Dense") {
- required_height = 15;
+ required_height = 25;
y_scale = 10;
} else {
// Calculate new slots incrementally for this new chunk of data and update height if necessary
@@ -1169,6 +1167,16 @@ var FeatureTrack = function ( name, view
return new_canvas;
}
+ if (result.message) {
+ new_canvas.css({
+ border: "solid red",
+ "border-width": "2px 2px 2px 0px"
+ });
+ ctx.fillStyle = "red";
+ ctx.textAlign = "left";
+ ctx.fillText(result.message, 100 + left_offset, y_scale);
+ }
+
var data = result.data;
var j = 0;
for (var i = 0, len = data.length; i < len; i++) {
@@ -1181,7 +1189,7 @@ var FeatureTrack = function ( name, view
if (feature_start <= tile_high && feature_end >= tile_low) {
var f_start = Math.floor( Math.max(0, (feature_start - tile_low) * w_scale) ),
f_end = Math.ceil( Math.min(width, Math.max(0, (feature_end - tile_low) * w_scale)) ),
- y_center = (mode === "Dense" ? 0 : slots[feature_uid] * y_scale);
+ y_center = (mode === "Dense" ? 1 : (1 + slots[feature_uid])) * y_scale;
if (result.dataset_type === "bai") {
ctx.fillStyle = block_color;
@@ -1222,6 +1230,7 @@ var FeatureTrack = function ( name, view
// console.log(feature_uid, feature_start, feature_end, f_start, f_end, y_center);
if (no_detail) {
+ ctx.fillStyle = block_color;
ctx.fillRect(f_start + left_offset, y_center + 5, f_end - f_start, 1);
} else {
// Showing labels, blocks, details
@@ -1291,7 +1300,7 @@ var FeatureTrack = function ( name, view
ctx.fillStyle = LEFT_STRAND_INV;
}
ctx.fillRect(f_start + left_offset, y_center, f_end - f_start, 10);
- ctx.fillStyle = prefs.block_color;
+ ctx.fillStyle = block_color;
}
}
}
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -291,7 +291,8 @@ class TracksController( BaseController,
# Have to choose between indexer and data provider
indexer = dataset_type_to_data_provider[data_sources['index']]( dataset.get_converted_dataset(trans, data_sources['index']), dataset )
summary = indexer.get_summary( chrom, low, high, **kwargs )
- if summary is not None:
+ if summary is not None and kwargs.get("mode", "Auto") == "Auto":
+ # Only check for summary if it's Auto mode (which is the default)
if summary == "no_detail":
kwargs["no_detail"] = True # meh
extra_info = "no_detail"
--- a/lib/galaxy/web/controllers/visualization.py
+++ b/lib/galaxy/web/controllers/visualization.py
@@ -228,7 +228,7 @@ class VisualizationController( BaseContr
# Get session and visualization.
session = trans.sa_session
- visualization = trans.sa_session.query( model.Visualization ).get( trans.security.decode_id( id ) )
+ visualization = self.get_visualization( trans, id, check_ownership=True )
# Do operation on visualization.
if 'make_accessible_via_link' in kwargs:
@@ -261,7 +261,7 @@ class VisualizationController( BaseContr
def share( self, trans, id=None, email="", use_panels=False ):
""" Handle sharing a visualization with a particular user. """
msg = mtype = None
- visualization = trans.sa_session.query( model.Visualization ).get( trans.security.decode_id( id ) )
+ visualization = self.get_visualization( trans, id, check_ownership=True )
if email:
other = trans.sa_session.query( model.User ) \
.filter( and_( model.User.table.c.email==email,
@@ -330,7 +330,7 @@ class VisualizationController( BaseContr
@web.require_login( "get item name and link" )
def get_name_and_link_async( self, trans, id=None ):
""" Returns visualization's name and link. """
- visualization = self.get_visualization( trans, id )
+ visualization = self.get_visualization( trans, id, check_ownership=False, check_accessible=True )
if self.create_item_slug( trans.sa_session, visualization ):
trans.sa_session.flush()
@@ -342,7 +342,7 @@ class VisualizationController( BaseContr
""" Returns item content in HTML format. """
# Get visualization, making sure it's accessible.
- visualization = self.get_visualization( trans, id, False, True )
+ visualization = self.get_visualization( trans, id, check_ownership=False, check_accessible=True )
if visualization is None:
raise web.httpexceptions.HTTPNotFound()
@@ -373,25 +373,26 @@ class VisualizationController( BaseContr
visualization = model.Visualization()
visualization.title = visualization_title
visualization.slug = visualization_slug
+ visualization.dbkey = visualization_dbkey
+ visualization.type = 'trackster' # HACK: set visualization type to trackster since it's the only viz
visualization_annotation = sanitize_html( visualization_annotation, 'utf-8', 'text/html' )
self.add_item_annotation( trans, visualization, visualization_annotation )
visualization.user = user
+
# And the first (empty) visualization revision
visualization_revision = model.VisualizationRevision()
visualization_revision.title = visualization_title
+ visualization_revision.config = {}
+ visualization_revision.dbkey = visualization_dbkey
visualization_revision.visualization = visualization
- # HACK: set visualization type to trackster; when we have multiple visualization types, we'll need to get type from the user.
- visualization.type = 'trackster'
visualization.latest_revision = visualization_revision
- # Visualization config is dbkey for now.
- visualization.latest_revision.config = { 'dbkey' : visualization_dbkey }
- visualization_revision.content = ""
+
# Persist
session = trans.sa_session
- session.add( visualization )
+ session.add(visualization)
+ session.add(visualization_revision)
session.flush()
- # Display the management visualization
- ## trans.set_message( "Visualization '%s' created" % visualization.title )
+
return trans.response.send_redirect( web.url_for( action='list' ) )
return trans.show_form(
@@ -414,12 +415,9 @@ class VisualizationController( BaseContr
"""
Edit a visualization's attributes.
"""
- encoded_id = id
- id = trans.security.decode_id( id )
+ visualization = self.get_visualization( trans, id, check_ownership=True )
session = trans.sa_session
- visualization = session.query( model.Visualization ).get( id )
- user = trans.user
- assert visualization.user == user
+
visualization_title_err = visualization_slug_err = visualization_annotation_err = ""
if trans.request.method == "POST":
if not visualization_title:
@@ -428,7 +426,7 @@ class VisualizationController( BaseContr
visualization_slug_err = "Visualization id is required"
elif not VALID_SLUG_RE.match( visualization_slug ):
visualization_slug_err = "Visualization identifier must consist of only lowercase letters, numbers, and the '-' character"
- elif visualization_slug != visualization.slug and trans.sa_session.query( model.Visualization ).filter_by( user=user, slug=visualization_slug, deleted=False ).first():
+ elif visualization_slug != visualization.slug and trans.sa_session.query( model.Visualization ).filter_by( user=visualization.user, slug=visualization_slug, deleted=False ).first():
visualization_slug_err = "Visualization id must be unique"
else:
visualization.title = visualization_title
@@ -449,7 +447,7 @@ class VisualizationController( BaseContr
if not visualization_annotation:
visualization_annotation = ""
return trans.show_form(
- web.FormBuilder( web.url_for( id=encoded_id ), "Edit visualization attributes", submit_text="Submit" )
+ web.FormBuilder( web.url_for( id=id ), "Edit visualization attributes", submit_text="Submit" )
.add_text( "visualization_title", "Visualization title", value=visualization_title, error=visualization_title_err )
.add_text( "visualization_slug", "Visualization identifier", value=visualization_slug, error=visualization_slug_err,
help="""A unique identifier that will be used for
@@ -460,18 +458,5 @@ class VisualizationController( BaseContr
.add_text( "visualization_annotation", "Visualization annotation", value=visualization_annotation, error=visualization_annotation_err,
help="A description of the visualization; annotation is shown alongside published visualizations."),
template="visualization/create.mako" )
+
- # @web.expose
- # @web.require_login()
- # def list( self, trans, *args, **kwargs ):
- # return self.list_grid( trans, *args, **kwargs )
-
- #(a)web.expose
- #(a)web.require_admin
- #def index( self, trans, *args, **kwargs ):
- # # Build grid
- # grid = self.list( trans, *args, **kwargs )
- # # Render grid wrapped in panels
- # return trans.fill_template( "visualization/index.mako", grid=grid )
-
-
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -41,6 +41,7 @@
<div class="unified-panel-header" unselectable="on"><div class="unified-panel-header-inner"><div style="float:left;" id="title"></div>
+ <a class="panel-header-button right-float" href="${h.url_for( controller='visualization', action='list' )}">Close</a><a id="save-button" class="panel-header-button right-float" href="javascript:void(0);">Save</a><a id="refresh-button" class="panel-header-button right-float" href="javascript:void(0);" onclick="view.update_options();return false;">Refresh</a></div>
1
0
galaxy-dist commit 4a621d4e127a: More files for rgQC test outputs to satisfy the buildbot
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User fubar: ross Lazarus at gmail period com
# Date 1283378497 14400
# Node ID 4a621d4e127a76467d996fdf25b3a7e1ead4ddb9
# Parent 695a12fec1e2195cf8ccdf80d6d5318a464c37e3
More files for rgQC test outputs to satisfy the buildbot
Binary file test-data/rgtestouts/rgQC/tinywga_All_3x3-0.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_All_Paged-8.jpg has changed
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/QQtinywga_logphweunaff_cum.pdf
@@ -0,0 +1,349 @@
+%PDF-1.4
+%���ρ�\r
+1 0 obj
+<<
+/CreationDate (D:20100519151538)
+/ModDate (D:20100519151538)
+/Title (R Graphics Output)
+/Producer (R 2.10.1)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+q
+Q q 59.04 73.44 630.72 443.52 re W n
+0.690 0.188 0.376 rg
+0.690 0.188 0.376 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 80.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 87.44 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 95.16 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 103.22 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 111.66 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 120.52 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 129.82 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 139.63 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 150.00 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 161.00 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 172.71 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 185.23 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 198.67 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 213.19 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 228.98 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 246.27 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 265.39 261.19 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 286.76 284.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 310.98 284.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 338.95 284.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 372.03 304.97 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 412.52 304.97 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 464.71 304.97 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 538.27 311.22 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 2 Tr 5.98 0 0 5.98 664.03 498.46 Tm (l) Tj 0 Tr
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+82.40 73.44 m 667.26 73.44 l S
+82.40 73.44 m 82.40 66.24 l S
+124.18 73.44 m 124.18 66.24 l S
+165.95 73.44 m 165.95 66.24 l S
+207.73 73.44 m 207.73 66.24 l S
+249.50 73.44 m 249.50 66.24 l S
+291.28 73.44 m 291.28 66.24 l S
+333.05 73.44 m 333.05 66.24 l S
+374.83 73.44 m 374.83 66.24 l S
+416.61 73.44 m 416.61 66.24 l S
+458.38 73.44 m 458.38 66.24 l S
+500.16 73.44 m 500.16 66.24 l S
+541.93 73.44 m 541.93 66.24 l S
+583.71 73.44 m 583.71 66.24 l S
+625.48 73.44 m 625.48 66.24 l S
+667.26 73.44 m 667.26 66.24 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 12.00 0.00 -0.00 12.00 74.06 47.52 Tm (0.0) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 115.84 47.52 Tm (0.1) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 157.61 47.52 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 199.39 47.52 Tm (0.3) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 241.16 47.52 Tm (0.4) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 282.94 47.52 Tm (0.5) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 324.71 47.52 Tm (0.6) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 366.49 47.52 Tm (0.7) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 408.27 47.52 Tm (0.8) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 450.04 47.52 Tm (0.9) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 491.82 47.52 Tm (1.0) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 533.59 47.52 Tm (1.1) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 575.37 47.52 Tm (1.2) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 617.14 47.52 Tm (1.3) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 658.92 47.52 Tm (1.4) Tj
+ET
+59.04 89.87 m 59.04 479.32 l S
+59.04 89.87 m 51.84 89.87 l S
+59.04 145.50 m 51.84 145.50 l S
+59.04 201.14 m 51.84 201.14 l S
+59.04 256.78 m 51.84 256.78 l S
+59.04 312.41 m 51.84 312.41 l S
+59.04 368.05 m 51.84 368.05 l S
+59.04 423.68 m 51.84 423.68 l S
+59.04 479.32 m 51.84 479.32 l S
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 78.19 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 133.83 Tm (0.05) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 189.46 Tm (0.10) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 245.10 Tm (0.15) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 300.74 Tm (0.20) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 356.37 Tm (0.25) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 412.01 Tm (0.30) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 467.64 Tm (0.35) Tj
+ET
+59.04 73.44 m
+689.76 73.44 l
+689.76 516.96 l
+59.04 516.96 l
+59.04 73.44 l
+S
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 312.75 541.45 Tm (Log QQ Plot\(n=25\)) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 307.75 4.32 Tm [(LogQQ plot Mar) -15 (k) 20 (er HWE)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 319.41 18.72 Tm [(-log10\(Unif) 30 (or) -25 (m 0-1\))] TJ
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 234.19 Tm (QQ log\(p\) HWE \(unaff\)) Tj
+ET
+Q q 59.04 73.44 630.72 443.52 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+82.40 89.87 m
+264.91 576.00 l
+S
+0.827 0.827 0.827 RG
+0.75 w
+[ 0.00 4.00] 0 d
+82.40 73.44 m 82.40 516.96 l S
+124.18 73.44 m 124.18 516.96 l S
+165.95 73.44 m 165.95 516.96 l S
+207.73 73.44 m 207.73 516.96 l S
+249.50 73.44 m 249.50 516.96 l S
+291.28 73.44 m 291.28 516.96 l S
+333.05 73.44 m 333.05 516.96 l S
+374.83 73.44 m 374.83 516.96 l S
+416.61 73.44 m 416.61 516.96 l S
+458.38 73.44 m 458.38 516.96 l S
+500.16 73.44 m 500.16 516.96 l S
+541.93 73.44 m 541.93 516.96 l S
+583.71 73.44 m 583.71 516.96 l S
+625.48 73.44 m 625.48 516.96 l S
+667.26 73.44 m 667.26 516.96 l S
+59.04 89.87 m 689.76 89.87 l S
+59.04 145.50 m 689.76 145.50 l S
+59.04 201.14 m 689.76 201.14 l S
+59.04 256.78 m 689.76 256.78 l S
+59.04 312.41 m 689.76 312.41 l S
+59.04 368.05 m 689.76 368.05 l S
+59.04 423.68 m 689.76 423.68 l S
+59.04 479.32 m 689.76 479.32 l S
+Q
+endstream
+endobj
+7 0 obj
+5371
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+]
+/Count 1
+/MediaBox [0 0 720 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font << /F1 9 0 R /F2 10 0 R /F3 11 0 R >>
+/ExtGState << >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+9 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/Name /F1
+/BaseFont /ZapfDingbats
+>>
+endobj
+10 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 8 0 R
+>> endobj
+11 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 8 0 R
+>> endobj
+xref
+0 12
+0000000000 65535 f
+0000000021 00000 n
+0000000164 00000 n
+0000005737 00000 n
+0000005820 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000005717 00000 n
+0000005924 00000 n
+0000006181 00000 n
+0000006264 00000 n
+0000006361 00000 n
+trailer
+<<
+/Size 12
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+6463
+%%EOF
Binary file test-data/rgtestouts/rgQC/tinywga_All_Paged-7.jpg has changed
Binary file test-data/rgtestouts/rgQC/QQtinywga_logphweunaff_cum.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_All_3x3-1.jpg has changed
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/Ranked_Marker_MAF.xls
@@ -0,0 +1,11 @@
+snp chromosome offset maf a1 a2 missfrac p_hwe_all logp_hwe_all p_hwe_unaff logp_hwe_unaff N_Mendel
+rs12160770 22 21892925 0.01923 1 3 0.075 1 0 1 0 0
+rs2267010 22 21864366 0.03704 3 1 0 1 0 1 0 0
+rs4822363 22 21821000 0.07407 4 2 0 1 0 1 0 0
+rs5759636 22 21868698 0.07407 4 2 0.025 1 0 1 0 0
+rs756632 22 21799918 0.09259 4 2 0 1 0 1 0 0
+rs6003566 22 21889806 0.09259 3 1 0 1 0 1 0 0
+rs16997606 22 21794754 0.1111 1 3 0 1 0 1 0 0
+rs2267013 22 21875879 0.1111 3 1 0 1 0 1 0 0
+rs2256725 22 21892891 0.1111 2 1 0 1 0 1 0 0
+rs5751592 22 21827674 0.1667 4 2 0 1 0 1 0 0
Binary file test-data/rgtestouts/rgQC/tinywga_All_Paged-6.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_All_Paged-9.jpg has changed
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/Ranked_Marker_HWE.xls
@@ -0,0 +1,11 @@
+snp chromosome offset maf a1 a2 missfrac p_hwe_all logp_hwe_all p_hwe_unaff logp_hwe_unaff N_Mendel
+rs5751611 22 21896019 0.4615 2 4 0.025 0.4275 0.369064 0.4275 0.369064 0
+rs4820539 22 21807970 0.2778 1 3 0 0.6298 0.200797 0.6298 0.200797 0
+rs2283802 22 21784722 0.2593 4 2 0 0.638 0.195179 0.638 0.195179 0
+rs2267009 22 21860168 0.2593 3 4 0 0.638 0.195179 0.638 0.195179 0
+rs2071436 22 21871488 0.2593 4 2 0 0.638 0.195179 0.638 0.195179 0
+rs762601 22 21898858 0.3333 1 3 0 0.6657 0.176721 0.6657 0.176721 0
+rs2156921 22 21899063 0.3333 3 1 0 0.6657 0.176721 0.6657 0.176721 0
+rs4822375 22 21905642 0.3333 1 3 0 0.6657 0.176721 0.6657 0.176721 0
+rs4820537 22 21794810 0.4444 1 3 0 0.6985 0.155834 0.6985 0.155834 0
+rs2267010 22 21864366 0.03704 3 1 0 1 0 1 0 0
Binary file test-data/rgtestouts/rgQC/tinywga_logphweunaff.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_logphweunaff_cum.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_maf_cum.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_All_Paged-11.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_maf.jpg has changed
Binary file test-data/rgtestouts/rgQC/tinywga_missfrac.jpg has changed
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/tinywga_missfrac_cum.pdf
@@ -0,0 +1,314 @@
+%PDF-1.4
+%���ρ�\r
+1 0 obj
+<<
+/CreationDate (D:20100519151538)
+/ModDate (D:20100519151538)
+/Title (R Graphics Output)
+/Producer (R 2.10.1)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+q
+Q q 59.04 73.44 630.72 443.52 re W n
+0.690 0.188 0.376 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 664.03 498.46 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 639.70 224.68 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 615.36 224.68 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 591.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 566.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 542.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 518.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 493.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 469.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 445.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 420.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 396.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 372.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 347.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 323.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 299.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 274.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 250.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 226.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 201.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 177.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 153.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 128.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 104.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 80.03 87.79 Tm (l) Tj 0 Tr
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+118.90 73.44 m 666.40 73.44 l S
+118.90 73.44 m 118.90 66.24 l S
+179.73 73.44 m 179.73 66.24 l S
+240.57 73.44 m 240.57 66.24 l S
+301.40 73.44 m 301.40 66.24 l S
+362.23 73.44 m 362.23 66.24 l S
+423.07 73.44 m 423.07 66.24 l S
+483.90 73.44 m 483.90 66.24 l S
+544.73 73.44 m 544.73 66.24 l S
+605.57 73.44 m 605.57 66.24 l S
+666.40 73.44 m 666.40 66.24 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 12.00 0.00 -0.00 12.00 112.23 47.52 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 173.06 47.52 Tm (20) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 233.89 47.52 Tm (30) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 294.73 47.52 Tm (40) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 355.56 47.52 Tm (50) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 416.39 47.52 Tm (60) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 477.23 47.52 Tm (70) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 538.06 47.52 Tm (80) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 598.89 47.52 Tm (90) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 656.39 47.52 Tm (100) Tj
+ET
+59.04 89.87 m 59.04 473.16 l S
+59.04 89.87 m 51.84 89.87 l S
+59.04 144.62 m 51.84 144.62 l S
+59.04 199.38 m 51.84 199.38 l S
+59.04 254.13 m 51.84 254.13 l S
+59.04 308.89 m 51.84 308.89 l S
+59.04 363.64 m 51.84 363.64 l S
+59.04 418.40 m 51.84 418.40 l S
+59.04 473.16 m 51.84 473.16 l S
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 78.19 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 132.95 Tm (0.01) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 187.70 Tm (0.02) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 242.46 Tm (0.03) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 297.21 Tm (0.04) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 351.97 Tm (0.05) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 406.72 Tm (0.06) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 461.48 Tm (0.07) Tj
+ET
+59.04 73.44 m
+689.76 73.44 l
+689.76 516.96 l
+59.04 516.96 l
+59.04 73.44 l
+S
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 204.50 541.45 Tm [(QC f) 20 (or tin) 20 (ywga - Ranked Marker Missing Genotype)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 326.02 18.72 Tm [(Sample P) 50 (ercentile)] TJ
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 211.88 Tm [(Ordered Missing Rate: Mar) -15 (k) 20 (ers)] TJ
+ET
+Q q 59.04 73.44 630.72 443.52 re W n
+0.827 0.827 0.827 RG
+0.75 w
+[ 0.00 4.00] 0 d
+1 J
+1 j
+10.00 M
+118.90 73.44 m 118.90 516.96 l S
+179.73 73.44 m 179.73 516.96 l S
+240.57 73.44 m 240.57 516.96 l S
+301.40 73.44 m 301.40 516.96 l S
+362.23 73.44 m 362.23 516.96 l S
+423.07 73.44 m 423.07 516.96 l S
+483.90 73.44 m 483.90 516.96 l S
+544.73 73.44 m 544.73 516.96 l S
+605.57 73.44 m 605.57 516.96 l S
+666.40 73.44 m 666.40 516.96 l S
+59.04 89.87 m 689.76 89.87 l S
+59.04 144.62 m 689.76 144.62 l S
+59.04 199.38 m 689.76 199.38 l S
+59.04 254.13 m 689.76 254.13 l S
+59.04 308.89 m 689.76 308.89 l S
+59.04 363.64 m 689.76 363.64 l S
+59.04 418.40 m 689.76 418.40 l S
+59.04 473.16 m 689.76 473.16 l S
+Q
+endstream
+endobj
+7 0 obj
+4591
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+]
+/Count 1
+/MediaBox [0 0 720 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font << /F1 9 0 R /F2 10 0 R /F3 11 0 R >>
+/ExtGState << >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+9 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/Name /F1
+/BaseFont /ZapfDingbats
+>>
+endobj
+10 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 8 0 R
+>> endobj
+11 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 8 0 R
+>> endobj
+xref
+0 12
+0000000000 65535 f
+0000000021 00000 n
+0000000164 00000 n
+0000004957 00000 n
+0000005040 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000004937 00000 n
+0000005144 00000 n
+0000005401 00000 n
+0000005484 00000 n
+0000005581 00000 n
+trailer
+<<
+/Size 12
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+5683
+%%EOF
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/tinywga_maf.pdf
@@ -0,0 +1,331 @@
+%PDF-1.4
+%���ρ�\r
+1 0 obj
+<<
+/CreationDate (D:20100519151538)
+/ModDate (D:20100519151538)
+/Title (R Graphics Output)
+/Producer (R 2.10.1)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+q
+Q q 0.00 0.00 540.00 576.00 re W n
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 10.00 0.00 -0.00 10.00 209.83 552.93 Tm [(QC f) 20 (or tin) 20 (ywga - Marker MAF)] TJ
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 238.60 12.36 Tm (Minor Allele Frequency) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 8.55 273.86 Tm (Frequency) Tj
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+41.94 48.47 m 437.88 48.47 l S
+41.94 48.47 m 41.94 43.72 l S
+140.92 48.47 m 140.92 43.72 l S
+239.91 48.47 m 239.91 43.72 l S
+338.90 48.47 m 338.90 43.72 l S
+437.88 48.47 m 437.88 43.72 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 8.00 0.00 -0.00 8.00 36.38 31.36 Tm (0.0) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 135.36 31.36 Tm (0.1) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 234.35 31.36 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 333.34 31.36 Tm (0.3) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 432.32 31.36 Tm (0.4) Tj
+ET
+38.97 66.57 m 38.97 518.94 l S
+38.97 66.57 m 34.21 66.57 l S
+38.97 157.04 m 34.21 157.04 l S
+38.97 247.51 m 34.21 247.51 l S
+38.97 337.99 m 34.21 337.99 l S
+38.97 428.46 m 34.21 428.46 l S
+38.97 518.94 m 34.21 518.94 l S
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 64.34 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 154.82 Tm (1) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 245.29 Tm (2) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 335.77 Tm (3) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 426.24 Tm (4) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 516.71 Tm (5) Tj
+ET
+Q q 38.97 48.47 481.08 488.56 re W n
+0.690 0.188 0.376 rg
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+56.78 66.57 4.95 90.47 re B
+61.73 66.57 4.95 0.00 re B
+66.68 66.57 4.95 0.00 re B
+71.63 66.57 4.95 0.00 re B
+76.58 66.57 4.95 90.47 re B
+81.53 66.57 4.95 0.00 re B
+86.48 66.57 4.95 0.00 re B
+91.43 66.57 4.95 0.00 re B
+96.38 66.57 4.95 0.00 re B
+101.33 66.57 4.95 0.00 re B
+106.28 66.57 4.95 0.00 re B
+111.23 66.57 4.95 180.95 re B
+116.18 66.57 4.95 0.00 re B
+121.13 66.57 4.95 0.00 re B
+126.07 66.57 4.95 0.00 re B
+131.02 66.57 4.95 180.95 re B
+135.97 66.57 4.95 0.00 re B
+140.92 66.57 4.95 0.00 re B
+145.87 66.57 4.95 0.00 re B
+150.82 66.57 4.95 271.42 re B
+155.77 66.57 4.95 0.00 re B
+160.72 66.57 4.95 0.00 re B
+165.67 66.57 4.95 0.00 re B
+170.62 66.57 4.95 0.00 re B
+175.57 66.57 4.95 0.00 re B
+180.52 66.57 4.95 0.00 re B
+185.47 66.57 4.95 0.00 re B
+190.42 66.57 4.95 0.00 re B
+195.37 66.57 4.95 0.00 re B
+200.31 66.57 4.95 0.00 re B
+205.26 66.57 4.95 90.47 re B
+210.21 66.57 4.95 0.00 re B
+215.16 66.57 4.95 0.00 re B
+220.11 66.57 4.95 0.00 re B
+225.06 66.57 4.95 0.00 re B
+230.01 66.57 4.95 0.00 re B
+234.96 66.57 4.95 0.00 re B
+239.91 66.57 4.95 0.00 re B
+244.86 66.57 4.95 0.00 re B
+249.81 66.57 4.95 0.00 re B
+254.76 66.57 4.95 0.00 re B
+259.71 66.57 4.95 0.00 re B
+264.66 66.57 4.95 0.00 re B
+269.61 66.57 4.95 0.00 re B
+274.55 66.57 4.95 0.00 re B
+279.50 66.57 4.95 0.00 re B
+284.45 66.57 4.95 0.00 re B
+289.40 66.57 4.95 0.00 re B
+294.35 66.57 4.95 271.42 re B
+299.30 66.57 4.95 0.00 re B
+304.25 66.57 4.95 0.00 re B
+309.20 66.57 4.95 0.00 re B
+314.15 66.57 4.95 90.47 re B
+319.10 66.57 4.95 0.00 re B
+324.05 66.57 4.95 0.00 re B
+329.00 66.57 4.95 0.00 re B
+333.95 66.57 4.95 0.00 re B
+338.90 66.57 4.95 0.00 re B
+343.85 66.57 4.95 0.00 re B
+348.79 66.57 4.95 0.00 re B
+353.74 66.57 4.95 0.00 re B
+358.69 66.57 4.95 0.00 re B
+363.64 66.57 4.95 0.00 re B
+368.59 66.57 4.95 452.37 re B
+373.54 66.57 4.95 0.00 re B
+378.49 66.57 4.95 0.00 re B
+383.44 66.57 4.95 0.00 re B
+388.39 66.57 4.95 0.00 re B
+393.34 66.57 4.95 0.00 re B
+398.29 66.57 4.95 0.00 re B
+403.24 66.57 4.95 0.00 re B
+408.19 66.57 4.95 0.00 re B
+413.14 66.57 4.95 0.00 re B
+418.09 66.57 4.95 0.00 re B
+423.03 66.57 4.95 0.00 re B
+427.98 66.57 4.95 0.00 re B
+432.93 66.57 4.95 0.00 re B
+437.88 66.57 4.95 0.00 re B
+442.83 66.57 4.95 0.00 re B
+447.78 66.57 4.95 0.00 re B
+452.73 66.57 4.95 0.00 re B
+457.68 66.57 4.95 0.00 re B
+462.63 66.57 4.95 271.42 re B
+467.58 66.57 4.95 0.00 re B
+472.53 66.57 4.95 0.00 re B
+477.48 66.57 4.95 90.47 re B
+482.43 66.57 4.95 0.00 re B
+487.38 66.57 4.95 0.00 re B
+492.33 66.57 4.95 0.00 re B
+497.27 66.57 4.95 180.95 re B
+Q q 578.97 48.47 121.08 488.56 re W n
+Q q 578.97 48.47 121.08 488.56 re W n
+0.690 0.188 0.376 rg
+ 617.08 160.22 m
+ 661.93 160.22 l
+ 661.93 386.72 l
+ 617.08 386.72 l
+h f
+0.000 0.000 0.000 RG
+2.25 w
+[] 0 d
+0 J
+1 j
+10.00 M
+617.08 311.29 m 661.93 311.29 l S
+0.75 w
+[ 3.00 5.00] 0 d
+1 J
+639.50 66.57 m 639.50 160.22 l S
+639.50 518.94 m 639.50 386.72 l S
+0.75 w
+[] 0 d
+628.29 66.57 m 650.71 66.57 l S
+628.29 518.94 m 650.71 518.94 l S
+617.08 160.22 m
+661.93 160.22 l
+661.93 386.72 l
+617.08 386.72 l
+617.08 160.22 l
+S
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+578.97 148.90 m 578.97 454.72 l S
+578.97 148.90 m 574.21 148.90 l S
+578.97 250.84 m 574.21 250.84 l S
+578.97 352.78 m 574.21 352.78 l S
+578.97 454.72 m 574.21 454.72 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 143.34 Tm (0.1) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 245.28 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 347.22 Tm (0.3) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 449.16 Tm (0.4) Tj
+ET
+Q q 540.00 0.00 180.00 576.00 re W n
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+578.97 48.47 m
+700.04 48.47 l
+700.04 537.03 l
+578.97 537.03 l
+578.97 48.47 l
+S
+Q
+endstream
+endobj
+7 0 obj
+5270
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+]
+/Count 1
+/MediaBox [0 0 720 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font <</F2 9 0 R /F3 10 0 R >>
+/ExtGState << >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+9 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 8 0 R
+>> endobj
+10 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 8 0 R
+>> endobj
+xref
+0 11
+0000000000 65535 f
+0000000021 00000 n
+0000000164 00000 n
+0000005636 00000 n
+0000005719 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000005616 00000 n
+0000005811 00000 n
+0000006068 00000 n
+0000006164 00000 n
+trailer
+<<
+/Size 11
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+6266
+%%EOF
Binary file test-data/rgtestouts/rgQC/tinywga_All_Paged-10.jpg has changed
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/tinywga_missfrac.pdf
@@ -0,0 +1,312 @@
+%PDF-1.4
+%���ρ�\r
+1 0 obj
+<<
+/CreationDate (D:20100519151538)
+/ModDate (D:20100519151538)
+/Title (R Graphics Output)
+/Producer (R 2.10.1)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+q
+Q q 0.00 0.00 540.00 576.00 re W n
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 10.00 0.00 -0.00 10.00 177.59 552.93 Tm [(QC f) 20 (or tin) 20 (ywga - Marker Missing Genotype)] TJ
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 239.74 12.36 Tm [(Missing Rate: Mar) -15 (k) 20 (ers)] TJ
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 8.55 273.86 Tm (Frequency) Tj
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+56.78 48.47 m 413.14 48.47 l S
+56.78 48.47 m 56.78 43.72 l S
+175.57 48.47 m 175.57 43.72 l S
+294.35 48.47 m 294.35 43.72 l S
+413.14 48.47 m 413.14 43.72 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 8.00 0.00 -0.00 8.00 49.00 31.36 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 167.78 31.36 Tm (0.02) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 286.57 31.36 Tm (0.04) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 405.35 31.36 Tm (0.06) Tj
+ET
+38.97 66.57 m 38.97 477.81 l S
+38.97 66.57 m 34.21 66.57 l S
+38.97 169.38 m 34.21 169.38 l S
+38.97 272.19 m 34.21 272.19 l S
+38.97 375.00 m 34.21 375.00 l S
+38.97 477.81 m 34.21 477.81 l S
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 64.34 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 167.15 Tm (5) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 267.74 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 370.55 Tm (15) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 473.37 Tm (20) Tj
+ET
+Q q 38.97 48.47 481.08 488.56 re W n
+0.690 0.188 0.376 rg
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+56.78 66.57 5.94 452.37 re B
+62.72 66.57 5.94 0.00 re B
+68.66 66.57 5.94 0.00 re B
+74.60 66.57 5.94 0.00 re B
+80.54 66.57 5.94 0.00 re B
+86.48 66.57 5.94 0.00 re B
+92.42 66.57 5.94 0.00 re B
+98.36 66.57 5.94 0.00 re B
+104.30 66.57 5.94 0.00 re B
+110.24 66.57 5.94 0.00 re B
+116.18 66.57 5.94 0.00 re B
+122.12 66.57 5.94 0.00 re B
+128.05 66.57 5.94 0.00 re B
+133.99 66.57 5.94 0.00 re B
+139.93 66.57 5.94 0.00 re B
+145.87 66.57 5.94 0.00 re B
+151.81 66.57 5.94 0.00 re B
+157.75 66.57 5.94 0.00 re B
+163.69 66.57 5.94 0.00 re B
+169.63 66.57 5.94 0.00 re B
+175.57 66.57 5.94 0.00 re B
+181.51 66.57 5.94 0.00 re B
+187.45 66.57 5.94 0.00 re B
+193.39 66.57 5.94 0.00 re B
+199.32 66.57 5.94 41.12 re B
+205.26 66.57 5.94 0.00 re B
+211.20 66.57 5.94 0.00 re B
+217.14 66.57 5.94 0.00 re B
+223.08 66.57 5.94 0.00 re B
+229.02 66.57 5.94 0.00 re B
+234.96 66.57 5.94 0.00 re B
+240.90 66.57 5.94 0.00 re B
+246.84 66.57 5.94 0.00 re B
+252.78 66.57 5.94 0.00 re B
+258.72 66.57 5.94 0.00 re B
+264.66 66.57 5.94 0.00 re B
+270.60 66.57 5.94 0.00 re B
+276.53 66.57 5.94 0.00 re B
+282.47 66.57 5.94 0.00 re B
+288.41 66.57 5.94 0.00 re B
+294.35 66.57 5.94 0.00 re B
+300.29 66.57 5.94 0.00 re B
+306.23 66.57 5.94 0.00 re B
+312.17 66.57 5.94 0.00 re B
+318.11 66.57 5.94 0.00 re B
+324.05 66.57 5.94 0.00 re B
+329.99 66.57 5.94 0.00 re B
+335.93 66.57 5.94 0.00 re B
+341.87 66.57 5.94 0.00 re B
+347.80 66.57 5.94 0.00 re B
+353.74 66.57 5.94 0.00 re B
+359.68 66.57 5.94 0.00 re B
+365.62 66.57 5.94 0.00 re B
+371.56 66.57 5.94 0.00 re B
+377.50 66.57 5.94 0.00 re B
+383.44 66.57 5.94 0.00 re B
+389.38 66.57 5.94 0.00 re B
+395.32 66.57 5.94 0.00 re B
+401.26 66.57 5.94 0.00 re B
+407.20 66.57 5.94 0.00 re B
+413.14 66.57 5.94 0.00 re B
+419.08 66.57 5.94 0.00 re B
+425.01 66.57 5.94 0.00 re B
+430.95 66.57 5.94 0.00 re B
+436.89 66.57 5.94 0.00 re B
+442.83 66.57 5.94 0.00 re B
+448.77 66.57 5.94 0.00 re B
+454.71 66.57 5.94 0.00 re B
+460.65 66.57 5.94 0.00 re B
+466.59 66.57 5.94 0.00 re B
+472.53 66.57 5.94 0.00 re B
+478.47 66.57 5.94 0.00 re B
+484.41 66.57 5.94 0.00 re B
+490.35 66.57 5.94 0.00 re B
+496.28 66.57 5.94 20.56 re B
+Q q 578.97 48.47 121.08 488.56 re W n
+Q q 578.97 48.47 121.08 488.56 re W n
+0.690 0.188 0.376 rg
+ 617.08 292.75 m
+ 661.93 292.75 l
+ 661.93 292.75 l
+ 617.08 292.75 l
+h f
+0.000 0.000 0.000 RG
+2.25 w
+[] 0 d
+0 J
+1 j
+10.00 M
+617.08 292.75 m 661.93 292.75 l S
+0.75 w
+[ 3.00 5.00] 0 d
+1 J
+639.50 292.75 m 639.50 292.75 l S
+639.50 292.75 m 639.50 292.75 l S
+0.75 w
+[] 0 d
+628.29 292.75 m 650.71 292.75 l S
+628.29 292.75 m 650.71 292.75 l S
+617.08 292.75 m
+661.93 292.75 l
+661.93 292.75 l
+617.08 292.75 l
+617.08 292.75 l
+S
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+578.97 66.57 m 578.97 518.94 l S
+578.97 66.57 m 574.21 66.57 l S
+578.97 179.66 m 574.21 179.66 l S
+578.97 292.75 m 574.21 292.75 l S
+578.97 405.85 m 574.21 405.85 l S
+578.97 518.94 m 574.21 518.94 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 58.67 Tm (-1.0) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 171.76 Tm (-0.5) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 287.19 Tm (0.0) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 400.29 Tm (0.5) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 513.38 Tm (1.0) Tj
+ET
+Q q 540.00 0.00 180.00 576.00 re W n
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+578.97 48.47 m
+700.04 48.47 l
+700.04 537.03 l
+578.97 537.03 l
+578.97 48.47 l
+S
+Q
+endstream
+endobj
+7 0 obj
+4783
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+]
+/Count 1
+/MediaBox [0 0 720 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font <</F2 9 0 R /F3 10 0 R >>
+/ExtGState << >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+9 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 8 0 R
+>> endobj
+10 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 8 0 R
+>> endobj
+xref
+0 11
+0000000000 65535 f
+0000000021 00000 n
+0000000164 00000 n
+0000005149 00000 n
+0000005232 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000005129 00000 n
+0000005324 00000 n
+0000005581 00000 n
+0000005677 00000 n
+trailer
+<<
+/Size 11
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+5779
+%%EOF
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/tinywga_maf_cum.pdf
@@ -0,0 +1,319 @@
+%PDF-1.4
+%���ρ�\r
+1 0 obj
+<<
+/CreationDate (D:20100519151538)
+/ModDate (D:20100519151538)
+/Title (R Graphics Output)
+/Producer (R 2.10.1)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+q
+Q q 59.04 73.44 630.72 443.52 re W n
+0.690 0.188 0.376 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 664.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 639.70 104.27 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 615.36 138.54 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 591.03 138.54 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 566.70 155.68 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 542.36 155.68 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 518.03 172.81 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 493.70 172.81 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 469.36 172.81 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 445.03 224.26 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 420.70 309.95 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 396.36 309.95 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 372.03 309.95 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 347.70 327.07 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 323.36 378.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 299.03 378.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 274.70 378.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 250.36 378.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 226.03 378.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 201.70 464.12 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 177.36 464.12 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 153.03 464.12 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 128.70 481.24 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 104.36 497.07 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 80.03 498.46 Tm (l) Tj 0 Tr
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+118.90 73.44 m 666.40 73.44 l S
+118.90 73.44 m 118.90 66.24 l S
+179.73 73.44 m 179.73 66.24 l S
+240.57 73.44 m 240.57 66.24 l S
+301.40 73.44 m 301.40 66.24 l S
+362.23 73.44 m 362.23 66.24 l S
+423.07 73.44 m 423.07 66.24 l S
+483.90 73.44 m 483.90 66.24 l S
+544.73 73.44 m 544.73 66.24 l S
+605.57 73.44 m 605.57 66.24 l S
+666.40 73.44 m 666.40 66.24 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 12.00 0.00 -0.00 12.00 112.23 47.52 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 173.06 47.52 Tm (20) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 233.89 47.52 Tm (30) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 294.73 47.52 Tm (40) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 355.56 47.52 Tm (50) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 416.39 47.52 Tm (60) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 477.23 47.52 Tm (70) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 538.06 47.52 Tm (80) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 598.89 47.52 Tm (90) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 656.39 47.52 Tm (100) Tj
+ET
+59.04 118.34 m 59.04 488.50 l S
+59.04 118.34 m 51.84 118.34 l S
+59.04 164.61 m 51.84 164.61 l S
+59.04 210.88 m 51.84 210.88 l S
+59.04 257.15 m 51.84 257.15 l S
+59.04 303.42 m 51.84 303.42 l S
+59.04 349.69 m 51.84 349.69 l S
+59.04 395.96 m 51.84 395.96 l S
+59.04 442.23 m 51.84 442.23 l S
+59.04 488.50 m 51.84 488.50 l S
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 106.67 Tm (0.05) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 152.94 Tm (0.10) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 199.21 Tm (0.15) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 245.48 Tm (0.20) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 291.75 Tm (0.25) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 338.02 Tm (0.30) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 384.29 Tm (0.35) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 430.56 Tm (0.40) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 476.83 Tm (0.45) Tj
+ET
+59.04 73.44 m
+689.76 73.44 l
+689.76 516.96 l
+59.04 516.96 l
+59.04 73.44 l
+S
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 249.62 541.45 Tm [(QC f) 20 (or tin) 20 (ywga - Ranked Marker MAF)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 326.02 18.72 Tm [(Sample P) 50 (ercentile)] TJ
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 210.17 Tm (Ordered Minor Allele Frequency) Tj
+ET
+Q q 59.04 73.44 630.72 443.52 re W n
+0.827 0.827 0.827 RG
+0.75 w
+[ 0.00 4.00] 0 d
+1 J
+1 j
+10.00 M
+118.90 73.44 m 118.90 516.96 l S
+179.73 73.44 m 179.73 516.96 l S
+240.57 73.44 m 240.57 516.96 l S
+301.40 73.44 m 301.40 516.96 l S
+362.23 73.44 m 362.23 516.96 l S
+423.07 73.44 m 423.07 516.96 l S
+483.90 73.44 m 483.90 516.96 l S
+544.73 73.44 m 544.73 516.96 l S
+605.57 73.44 m 605.57 516.96 l S
+666.40 73.44 m 666.40 516.96 l S
+59.04 118.34 m 689.76 118.34 l S
+59.04 164.61 m 689.76 164.61 l S
+59.04 210.88 m 689.76 210.88 l S
+59.04 257.15 m 689.76 257.15 l S
+59.04 303.42 m 689.76 303.42 l S
+59.04 349.69 m 689.76 349.69 l S
+59.04 395.96 m 689.76 395.96 l S
+59.04 442.23 m 689.76 442.23 l S
+59.04 488.50 m 689.76 488.50 l S
+Q
+endstream
+endobj
+7 0 obj
+4720
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+]
+/Count 1
+/MediaBox [0 0 720 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font << /F1 9 0 R /F2 10 0 R /F3 11 0 R >>
+/ExtGState << >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+9 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/Name /F1
+/BaseFont /ZapfDingbats
+>>
+endobj
+10 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 8 0 R
+>> endobj
+11 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 8 0 R
+>> endobj
+xref
+0 12
+0000000000 65535 f
+0000000021 00000 n
+0000000164 00000 n
+0000005086 00000 n
+0000005169 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000005066 00000 n
+0000005273 00000 n
+0000005530 00000 n
+0000005613 00000 n
+0000005710 00000 n
+trailer
+<<
+/Size 12
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+5812
+%%EOF
Binary file test-data/rgtestouts/rgQC/tinywga_missfrac_cum.jpg has changed
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/tinywga_logphweunaff_cum.pdf
@@ -0,0 +1,314 @@
+%PDF-1.4
+%���ρ�\r
+1 0 obj
+<<
+/CreationDate (D:20100519151538)
+/ModDate (D:20100519151538)
+/Title (R Graphics Output)
+/Producer (R 2.10.1)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+q
+Q q 59.04 73.44 630.72 443.52 re W n
+0.690 0.188 0.376 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 664.03 498.46 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 639.70 311.22 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 615.36 304.97 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 591.03 304.97 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 566.70 304.97 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 542.36 284.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 518.03 284.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 493.70 284.43 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 469.36 261.19 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 445.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 420.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 396.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 372.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 347.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 323.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 299.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 274.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 250.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 226.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 201.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 177.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 153.03 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 128.70 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 104.36 87.79 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 5.98 0 0 5.98 80.03 87.79 Tm (l) Tj 0 Tr
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+118.90 73.44 m 666.40 73.44 l S
+118.90 73.44 m 118.90 66.24 l S
+179.73 73.44 m 179.73 66.24 l S
+240.57 73.44 m 240.57 66.24 l S
+301.40 73.44 m 301.40 66.24 l S
+362.23 73.44 m 362.23 66.24 l S
+423.07 73.44 m 423.07 66.24 l S
+483.90 73.44 m 483.90 66.24 l S
+544.73 73.44 m 544.73 66.24 l S
+605.57 73.44 m 605.57 66.24 l S
+666.40 73.44 m 666.40 66.24 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 12.00 0.00 -0.00 12.00 112.23 47.52 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 173.06 47.52 Tm (20) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 233.89 47.52 Tm (30) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 294.73 47.52 Tm (40) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 355.56 47.52 Tm (50) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 416.39 47.52 Tm (60) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 477.23 47.52 Tm (70) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 538.06 47.52 Tm (80) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 598.89 47.52 Tm (90) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 656.39 47.52 Tm (100) Tj
+ET
+59.04 89.87 m 59.04 479.32 l S
+59.04 89.87 m 51.84 89.87 l S
+59.04 145.50 m 51.84 145.50 l S
+59.04 201.14 m 51.84 201.14 l S
+59.04 256.78 m 51.84 256.78 l S
+59.04 312.41 m 51.84 312.41 l S
+59.04 368.05 m 51.84 368.05 l S
+59.04 423.68 m 51.84 423.68 l S
+59.04 479.32 m 51.84 479.32 l S
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 78.19 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 133.83 Tm (0.05) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 189.46 Tm (0.10) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 245.10 Tm (0.15) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 300.74 Tm (0.20) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 356.37 Tm (0.25) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 412.01 Tm (0.30) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 467.64 Tm (0.35) Tj
+ET
+59.04 73.44 m
+689.76 73.44 l
+689.76 516.96 l
+59.04 516.96 l
+59.04 73.44 l
+S
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 248.46 541.45 Tm [(QC f) 20 (or tin) 20 (ywga - Ranked Marker HWE)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 326.02 18.72 Tm [(Sample P) 50 (ercentile)] TJ
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 221.51 Tm (Ordered log\(p\) HWE \(unaff\)) Tj
+ET
+Q q 59.04 73.44 630.72 443.52 re W n
+0.827 0.827 0.827 RG
+0.75 w
+[ 0.00 4.00] 0 d
+1 J
+1 j
+10.00 M
+118.90 73.44 m 118.90 516.96 l S
+179.73 73.44 m 179.73 516.96 l S
+240.57 73.44 m 240.57 516.96 l S
+301.40 73.44 m 301.40 516.96 l S
+362.23 73.44 m 362.23 516.96 l S
+423.07 73.44 m 423.07 516.96 l S
+483.90 73.44 m 483.90 516.96 l S
+544.73 73.44 m 544.73 516.96 l S
+605.57 73.44 m 605.57 516.96 l S
+666.40 73.44 m 666.40 516.96 l S
+59.04 89.87 m 689.76 89.87 l S
+59.04 145.50 m 689.76 145.50 l S
+59.04 201.14 m 689.76 201.14 l S
+59.04 256.78 m 689.76 256.78 l S
+59.04 312.41 m 689.76 312.41 l S
+59.04 368.05 m 689.76 368.05 l S
+59.04 423.68 m 689.76 423.68 l S
+59.04 479.32 m 689.76 479.32 l S
+Q
+endstream
+endobj
+7 0 obj
+4570
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+]
+/Count 1
+/MediaBox [0 0 720 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font << /F1 9 0 R /F2 10 0 R /F3 11 0 R >>
+/ExtGState << >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+9 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/Name /F1
+/BaseFont /ZapfDingbats
+>>
+endobj
+10 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 8 0 R
+>> endobj
+11 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 8 0 R
+>> endobj
+xref
+0 12
+0000000000 65535 f
+0000000021 00000 n
+0000000164 00000 n
+0000004936 00000 n
+0000005019 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000004916 00000 n
+0000005123 00000 n
+0000005380 00000 n
+0000005463 00000 n
+0000005560 00000 n
+trailer
+<<
+/Size 12
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+5662
+%%EOF
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/Ranked_Marker_Missing_Genotype.xls
@@ -0,0 +1,11 @@
+snp chromosome offset maf a1 a2 missfrac p_hwe_all logp_hwe_all p_hwe_unaff logp_hwe_unaff N_Mendel
+rs12160770 22 21892925 0.01923 1 3 0.075 1 0 1 0 0
+rs5751611 22 21896019 0.4615 2 4 0.025 0.4275 0.369064 0.4275 0.369064 0
+rs5759636 22 21868698 0.07407 4 2 0.025 1 0 1 0 0
+rs3788347 22 21797804 0.463 3 1 0 1 0 1 0 0
+rs4820537 22 21794810 0.4444 1 3 0 0.6985 0.155834 0.6985 0.155834 0
+rs5759612 22 21833170 0.4259 3 1 0 1 0 1 0 0
+rs5759608 22 21832708 0.4259 2 4 0 1 0 1 0 0
+rs2267000 22 21785366 0.4259 4 2 0 1 0 1 0 0
+rs4822375 22 21905642 0.3333 1 3 0 0.6657 0.176721 0.6657 0.176721 0
+rs2156921 22 21899063 0.3333 3 1 0 0.6657 0.176721 0.6657 0.176721 0
Binary file test-data/rgtestouts/rgQC/tinywga_All_Paged-5.jpg has changed
--- /dev/null
+++ b/test-data/rgtestouts/rgQC/tinywga_logphweunaff.pdf
@@ -0,0 +1,303 @@
+%PDF-1.4
+%���ρ�\r
+1 0 obj
+<<
+/CreationDate (D:20100519151538)
+/ModDate (D:20100519151538)
+/Title (R Graphics Output)
+/Producer (R 2.10.1)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+q
+Q q 0.00 0.00 540.00 576.00 re W n
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 10.00 0.00 -0.00 10.00 208.99 552.93 Tm [(QC f) 20 (or tin) 20 (ywga - Marker HWE)] TJ
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 246.16 12.36 Tm (log\(p\) HWE \(unaff\)) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 8.55 273.86 Tm (Frequency) Tj
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+56.78 48.47 m 417.95 48.47 l S
+56.78 48.47 m 56.78 43.72 l S
+177.17 48.47 m 177.17 43.72 l S
+297.56 48.47 m 297.56 43.72 l S
+417.95 48.47 m 417.95 43.72 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 8.00 0.00 -0.00 8.00 51.22 31.36 Tm (0.0) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 171.61 31.36 Tm (0.1) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 292.00 31.36 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 412.39 31.36 Tm (0.3) Tj
+ET
+38.97 66.57 m 38.97 490.67 l S
+38.97 66.57 m 34.21 66.57 l S
+38.97 207.93 m 34.21 207.93 l S
+38.97 349.30 m 34.21 349.30 l S
+38.97 490.67 m 34.21 490.67 l S
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 64.34 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 205.71 Tm (5) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 344.85 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 27.56 486.22 Tm (15) Tj
+ET
+Q q 38.97 48.47 481.08 488.56 re W n
+0.690 0.188 0.376 rg
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+56.78 66.57 6.02 452.37 re B
+62.80 66.57 6.02 0.00 re B
+68.82 66.57 6.02 0.00 re B
+74.84 66.57 6.02 0.00 re B
+80.86 66.57 6.02 0.00 re B
+86.88 66.57 6.02 0.00 re B
+92.90 66.57 6.02 0.00 re B
+98.92 66.57 6.02 0.00 re B
+104.94 66.57 6.02 0.00 re B
+110.96 66.57 6.02 0.00 re B
+116.98 66.57 6.02 0.00 re B
+123.00 66.57 6.02 0.00 re B
+129.02 66.57 6.02 0.00 re B
+135.04 66.57 6.02 0.00 re B
+141.06 66.57 6.02 0.00 re B
+147.08 66.57 6.02 0.00 re B
+153.10 66.57 6.02 0.00 re B
+159.11 66.57 6.02 0.00 re B
+165.13 66.57 6.02 0.00 re B
+171.15 66.57 6.02 0.00 re B
+177.17 66.57 6.02 0.00 re B
+183.19 66.57 6.02 0.00 re B
+189.21 66.57 6.02 0.00 re B
+195.23 66.57 6.02 0.00 re B
+201.25 66.57 6.02 0.00 re B
+207.27 66.57 6.02 0.00 re B
+213.29 66.57 6.02 0.00 re B
+219.31 66.57 6.02 0.00 re B
+225.33 66.57 6.02 0.00 re B
+231.35 66.57 6.02 0.00 re B
+237.37 66.57 6.02 0.00 re B
+243.39 66.57 6.02 28.27 re B
+249.41 66.57 6.02 0.00 re B
+255.43 66.57 6.02 0.00 re B
+261.45 66.57 6.02 0.00 re B
+267.47 66.57 6.02 84.82 re B
+273.48 66.57 6.02 0.00 re B
+279.50 66.57 6.02 0.00 re B
+285.52 66.57 6.02 0.00 re B
+291.54 66.57 6.02 84.82 re B
+297.56 66.57 6.02 28.27 re B
+303.58 66.57 6.02 0.00 re B
+309.60 66.57 6.02 0.00 re B
+315.62 66.57 6.02 0.00 re B
+321.64 66.57 6.02 0.00 re B
+327.66 66.57 6.02 0.00 re B
+333.68 66.57 6.02 0.00 re B
+339.70 66.57 6.02 0.00 re B
+345.72 66.57 6.02 0.00 re B
+351.74 66.57 6.02 0.00 re B
+357.76 66.57 6.02 0.00 re B
+363.78 66.57 6.02 0.00 re B
+369.80 66.57 6.02 0.00 re B
+375.82 66.57 6.02 0.00 re B
+381.83 66.57 6.02 0.00 re B
+387.85 66.57 6.02 0.00 re B
+393.87 66.57 6.02 0.00 re B
+399.89 66.57 6.02 0.00 re B
+405.91 66.57 6.02 0.00 re B
+411.93 66.57 6.02 0.00 re B
+417.95 66.57 6.02 0.00 re B
+423.97 66.57 6.02 0.00 re B
+429.99 66.57 6.02 0.00 re B
+436.01 66.57 6.02 0.00 re B
+442.03 66.57 6.02 0.00 re B
+448.05 66.57 6.02 0.00 re B
+454.07 66.57 6.02 0.00 re B
+460.09 66.57 6.02 0.00 re B
+466.11 66.57 6.02 0.00 re B
+472.13 66.57 6.02 0.00 re B
+478.15 66.57 6.02 0.00 re B
+484.17 66.57 6.02 0.00 re B
+490.19 66.57 6.02 0.00 re B
+496.20 66.57 6.02 28.27 re B
+Q q 578.97 48.47 121.08 488.56 re W n
+Q q 578.97 48.47 121.08 488.56 re W n
+0.690 0.188 0.376 rg
+ 617.08 66.57 m
+ 661.93 66.57 l
+ 661.93 283.18 l
+ 617.08 283.18 l
+h f
+0.000 0.000 0.000 RG
+2.25 w
+[] 0 d
+0 J
+1 j
+10.00 M
+617.08 66.57 m 661.93 66.57 l S
+0.75 w
+[ 3.00 5.00] 0 d
+1 J
+639.50 66.57 m 639.50 66.57 l S
+639.50 518.94 m 639.50 283.18 l S
+0.75 w
+[] 0 d
+628.29 66.57 m 650.71 66.57 l S
+628.29 518.94 m 650.71 518.94 l S
+617.08 66.57 m
+661.93 66.57 l
+661.93 283.18 l
+617.08 283.18 l
+617.08 66.57 l
+S
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+578.97 66.57 m 578.97 434.28 l S
+578.97 66.57 m 574.21 66.57 l S
+578.97 189.14 m 574.21 189.14 l S
+578.97 311.71 m 574.21 311.71 l S
+578.97 434.28 m 574.21 434.28 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 61.01 Tm (0.0) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 183.58 Tm (0.1) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 306.15 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 0.00 8.00 -8.00 0.00 567.56 428.72 Tm (0.3) Tj
+ET
+Q q 540.00 0.00 180.00 576.00 re W n
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+578.97 48.47 m
+700.04 48.47 l
+700.04 537.03 l
+578.97 537.03 l
+578.97 48.47 l
+S
+Q
+endstream
+endobj
+7 0 obj
+4526
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+]
+/Count 1
+/MediaBox [0 0 720 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font <</F2 9 0 R /F3 10 0 R >>
+/ExtGState << >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+9 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 8 0 R
+>> endobj
+10 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 8 0 R
+>> endobj
+xref
+0 11
+0000000000 65535 f
+0000000021 00000 n
+0000000164 00000 n
+0000004892 00000 n
+0000004975 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000004872 00000 n
+0000005067 00000 n
+0000005324 00000 n
+0000005420 00000 n
+trailer
+<<
+/Size 11
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+5522
+%%EOF
1
0
galaxy-dist commit 2ba0fe1297a8: lims : UI improvements to the request info page
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1283372432 14400
# Node ID 2ba0fe1297a8a31f99c412f05046ec7c2f749798
# Parent 12c032ebc303060b838448ad8f6e0da96cacb631
lims : UI improvements to the request info page
--- a/lib/galaxy/web/controllers/requests_common.py
+++ b/lib/galaxy/web/controllers/requests_common.py
@@ -1138,17 +1138,6 @@ class RequestsCommon( BaseController, Us
request = trans.sa_session.query( trans.app.model.Request ).get( id )
# list of widgets to be rendered on the request form
request_details = []
- # main details
- request_details.append(dict(label='Description',
- value=request.desc,
- helptext=''))
- request_details.append(dict(label='Date created',
- value=request.create_time,
- helptext=''))
- request_details.append(dict(label='Date updated',
- value=request.update_time,
- helptext=''))
-
# form fields
for index, field in enumerate(request.type.request_form.fields):
if field['required']:
--- a/templates/requests/common/show_request.mako
+++ b/templates/requests/common/show_request.mako
@@ -225,6 +225,15 @@ function showContent(vThis)
<tbody><tr><td valign="top" width="50%">
+ <div class="form-row">
+ <label>Description:</label>
+ %if request.desc:
+ ${request.desc}
+ %else:
+ <i>None</i>
+ %endif
+ </div>
+ <div style="clear: both"></div>
%for index, rd in enumerate(request_details):
<div class="form-row"><label>${rd['label']}:</label>
@@ -242,6 +251,14 @@ function showContent(vThis)
%endfor
</td><td valign="top" width="50%">
+ <div class="form-row">
+ <label>Date created:</label>
+ ${request.create_time}
+ </div>
+ <div class="form-row">
+ <label>Date updated:</label>
+ ${request.update_time}
+ </div><div class="form-row"><label>Email notification recipient(s):</label><% emails = ', '.join(request.notification['email']) %>
1
0
galaxy-dist commit f205636ed466: Improved error checking for condition provided to tool 'gff_filter_by_feature_count.
by commits-noreply@bitbucket.org 08 Sep '10
by commits-noreply@bitbucket.org 08 Sep '10
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1283373340 14400
# Node ID f205636ed466f490a081681e76b23196dbc80e7c
# Parent 2ba0fe1297a8a31f99c412f05046ec7c2f749798
Improved error checking for condition provided to tool 'gff_filter_by_feature_count.
--- a/tools/filters/gff/gff_filter_by_feature_count.py
+++ b/tools/filters/gff/gff_filter_by_feature_count.py
@@ -11,14 +11,25 @@ from galaxy.tools.util.gff_util import p
assert sys.version_info[:2] >= ( 2, 4 )
+# Valid operators, ordered so that complex operators (e.g. '>=') are
+# recognized before simple operators (e.g. '>')
+ops = [
+ '>=',
+ '<=',
+ '<',
+ '>',
+ '==',
+ '!='
+]
+
# Escape sequences for valid operators.
mapped_ops = {
- '__lt__': '<',
- '__le__': '<=',
- '__eq__': '==',
- '__ne__': '!=',
- '__gt__': '>',
- '__ge__': '>=',
+ '__ge__': ops[0],
+ '__le__': ops[1],
+ '__lt__': ops[2],
+ '__gt__': ops[3],
+ '__eq__': ops[4],
+ '__ne__': ops[5],
}
@@ -34,7 +45,7 @@ def __main__():
condition = condition.replace( key, value )
# Error checking: condition should be of the form <operator><number>
- for op in mapped_ops.itervalues():
+ for op in ops:
if op in condition:
empty, number_str = condition.split( op )
try:
@@ -44,6 +55,7 @@ def __main__():
if empty != "" or not number:
print >> sys.stderr, "Invalid condition: %s, cannot filter." % condition
return
+ break
# Do filtering.
kept_lines = 0
1
0
08 Sep '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1283369397 14400
# Node ID eb75925d4b9705ab8722cab41c321bf15a4b2359
# Parent e37392b073d89af5aea5e6206e9827ea6ad3f190
lims: find samples
- bug fix: filtering results by only one state is working
- UI improvements
--- a/templates/requests/common/find.mako
+++ b/templates/requests/common/find.mako
@@ -83,18 +83,19 @@
</div>
%if results:
<div class="form-row">
- <label><i>${results}</i></label>
- <div class="toolParamHelp" style="clear: both;">
- The search results are sorted by the date the samples where created.
- </div>
+ <label><i>${results}</i></label>
+ %if samples:
+ <div class="toolParamHelp" style="clear: both;">
+ The search results are sorted by the date the samples where created.
+ </div>
+ %endif
</div>
%endif
<div class="form-row">
%if samples:
%for s in samples:
<div class="form-row">
-
- Sample: ${s.name} | Barcode: ${s.bar_code}<br/>
+ Sample: <b>${s.name}</b> | Barcode: ${s.bar_code}<br/>
State: ${s.current_state().name}<br/>
Datasets: <a href="${h.url_for(controller='requests_common', cntrller=cntrller, action='show_datatx_page', sample_id=trans.security.encode_id(s.id))}">${s.transferred_dataset_files()}/${len(s.datasets)}</a><br/>
%if cntrller == 'requests_admin':
@@ -103,7 +104,6 @@
<div class="toolParamHelp" style="clear: both;"><a href="${h.url_for( controller=cntrller, action='list', operation='show', id=trans.security.encode_id(s.request.id))}">Sequencing request: ${s.request.name} | Type: ${s.request.type.name} | State: ${s.request.state()}</a></div>
-
</div><br/>
%endfor
--- a/lib/galaxy/web/controllers/requests_common.py
+++ b/lib/galaxy/web/controllers/requests_common.py
@@ -1287,7 +1287,7 @@ class RequestsCommon( BaseController, Us
if params.get('go_button', '') == 'Find':
search_string = kwd.get( 'search_box', '' )
search_type = params.get( 'search_type', '' )
- request_states = params.get( 'request_states', '' )
+ request_states = util.listify( params.get( 'request_states', '' ) )
samples = []
if search_type == 'barcode':
samples = trans.sa_session.query( trans.app.model.Sample ) \
1
0