galaxy-commits
Threads by month
- ----- 2025 -----
- June
- May
- April
- March
- February
- January
- ----- 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

commit/galaxy-central: jgoecks: Fix bugs in reading and visualizing GFF3 datasets.
by Bitbucket 27 May '11
by Bitbucket 27 May '11
27 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/217a5c1f12bc/
changeset: 217a5c1f12bc
branches:
user: jgoecks
date: 2011-05-28 01:07:06
summary: Fix bugs in reading and visualizing GFF3 datasets.
affected #: 1 file (496 bytes)
--- a/lib/galaxy/datatypes/util/gff_util.py Fri May 27 09:22:27 2011 -0400
+++ b/lib/galaxy/datatypes/util/gff_util.py Sat May 28 01:07:06 2011 +0200
@@ -67,11 +67,18 @@
def name( self ):
""" Returns feature's name. """
- name = self.attributes.get( 'transcript_id', None )
- if not name:
- name = self.attributes.get( 'id', None )
- if not name:
- name = self.attributes.get( 'group', None )
+ name = None
+ # Preference for name: GTF, GFF3, GFF.
+ for attr_name in [
+ # GTF:
+ 'transcript_id', 'gene_id',
+ # GFF3:
+ 'ID', 'id',
+ # GFF (TODO):
+ 'group' ]:
+ name = self.attributes.get( attr_name, None )
+ if name is not None:
+ break
return name
def copy( self ):
@@ -172,11 +179,14 @@
self.seed_interval = None
return return_val
- # Initialize feature name from seed.
+ # Initialize feature identifier from seed.
feature_group = self.seed_interval.attributes.get( 'group', None ) # For GFF
- feature_id = self.seed_interval.attributes.get( 'ID', None ) # For GFF3
- feature_gene_id = self.seed_interval.attributes.get( 'gene_id', None ) # For GTF
- feature_transcript_id = self.seed_interval.attributes.get( 'transcript_id', None ) # For GTF
+ # For GFF3
+ feature_id = self.seed_interval.attributes.get( 'ID', None )
+ feature_parent_id = self.seed_interval.attributes.get( 'Parent', None )
+ # For GTF.
+ feature_gene_id = self.seed_interval.attributes.get( 'gene_id', None )
+ feature_transcript_id = self.seed_interval.attributes.get( 'transcript_id', None )
# Read all intervals associated with seed.
feature_intervals = []
@@ -205,8 +215,9 @@
if group and feature_group != group:
break
# GFF3 test:
- parent = interval.attributes.get( 'Parent', None )
- if feature_id and feature_id != parent:
+ parent_id = interval.attributes.get( 'Parent', None )
+ cur_id = interval.attributes.get( 'ID', None )
+ if feature_id and parent_id != feature_parent_id and feature_id != cur_id:
break
# GTF test:
gene_id = interval.attributes.get( 'gene_id', None )
@@ -230,7 +241,7 @@
# Convert to BED coords?
if self.convert_to_bed_coord:
convert_gff_coords_to_bed( feature )
-
+
return feature
@@ -280,10 +291,11 @@
attributes_list = attr_str.split(";")
attributes = {}
for name_value_pair in attributes_list:
- # Try splitting by space and, if necessary, by '=' sign.
- pair = name_value_pair.strip().split(" ")
+ # Try splitting by '=' (GFF3) first because spaces are allowed in GFF3
+ # attribute; next, try double quotes for GTF.
+ pair = name_value_pair.strip().split("=")
if len( pair ) == 1:
- pair = name_value_pair.strip().split("=")
+ pair = name_value_pair.strip().split("\"")
if len( pair ) == 1:
# Could not split for some reason -- raise exception?
continue
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: richard_burhans: Updated help text for genome diversity tools
by Bitbucket 27 May '11
by Bitbucket 27 May '11
27 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/3e7f7c40b4fe/
changeset: 3e7f7c40b4fe
branches:
user: richard_burhans
date: 2011-05-27 15:22:27
summary: Updated help text for genome diversity tools
affected #: 3 files (501 bytes)
--- a/tools/genome_diversity/extract_flanking_dna.xml Fri May 27 11:19:16 2011 +0200
+++ b/tools/genome_diversity/extract_flanking_dna.xml Fri May 27 09:22:27 2011 -0400
@@ -54,7 +54,9 @@
<help>
**What it does**
- If extracts flanking dna for the SNPs in the dataset.
+ It reports a DNA segment containing each SNP, with up to 200 nucleotides on
+ either side of the SNP position, which is indicated by "n". Fewer nucleotides
+ are reported if the SNP is near an end of the assembled genome fragment.
-----
--- a/tools/genome_diversity/select_restriction_enzymes.xml Fri May 27 11:19:16 2011 +0200
+++ b/tools/genome_diversity/select_restriction_enzymes.xml Fri May 27 09:22:27 2011 -0400
@@ -57,7 +57,9 @@
<help>
**What it does**
- It selects SNPs in the dataset by restriction enzyme.
+ It selects the SNPs that are differentially cut by at least one of the
+ specified restriction enzymes. The enzymes are required to cut the amplified
+ segment (for the specified PCR primers) only at the SNP.
-----
--- a/tools/genome_diversity/select_snps.xml Fri May 27 11:19:16 2011 +0200
+++ b/tools/genome_diversity/select_snps.xml Fri May 27 09:22:27 2011 -0400
@@ -51,7 +51,9 @@
<help>
**What it does**
- If selects a specified number of SNPs from the dataset.
+ It attempts to select a specified number of SNPs from the dataset, making them
+ approximately uniformly spaced relative to the reference genome. The number
+ actually selected may be slightly more than the specified number.
-----
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/9dcd437dfc98/
changeset: 9dcd437dfc98
branches:
user: kanwei
date: 2011-05-27 11:19:16
summary: Fix brand not being clickable
affected #: 1 file (15 bytes)
--- a/templates/webapps/galaxy/base_panels.mako Fri May 27 11:01:46 2011 +0200
+++ b/templates/webapps/galaxy/base_panels.mako Fri May 27 11:19:16 2011 +0200
@@ -7,9 +7,9 @@
<%def name="masthead()">
## Tab area, fills entire width
- <div style="position: absolute; top: 0; left: 0; width: 100%; text-align: center">
+ <div style="position: relative; right: -50%; float: left; text-align: center;">
- <table class="tab-group" border="0" cellspacing="0" style="margin: auto;">
+ <table class="tab-group" border="0" cellspacing="0" style="position: relative; right: 50%;"><tr><%def name="tab( id, display, href, target='_parent', visible=True, extra_class='', menu_options=None )">
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: kanwei: Velvet wrapper: fix typos, tabs -> spaces, spacing
by Bitbucket 27 May '11
by Bitbucket 27 May '11
27 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/68c34a8bd236/
changeset: 68c34a8bd236
branches:
user: kanwei
date: 2011-05-27 11:01:46
summary: Velvet wrapper: fix typos, tabs -> spaces, spacing
affected #: 2 files (1.2 KB)
--- a/tools/sr_assembly/velvetg.xml Fri May 27 10:47:17 2011 +0200
+++ b/tools/sr_assembly/velvetg.xml Fri May 27 11:01:46 2011 +0200
@@ -1,7 +1,7 @@
<tool id="velvetg" name="velvetg" version="1.0.0">
- <description>Velvet sequence assembler for very short reads</description>
- <command interpreter="python">
- velvetg_wrapper.py
+ <description>Velvet sequence assembler for very short reads</description>
+ <command interpreter="python">
+ velvetg_wrapper.py
'$input.extra_files_path'
'$contigs' '$stats' '$LastGraph' '$velvet_asm' '$unused_reads_fasta'
#if $generate_amos.afg == "yes":
@@ -65,159 +65,159 @@
$reads.options.scaffolding
#end if
#end if
- </command>
- <inputs>
- <param name="input" type="data" format="velvet" label="Velvet Dataset" help="Prepared by velveth."/>
- <conditional name="generate_amos">
- <param name="afg" type="select" label="Generate a AMOS.afg file">
- <option value="no">No</option>
- <option value="yes">Yes</option>
- </param>
- <when value="no"/>
- <when value="yes"/>
- </conditional>
+ </command>
+ <inputs>
+ <param name="input" type="data" format="velvet" label="Velvet Dataset" help="Prepared by velveth."/>
+ <conditional name="generate_amos">
+ <param name="afg" type="select" label="Generate a AMOS.afg file">
+ <option value="no">No</option>
+ <option value="yes">Yes</option>
+ </param>
+ <when value="no"/>
+ <when value="yes"/>
+ </conditional>
- <conditional name="unused_reads">
- <param name="generate_unused" type="select" label="Generate a UnusedReads fasta file">
- <option value="no">No</option>
- <option value="yes">Yes</option>
- </param>
- <when value="no"/>
- <when value="yes"/>
- </conditional>
+ <conditional name="unused_reads">
+ <param name="generate_unused" type="select" label="Generate a UnusedReads fasta file">
+ <option value="no">No</option>
+ <option value="yes">Yes</option>
+ </param>
+ <when value="no"/>
+ <when value="yes"/>
+ </conditional>
- <conditional name="last_graph">
- <param name="generate_graph" type="select" label="Generate velvet LastGraph file">
- <option value="no">No</option>
- <option value="yes">Yes</option>
- </param>
- <when value="no"/>
- <when value="yes"/>
- </conditional>
+ <conditional name="last_graph">
+ <param name="generate_graph" type="select" label="Generate velvet LastGraph file">
+ <option value="no">No</option>
+ <option value="yes">Yes</option>
+ </param>
+ <when value="no"/>
+ <when value="yes"/>
+ </conditional>
- <param name="read_trkg" type="boolean" checked="false" truevalue="-read_trkg yes" falsevalue="-read_trkg no" label="track short read positions" help=" tracking of short read positions in assembly"/>
+ <param name="read_trkg" type="boolean" checked="false" truevalue="-read_trkg yes" falsevalue="-read_trkg no" label="track short read positions" help=" tracking of short read positions in assembly"/>
- <conditional name="coverage">
- <param name="cutoff" type="select" label="Coverage cutoff" help="">
- <option value="none">None</option>
- <option value="auto">Automatically Determined</option>
- <option value="value">Specify Cutoff Value</option>
- </param>
- <when value="none"/>
- <when value="auto"/>
- <when value="value">
- <param name="cov_cutoff" value = "10.0" label="Remove nodes with coverage below" type="float" />
- </when>
- </conditional>
+ <conditional name="coverage">
+ <param name="cutoff" type="select" label="Coverage cutoff" help="">
+ <option value="none">None</option>
+ <option value="auto">Automatically Determined</option>
+ <option value="value">Specify Cutoff Value</option>
+ </param>
+ <when value="none"/>
+ <when value="auto"/>
+ <when value="value">
+ <param name="cov_cutoff" value = "10.0" label="Remove nodes with coverage below" type="float" />
+ </when>
+ </conditional>
- <conditional name="expected">
- <param name="coverage" type="select" label="Expected Coverage of Unique Regions" help="">
- <option value="none">None</option>
- <option value="auto">Automatically Determined</option>
- <option value="value">Specify Expected Value</option>
- </param>
- <when value="none"/>
- <when value="auto"/>
- <when value="value">
- <param name="exp_cov" value = "10.0" label="Remove nodes with coverage below" type="float" />
- </when>
- </conditional>
+ <conditional name="expected">
+ <param name="coverage" type="select" label="Expected Coverage of Unique Regions" help="">
+ <option value="none">None</option>
+ <option value="auto">Automatically Determined</option>
+ <option value="value">Specify Expected Value</option>
+ </param>
+ <when value="none"/>
+ <when value="auto"/>
+ <when value="value">
+ <param name="exp_cov" value = "10.0" label="Remove nodes with coverage below" type="float" />
+ </when>
+ </conditional>
- <conditional name="contig_lgth">
- <param name="use_contig_lgth" type="select" label=" Set minimum contig length" help="minimum contig length exported to contigs.fa file (default: hash length * 2).">
- <option value="no">No</option>
- <option value="yes">Yes</option>
+ <conditional name="contig_lgth">
+ <param name="use_contig_lgth" type="select" label=" Set minimum contig length" help="minimum contig length exported to contigs.fa file (default: hash length * 2).">
+ <option value="no">No</option>
+ <option value="yes">Yes</option>
+ </param>
+ <when value="no"/>
+ <when value="yes">
+ <param name="min_contig_lgth" value = "42" label="minimum contig length" type="integer" help="minimum contig length exported to contigs.fa file (default: hash length * 2)"/>
+ </when>
+ </conditional>
+
+ <conditional name="reads">
+ <param name="paired" type="select" label="Using Paired Reads">
+ <option value="no">No</option>
+ <option value="yes" selected="${input.metadata.paired_end_reads}">Yes</option>
+ </param>
+ <when value="no"/>
+ <when value="yes">
+ <param name="ins_length" value = "-1" label="Insert Length in Paired-End Read dataset (ignored when -1)" type="integer" help="Expected distance between two paired end reads"/>
+ <conditional name="options">
+ <param name="advanced" type="select" label="Velvet Advanced Options">
+ <option value="no">Use Defaults</option>
+ <option value="yes">Set Advanced Option Values</option></param><when value="no"/><when value="yes">
- <param name="min_contig_lgth" value = "42" label="minimum contig length" type="integer" help="minimum contig length exported to contigs.fa file (default: hash length * 2)"/>
- </when>
- </conditional>
-
- <conditional name="reads">
- <param name="paired" type="select" label="Using Paired Reads">
- <option value="no">No</option>
- <option value="yes" selected="${input.metadata.paired_end_reads}">Yes</option>
- </param>
- <when value="no"/>
- <when value="yes">
- <param name="ins_length" value = "-1" label="Insert Length in Paired-End Read dataset (ignored when -1)" type="integer" help="Expected distance between two paired end reads"/>
- <conditional name="options">
- <param name="advanced" type="select" label="Velvet Advanced Options">
- <option value="no">Use Defaults</option>
- <option value="yes">Set Advanced Option Values</option>
- </param>
- <when value="no"/>
- <when value="yes">
- <param name="ins_length_sd" value = "-1" label="Estimate of Standard Deviation of Paired-End Read dataset(ignored when -1)" type="integer" help="Estimate of standard deviation of Paired-End Read dataset (default: 10% of corresponding length)"/>
- <param name="ins_length2" value = "-1" label="Insert Length in 2nd Paired-End Short Read dataset (ignored when -1)" type="integer" help="Expected distance between two paired end reads in the second short-read dataset"/>
- <param name="ins_length2_sd" value = "-1" label="Estimate of Standard Deviation of 2nd Paired-End Read dataset (ignored when -1)" type="integer" help="Estimate of standard deviation of 2nd Paired-End Read dataset (default: 10% of corresponding length)"/>
- <param name="ins_length_long" value = "-1" label="Insert Length in Long Paired-End Read dataset (ignored when -1)" type="integer" help="Expected distance between two long paired-end reads"/>
- <param name="ins_length_long_sd" value = "-1" label="Estimate of Standard Deviation of 2nd Paired-End Read dataset (ignored when -1)" type="integer" help="Estimate of standard deviation of Long Paired-End Read dataset (default: 10% of corresponding length)"/>
- <param name="max_branch_length" value = "-1" label="Maximum branch length (ignored when -1)" type="integer" help="maximum length in base pair of bubble (default: 100)"/>
- <param name="max_divergence" value = "-1." label="Maximum max_divergence (between .0 and 1., ignored when -1.)" type="float" help="maximum divergence rate between two branches in a bubble (default: .2)"/>
- <param name="max_gap_count" value = "-1" label="Maximum gap count (ignored when -1)" type="integer" help="maximum number of gaps allowed in the alignment of the two branches of a bubble (default: 3)"/>
- <param name="min_pair_count" value = "-1" label="Minimum read-pair count (ignored when -1)" type="integer" help="minimum number of paired end connections to justify the scaffolding of two long contigs (default: 10)"/>
- <param name="max_coverage" value = "-1." label="Maximum coverage exclusion(ignored when -1.)" type="float" help="Exclude data that has coverage more than this maximum coverage value"/>
- <param name="long_mult_cutoff" value = "-1" label="Minimum number of long reads required to merge contigs (ignored when -1)" type="integer" help="minimum number of long reads required to merge contigs (default: 2)"/>
- <param name="scaffolding" type="boolean" checked="true" truevalue="-scaffolding yes" falsevalue="-scaffolding no" label="Use Scaffolding" help="Scaffold contigs that it cannot quite be connected (This results in sequences of Ns in the contigs)"/>
+ <param name="ins_length_sd" value = "-1" label="Estimate of Standard Deviation of Paired-End Read dataset(ignored when -1)" type="integer" help="Estimate of standard deviation of Paired-End Read dataset (default: 10% of corresponding length)"/>
+ <param name="ins_length2" value = "-1" label="Insert Length in 2nd Paired-End Short Read dataset (ignored when -1)" type="integer" help="Expected distance between two paired end reads in the second short-read dataset"/>
+ <param name="ins_length2_sd" value = "-1" label="Estimate of Standard Deviation of 2nd Paired-End Read dataset (ignored when -1)" type="integer" help="Estimate of standard deviation of 2nd Paired-End Read dataset (default: 10% of corresponding length)"/>
+ <param name="ins_length_long" value = "-1" label="Insert Length in Long Paired-End Read dataset (ignored when -1)" type="integer" help="Expected distance between two long paired-end reads"/>
+ <param name="ins_length_long_sd" value = "-1" label="Estimate of Standard Deviation of 2nd Paired-End Read dataset (ignored when -1)" type="integer" help="Estimate of standard deviation of Long Paired-End Read dataset (default: 10% of corresponding length)"/>
+ <param name="max_branch_length" value = "-1" label="Maximum branch length (ignored when -1)" type="integer" help="maximum length in base pair of bubble (default: 100)"/>
+ <param name="max_divergence" value = "-1." label="Maximum max_divergence (between .0 and 1., ignored when -1.)" type="float" help="maximum divergence rate between two branches in a bubble (default: .2)"/>
+ <param name="max_gap_count" value = "-1" label="Maximum gap count (ignored when -1)" type="integer" help="maximum number of gaps allowed in the alignment of the two branches of a bubble (default: 3)"/>
+ <param name="min_pair_count" value = "-1" label="Minimum read-pair count (ignored when -1)" type="integer" help="minimum number of paired end connections to justify the scaffolding of two long contigs (default: 10)"/>
+ <param name="max_coverage" value = "-1." label="Maximum coverage exclusion(ignored when -1.)" type="float" help="Exclude data that has coverage more than this maximum coverage value"/>
+ <param name="long_mult_cutoff" value = "-1" label="Minimum number of long reads required to merge contigs (ignored when -1)" type="integer" help="minimum number of long reads required to merge contigs (default: 2)"/>
+ <param name="scaffolding" type="boolean" checked="true" truevalue="-scaffolding yes" falsevalue="-scaffolding no" label="Use Scaffolding" help="Scaffold contigs that it cannot quite be connected (This results in sequences of Ns in the contigs)"/></when>
- </conditional>
- </when>
- </conditional>
- </inputs>
- <outputs>
- <!--
- <data format="velvet_graph" name="LastGraph" />
- -->
- <data format="txt" name="LastGraph" label="${tool.name} on ${on_string}: LastGraph">
- <filter>last_graph['generate_graph'] == "yes"</filter>
- </data>
- <data format="afg" name="velvet_asm" label="${tool.name} on ${on_string}: AMOS.afg">
- <filter>generate_amos['afg'] == "yes"</filter>
- </data>
- <data format="fasta" name="unused_reads_fasta" label="${tool.name} on ${on_string}: Unused Reads">
- <filter>unused_reads['generate_unused'] == "yes"</filter>
- </data>
- <data format="tabular" name="stats" label="${tool.name} on ${on_string}: Stats"/>
- <data format="fasta" name="contigs" label="${tool.name} on ${on_string}: Contigs"/>
- </outputs>
- <requirements>
- <requirement type="package">velvet</requirement>
- </requirements>
- <tests>
- <test>
- <param name="input" value="velveth_test1/output.html" ftype="velvet" >
- <composite_data value='velveth_test1/Sequences' ftype="Sequences"/>
- <composite_data value='velveth_test1/Roadmaps' ftype="Roadmaps"/>
- <composite_data value='velveth_test1/Log'/>
- </param>
- <param name="afg" value="yes" />
- <param name="generate_unused" value="yes" />
- <param name="generate_graph" value="no" />
- <param name="read_trkg" value="-read_trkg no" />
- <param name="cutoff" value="auto" />
- <param name="coverage" value="auto" />
- <param name="use_contig_lgth" value="no" />
- <param name="paired" value="no" />
- <!--
- <output name="LastGraph" file="velvetg_test1/lastgraph.txt" compare="diff"/>
- -->
- <output name="velvet_asm" file="velvetg_test1/amos.afg" compare="diff"/>
- <output name="unused_reads_fasta" file="velvetg_test1/unusedreads.fa" compare="diff"/>
- <output name="stats" file="velvetg_test1/stats.csv" compare="diff"/>
- <output name="contigs" file="velvetg_test1/contigs.fa" compare="diff"/>
- </test>
- </tests>
- <help>
+ </conditional>
+ </when>
+ </conditional>
+ </inputs>
+ <outputs>
+ <!--
+ <data format="velvet_graph" name="LastGraph" />
+ -->
+ <data format="txt" name="LastGraph" label="${tool.name} on ${on_string}: LastGraph">
+ <filter>last_graph['generate_graph'] == "yes"</filter>
+ </data>
+ <data format="afg" name="velvet_asm" label="${tool.name} on ${on_string}: AMOS.afg">
+ <filter>generate_amos['afg'] == "yes"</filter>
+ </data>
+ <data format="fasta" name="unused_reads_fasta" label="${tool.name} on ${on_string}: Unused Reads">
+ <filter>unused_reads['generate_unused'] == "yes"</filter>
+ </data>
+ <data format="tabular" name="stats" label="${tool.name} on ${on_string}: Stats"/>
+ <data format="fasta" name="contigs" label="${tool.name} on ${on_string}: Contigs"/>
+ </outputs>
+ <requirements>
+ <requirement type="package">velvet</requirement>
+ </requirements>
+ <tests>
+ <test>
+ <param name="input" value="velveth_test1/output.html" ftype="velvet" >
+ <composite_data value='velveth_test1/Sequences' ftype="Sequences"/>
+ <composite_data value='velveth_test1/Roadmaps' ftype="Roadmaps"/>
+ <composite_data value='velveth_test1/Log'/>
+ </param>
+ <param name="afg" value="yes" />
+ <param name="generate_unused" value="yes" />
+ <param name="generate_graph" value="no" />
+ <param name="read_trkg" value="-read_trkg no" />
+ <param name="cutoff" value="auto" />
+ <param name="coverage" value="auto" />
+ <param name="use_contig_lgth" value="no" />
+ <param name="paired" value="no" />
+ <!--
+ <output name="LastGraph" file="velvetg_test1/lastgraph.txt" compare="diff"/>
+ -->
+ <output name="velvet_asm" file="velvetg_test1/amos.afg" compare="diff"/>
+ <output name="unused_reads_fasta" file="velvetg_test1/unusedreads.fa" compare="diff"/>
+ <output name="stats" file="velvetg_test1/stats.csv" compare="diff"/>
+ <output name="contigs" file="velvetg_test1/contigs.fa" compare="diff"/>
+ </test>
+ </tests>
+ <help>
**Velvet Overview**
Velvet_ is a de novo genomic assembler specially designed for short read sequencing technologies, such as Solexa or 454, developed by Daniel Zerbino and Ewan Birney at the European Bioinformatics Institute (EMBL-EBI), near Cambridge, in the United Kingdom.
Velvet currently takes in short read sequences, removes errors then produces high quality unique contigs. It then uses paired-end read and long read information, when available, to retrieve the repeated areas between contigs.
-Read the Velvet `documentation`__ for details on using the Vevlet Assembler.
+Read the Velvet `documentation`__ for details on using the Velvet Assembler.
.. _Velvet: http://www.ebi.ac.uk/~zerbino/velvet/
@@ -238,7 +238,7 @@
**Contigs**
The *contigs.fa* file.
-This fasta file contains the sequences of the contigs longer than 2k, where k is the word-length used in velveth. If you have specified a min contig lgth threshold, then the contigs shorter than that value are omitted.
+This fasta file contains the sequences of the contigs longer than 2k, where k is the word-length used in velveth. If you have specified a min contig length threshold, then the contigs shorter than that value are omitted.
Note that the length and coverage information provided in the header of each contig should therefore be understood in k-mers and in k-mer coverage (cf. 5.1) respectively.
The N's in the sequence correspond to gaps between scaffolded contigs. The number of N's corresponds to the estimated length of the gap. For reasons of compatibility with the archives, any gap shorter than 10bp is represented by a sequence of 10 N's.
@@ -297,5 +297,5 @@
directory/LastGraph : special formatted file with all the information on the final graph
directory/velvet_asm.afg : (if requested) AMOS compatible assembly file
- </help>
+ </help></tool>
--- a/tools/sr_assembly/velveth.xml Fri May 27 10:47:17 2011 +0200
+++ b/tools/sr_assembly/velveth.xml Fri May 27 11:01:46 2011 +0200
@@ -1,79 +1,79 @@
<tool id="velveth" name="velveth" version="1.0.0">
- <description>Prepare a dataset for the Velvet velvetg Assembler</description>
- <command interpreter="python">
- velveth_wrapper.py
+ <description>Prepare a dataset for the Velvet velvetg Assembler</description>
+ <command interpreter="python">
+ velveth_wrapper.py
'$out_file1' '$out_file1.extra_files_path'
$hash_length
$strand_specific
#for $i in $inputs
- ${i.file_format}
- ${i.read_type}
- ${i.input}
+ ${i.file_format}
+ ${i.read_type}
+ ${i.input}
#end for
- </command>
- <inputs>
- <param label="Hash Length" name="hash_length" type="select" help="k-mer length in base pairs of the words being hashed.">
- <option value="11">11</option>
- <option value="13">13</option>
- <option value="15">15</option>
- <option value="17">17</option>
- <option value="19">19</option>
- <option value="21" selected="yes">21</option>
- <option value="23">23</option>
- <option value="25">25</option>
- <option value="27">27</option>
- <option value="29">29</option>
- </param>
- <param name="strand_specific" type="boolean" checked="false" truevalue="-strand_specific" falsevalue="" label="Use strand specific transcriptome sequencing" help="If you are using a strand specific transcriptome sequencing protocol, you may wish to use this option for better results."/>
- <repeat name="inputs" title="Input Files">
- <param label="file format" name="file_format" type="select">
- <option value="-fasta" selected="yes">fasta</option>
- <option value="-fastq">fastq</option>
- <option value="-eland">eland</option>
- <option value="-gerald">gerald</option>
- </param>
- <param label="read type" name="read_type" type="select">
- <option value="-short" selected="yes">short reads</option>
- <option value="-shortPaired">shortPaired reads</option>
- <option value="-short2">short2 reads</option>
- <option value="-shortPaired2">shortPaired2 reads</option>
- <option value="-long">long reads</option>
- <option value="-longPaired">longPaired reads</option>
- </param>
+ </command>
+ <inputs>
+ <param label="Hash Length" name="hash_length" type="select" help="k-mer length in base pairs of the words being hashed.">
+ <option value="11">11</option>
+ <option value="13">13</option>
+ <option value="15">15</option>
+ <option value="17">17</option>
+ <option value="19">19</option>
+ <option value="21" selected="yes">21</option>
+ <option value="23">23</option>
+ <option value="25">25</option>
+ <option value="27">27</option>
+ <option value="29">29</option>
+ </param>
+ <param name="strand_specific" type="boolean" checked="false" truevalue="-strand_specific" falsevalue="" label="Use strand specific transcriptome sequencing" help="If you are using a strand specific transcriptome sequencing protocol, you may wish to use this option for better results."/>
+ <repeat name="inputs" title="Input Files">
+ <param label="file format" name="file_format" type="select">
+ <option value="-fasta" selected="yes">fasta</option>
+ <option value="-fastq">fastq</option>
+ <option value="-eland">eland</option>
+ <option value="-gerald">gerald</option>
+ </param>
+ <param label="read type" name="read_type" type="select">
+ <option value="-short" selected="yes">short reads</option>
+ <option value="-shortPaired">shortPaired reads</option>
+ <option value="-short2">short2 reads</option>
+ <option value="-shortPaired2">shortPaired2 reads</option>
+ <option value="-long">long reads</option>
+ <option value="-longPaired">longPaired reads</option>
+ </param>
- <param name="input" type="data" format="fasta,fastq,eland,gerald" label="Dataset"/>
- </repeat>
- </inputs>
- <outputs>
- <data format="velvet" name="out_file1" />
- </outputs>
- <requirements>
- <requirement type="package">velvet</requirement>
- </requirements>
- <tests>
- <test>
- <param name="hash_length" value="21" />
- <param name="read_type" value="-shortPaired" />
- <!-- <repeat name="inputs"> -->
- <param name="file_format" value="fasta" />
- <param name="read_type" value="shortPaired reads" />
- <param name="input" value="velvet_test_reads.fa" ftype="fasta" />
- <!-- </repeat> -->
- <param name="strand_specific" value="" />
- <output name="out_file1" file="velveth_test1/output.html" lines_diff="4">
- <extra_files type="file" name='Sequences' value="velveth_test1/Sequences" compare="diff" />
- <extra_files type="file" name='Roadmaps' value="velveth_test1/Roadmaps" compare="diff" />
- </output>
- </test>
- </tests>
- <help>
+ <param name="input" type="data" format="fasta,fastq,eland,gerald" label="Dataset"/>
+ </repeat>
+ </inputs>
+ <outputs>
+ <data format="velvet" name="out_file1" />
+ </outputs>
+ <requirements>
+ <requirement type="package">velvet</requirement>
+ </requirements>
+ <tests>
+ <test>
+ <param name="hash_length" value="21" />
+ <param name="read_type" value="-shortPaired" />
+ <!-- <repeat name="inputs"> -->
+ <param name="file_format" value="fasta" />
+ <param name="read_type" value="shortPaired reads" />
+ <param name="input" value="velvet_test_reads.fa" ftype="fasta" />
+ <!-- </repeat> -->
+ <param name="strand_specific" value="" />
+ <output name="out_file1" file="velveth_test1/output.html" lines_diff="4">
+ <extra_files type="file" name='Sequences' value="velveth_test1/Sequences" compare="diff" />
+ <extra_files type="file" name='Roadmaps' value="velveth_test1/Roadmaps" compare="diff" />
+ </output>
+ </test>
+ </tests>
+ <help>
**Velvet Overview**
Velvet_ is a de novo genomic assembler specially designed for short read sequencing technologies, such as Solexa or 454, developed by Daniel Zerbino and Ewan Birney at the European Bioinformatics Institute (EMBL-EBI), near Cambridge, in the United Kingdom.
Velvet currently takes in short read sequences, removes errors then produces high quality unique contigs. It then uses paired-end read and long read information, when available, to retrieve the repeated areas between contigs.
-Read the Velvet `documentation`__ for details on using the Vevlet Assembler.
+Read the Velvet `documentation`__ for details on using the Velvet Assembler.
.. _Velvet: http://www.ebi.ac.uk/~zerbino/velvet/
@@ -124,5 +124,5 @@
long (for Sanger, 454 or even reference sequences)
longPaired
- </help>
+ </help></tool>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: kanwei: [Peter Cock] Filtering tool: Only cast used columns. Fix valid lines and skipped info lines. [Kanwei] Add new testcases to test this behavior. Fixes #537. Fixes #535
by Bitbucket 27 May '11
by Bitbucket 27 May '11
27 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/cc686fadddbc/
changeset: cc686fadddbc
branches:
user: kanwei
date: 2011-05-27 10:47:17
summary: [Peter Cock] Filtering tool: Only cast used columns. Fix valid lines and skipped info lines. [Kanwei] Add new testcases to test this behavior. Fixes #537. Fixes #535
affected #: 4 files (364 bytes)
--- a/tools/stats/filtering.py Thu May 26 13:29:00 2011 -0400
+++ b/tools/stats/filtering.py Fri May 27 10:47:17 2011 +0200
@@ -32,7 +32,7 @@
cond_text = sys.argv[3]
try:
in_columns = int( sys.argv[4] )
- assert sys.argv[5] #check to see that the column types varaible isn't null
+ assert sys.argv[5] #check to see that the column types variable isn't null
in_column_types = sys.argv[5].split( ',' )
except:
stop_err( "Data does not appear to be tabular. This tool can only be used with tab-delimited data." )
@@ -60,22 +60,25 @@
except:
if operand in secured:
stop_err( "Illegal value '%s' in condition '%s'" % ( operand, cond_text ) )
-
-# Find the largest column used in the filter.
-largest_col_index = -1
-for match in re.finditer( 'c(\d)+', cond_text ):
- col_index = int( match.group()[1:] )
- if col_index > largest_col_index:
- largest_col_index = col_index
+
+# Work out which columns are used in the filter (save using 1 based counting)
+used_cols = sorted(set(int(match.group()[1:]) \
+ for match in re.finditer('c(\d)+', cond_text)))
+largest_col_index = max(used_cols)
# Prepare the column variable names and wrappers for column data types. Only
-# prepare columns up to largest column in condition.
+# cast columns used in the filter.
cols, type_casts = [], []
for col in range( 1, largest_col_index + 1 ):
col_name = "c%d" % col
cols.append( col_name )
col_type = in_column_types[ col - 1 ]
- type_cast = "%s(%s)" % ( col_type, col_name )
+ if col in used_cols:
+ type_cast = "%s(%s)" % ( col_type, col_name )
+ else:
+ #If we don't use this column, don't cast it.
+ #Otherwise we get errors on things like optional integer columns.
+ type_cast = col_name
type_casts.append( type_cast )
col_str = ', '.join( cols ) # 'c1, c2, c3, c4'
@@ -83,6 +86,7 @@
assign = "%s, = line.split( '\\t' )[:%i]" % ( col_str, largest_col_index )
wrap = "%s = %s" % ( col_str, type_cast_str )
skipped_lines = 0
+invalid_lines = 0
first_invalid_line = 0
invalid_line = None
lines_kept = 0
@@ -96,9 +100,6 @@
line = line.rstrip( '\\r\\n' )
if not line or line.startswith( '#' ):
skipped_lines += 1
- if not invalid_line:
- first_invalid_line = i + 1
- invalid_line = line
continue
try:
%s
@@ -107,7 +108,7 @@
lines_kept += 1
print >> out, line
except:
- skipped_lines += 1
+ invalid_lines += 1
if not invalid_line:
first_invalid_line = i + 1
invalid_line = line
@@ -132,5 +133,7 @@
print 'kept %4.2f%% of %d lines.' % ( 100.0*lines_kept/valid_lines, total_lines )
else:
print 'Possible invalid filter condition "%s" or non-existent column referenced. See tool tips, syntax and examples.' % cond_text
- if skipped_lines > 0:
- print 'Skipped %d invalid lines starting at line #%d: "%s"' % ( skipped_lines, first_invalid_line, invalid_line )
+ if invalid_lines:
+ print 'Skipped %d invalid line(s) starting at line #%d: "%s"' % ( invalid_lines, first_invalid_line, invalid_line )
+ if skipped_lines:
+ print 'Skipped %i comment (starting with #) or blank line(s)' % skipped_lines
--- a/tools/stats/filtering.xml Thu May 26 13:29:00 2011 -0400
+++ b/tools/stats/filtering.xml Fri May 27 10:47:17 2011 +0200
@@ -1,4 +1,4 @@
-<tool id="Filter1" name="Filter" version="1.0.1">
+<tool id="Filter1" name="Filter" version="1.1.0"><description>data on any column using simple expressions</description><command interpreter="python">
filtering.py $input $out_file1 "$cond" ${input.metadata.columns} "${input.metadata.column_types}"
@@ -29,7 +29,11 @@
<param name="cond" value="c3=='chr1' and c5>5"/><output name="out_file1" file="filter1_test3.sam"/></test>
-
+ <test>
+ <param name="input" value="filter1_inbad.bed"/>
+ <param name="cond" value="c1=='chr22'"/>
+ <output name="out_file1" file="filter1_test4.bed"/>
+ </test></tests><help>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: richard_burhans: updated help section for the genome diversity extract primers tool
by Bitbucket 26 May '11
by Bitbucket 26 May '11
26 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/bae2efef9ac7/
changeset: r5602:bae2efef9ac7
user: richard_burhans
date: 2011-05-26 19:29:00
summary: updated help section for the genome diversity extract primers tool
affected #: 1 file (153 bytes)
--- a/tools/genome_diversity/extract_primers.xml Thu May 26 08:27:52 2011 -0400
+++ b/tools/genome_diversity/extract_primers.xml Thu May 26 13:29:00 2011 -0400
@@ -49,7 +49,16 @@
<help>
**What it does**
- It extracts primers for the SNPs in the dataset.
+ This tool extracts primers for SNPs in the argument dataset using the
+ Primer3 program. The first line of output for a given SNP reports the
+ name of the assembled contig, the SNP's position in the contig, the
+ two variant nucleotides, and Primer3's "pair penalty". The next line,
+ if not blank, names restriction enzymes (from the user-adjustable list)
+ that differentially cut at that site, but do not cut at any other position
+ between and including the primer positions. The next lines show the SNP's
+ flanking regions, with the SNP position indicated by "n", including the
+ primer positions and an additional 3 nucleotides.
+
-----
@@ -57,30 +66,26 @@
- input file::
- chr2_75111355_75112576 314 A C L F chr2 75111676 C F 15 4 53 2 9 48 Y 96 0.369 0.355 0.396 0
- chr8_93901796_93905612 2471 A C A A chr8 93904264 A A 8 0 51 10 2 14 Y 961 0.016 0.534 0.114 2
- chr10_7434473_7435447 524 T C S S chr10 7435005 T S 11 5 90 14 0 69 Y 626 0.066 0.406 0.727 0
- chr14_80021455_80022064 138 G A H H chr14 80021593 G H 14 0 69 9 6 124 Y 377 0.118 0.997 0.195 1
- chr15_64470252_64471048 89 G A Y Y chr15 64470341 G Y 5 6 109 14 0 69 Y 312 0.247 0.998 0.393 0
- chr18_48070585_48071386 514 C T E K chr18 48071100 T K 7 7 46 14 0 69 Y 2 0.200 0.032 0.163 0
- chr18_50154905_50155664 304 A G Y C chr18 50155208 A Y 4 2 17 5 1 22 Y 8 0.022 0.996 0.128 0
- chr18_57379354_57380496 315 C T V V chr18 57379669 G V 11 0 60 9 6 62 Y 726 0.118 0.048 0.014 1
- chr19_14240610_14242055 232 C T A V chr19 14240840 C A 18 8 56 15 5 42 Y 73 0.003 0.153 0.835 0
- chr19_39866997_39874915 3117 C T P P chr19 39870110 C P 3 7 65 14 2 32 Y 6 0.321 0.911 0.462 4
- etc.
+ chr5_30800874_30802049 734 G A chr5 30801606 A 24 0 99 4 11 97 Y 496 0.502 0.033 0.215 6
+ chr8_55117827_55119487 994 A G chr8 55118815 G 25 0 102 4 11 96 Y 22 0.502 0.025 2.365 1
+ chr9_100484836_100485311 355 C T chr9 100485200 T 27 0 108 6 17 100 Y 190 0.512 0.880 2.733 4
+ chr12_3635530_3637738 2101 T C chr12 3637630 T 25 0 102 4 13 93 Y 169 0.554 0.024 0.366 4
- output file::
- > chr2_75111355_75112576 314 A C 0.613831
+ chr5_30800874_30802049 734 G A 0.352964
+ BglII,MboI,Sau3AI,Tru9I,XhoII
+ 1 CTGAAGGTGAGCAGGATTCAGGAGACAGAAAACAAAGCCCAGGCCTGCCCAAGGTGGAAA
+ >>>>>>>>>>>>>>>>>>>>
- 1 TTTGCCCTGAGGCAGACTTTTTAAAGTACTGTGTAATGTATGAAGTCCTTCTGCTCAAGC
- >>>>>>>>>>>>>>>>>>>>
-
- 61 AAATCATTGGCATGAAAACAGTTGCAAACTTATTGTGAGAGAAGAGTCCAAGAGTTTTAA
-
-
- 121 CAGTCTGTAAGTATATAGCCTGTGAGTTTGATTTCCTTCTTGTTTTTnTTCCAGAAACAT
-
+ 61 AGTCTAACAACTCGCCCTCTGCTTAnATCTGAGACTCACAGGGATAATAACACACTTGGT
+
+
+ 21 CAAGGAATAAACTAGATATTATTCACTCCTCTAGAAGGCTGCCAGGAAAATTGCCTGACT
+ <<<<<<<
+
+ 181 TGAACCTTGGCTCTGA
+ <<<<<<<<<<<<<
etc.
</help></tool>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/cfda1bc74468/
changeset: r5601:cfda1bc74468
user: kanwei
date: 2011-05-26 14:27:52
summary: Remove debug
affected #: 1 file (23 bytes)
--- a/lib/galaxy/web/controllers/user.py Thu May 26 08:20:37 2011 -0400
+++ b/lib/galaxy/web/controllers/user.py Thu May 26 08:27:52 2011 -0400
@@ -437,7 +437,6 @@
active_view="user" )
@web.expose
def create( self, trans, cntrller='user', redirect_url='', refresh_frames=[], **kwd ):
- print cntrller
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

26 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/242a479242cd/
changeset: r5600:242a479242cd
user: kanwei
date: 2011-05-26 14:20:37
summary: Fix user/create from direct URL access
affected #: 1 file (30 bytes)
--- a/lib/galaxy/web/controllers/user.py Thu May 26 09:50:07 2011 +0200
+++ b/lib/galaxy/web/controllers/user.py Thu May 26 08:20:37 2011 -0400
@@ -436,7 +436,8 @@
status='done',
active_view="user" )
@web.expose
- def create( self, trans, cntrller, redirect_url='', refresh_frames=[], **kwd ):
+ def create( self, trans, cntrller='user', redirect_url='', refresh_frames=[], **kwd ):
+ print cntrller
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

26 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/bfa4ff026215/
changeset: r5599:bfa4ff026215
user: kanwei
date: 2011-05-26 09:50:07
summary: Make branding not cover header links
affected #: 2 files (32 bytes)
--- a/static/june_2007_style/blue/panel_layout.css Wed May 25 17:12:21 2011 +0200
+++ b/static/june_2007_style/blue/panel_layout.css Thu May 26 09:50:07 2011 +0200
@@ -35,7 +35,7 @@
.panel-info-message{background-image:url(info_small.png);background-color:#CCCCFF;}
#masthead{position:absolute;top:0;left:0;width:100%;min-width:900px;height:32px;background:#2C3143;color:#fff;border-bottom:solid #444 1px;z-index:15000;padding:0;}
#masthead a{color:#eeeeee;text-decoration:none;}
-#masthead .title{font-family:verdana;padding:3px 10px;font-size:175%;font-weight:bold;}
+#masthead .title{font-family:verdana;padding:3px 10px;font-size:175%;font-weight:bold;z-index:-1;}
#masthead a:hover{text-decoration:underline;}
.tab-group{margin:0;padding:0 10px;height:100%;white-space:nowrap;cursor:default;background:transparent;}
.tab-group .tab{background:#2C3143;position:relative;float:left;margin:0;padding:0 1em;height:32px;line-height:32px;text-align:left;}
--- a/static/june_2007_style/panel_layout.css.tmpl Wed May 25 17:12:21 2011 +0200
+++ b/static/june_2007_style/panel_layout.css.tmpl Thu May 26 09:50:07 2011 +0200
@@ -259,6 +259,7 @@
padding: 3px 10px;
font-size: 175%;
font-weight: bold;
+ z-index: -1;
}
}
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/a0fffca054ec/
changeset: r5598:a0fffca054ec
user: kanwei
date: 2011-05-25 17:12:21
summary: Fix lack of quotes
affected #: 2 files (4 bytes)
--- a/templates/export_base.mako Wed May 25 16:39:43 2011 +0200
+++ b/templates/export_base.mako Wed May 25 17:12:21 2011 +0200
@@ -98,7 +98,7 @@
<%def name="render_footer()"><p><br><br>
- <a href=${h.url_for( action="list" )}>Back to ${self.item_class_plural_name} List</a>
+ <a href="${h.url_for( action="list" )}">Back to ${self.item_class_plural_name} List</a></%def><%def name="body()">
--- a/templates/sharing_base.mako Wed May 25 16:39:43 2011 +0200
+++ b/templates/sharing_base.mako Wed May 25 17:12:21 2011 +0200
@@ -274,5 +274,5 @@
%endif
<p><br><br>
- <a href=${h.url_for( action="list" )}>Back to ${item_class_plural_name} List</a>
+ <a href="${h.url_for( action="list" )}">Back to ${item_class_plural_name} List</a></%def>
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/547697f690c2/
changeset: r5597:547697f690c2
user: kanwei
date: 2011-05-25 16:39:43
summary: Sanitize defaults
affected #: 1 file (20 bytes)
--- a/lib/galaxy/util/sanitize_html.py Wed May 18 18:43:46 2011 +0100
+++ b/lib/galaxy/util/sanitize_html.py Wed May 25 16:39:43 2011 +0200
@@ -431,7 +431,7 @@
return ' '.join(clean)
-def sanitize_html(htmlSource, encoding, type):
+def sanitize_html(htmlSource, encoding="utf-8", type="text/html"):
p = _HTMLSanitizer(encoding, type)
p.feed(htmlSource)
data = p.output()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: peterjc: Fix for BLAST XML to tabular when both query and subject have XXX masking
by Bitbucket 25 May '11
by Bitbucket 25 May '11
25 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/2bd9d3d0bb29/
changeset: r5596:2bd9d3d0bb29
user: peterjc
date: 2011-05-18 19:43:46
summary: Fix for BLAST XML to tabular when both query and subject have XXX masking
affected #: 1 file (176 bytes)
--- a/tools/ncbi_blast_plus/blastxml_to_tabular.py Wed May 25 11:31:26 2011 +0200
+++ b/tools/ncbi_blast_plus/blastxml_to_tabular.py Wed May 18 18:43:46 2011 +0100
@@ -176,16 +176,19 @@
expected_mismatch = len(q_seq) \
- sum(1 for q,h in zip(q_seq, h_seq) \
if q == h or q == "-" or h == "-")
- assert expected_mismatch - q_seq.count("X") <= int(mismatch) <= expected_mismatch, \
- "%s vs %s mismatches, expected %i <= %i <= %i" \
- % (qseqid, sseqid, expected_mismatch - q_seq.count("X"), int(mismatch), expected_mismatch)
+ xx = sum(1 for q,h in zip(q_seq, h_seq) if q=="X" and h=="X")
+ if not (expected_mismatch - q_seq.count("X") <= int(mismatch) <= expected_mismatch + xx):
+ stop_err("%s vs %s mismatches, expected %i <= %i <= %i" \
+ % (qseqid, sseqid, expected_mismatch - q_seq.count("X"),
+ int(mismatch), expected_mismatch))
#TODO - Remove this alternative identity calculation and test
#once satisifed there are no problems
- expected_idendity = sum(1 for q,h in zip(q_seq, h_seq) if q == h)
- assert expected_idendity <= int(nident) <= expected_idendity + q_seq.count("X"), \
- "%s vs %s identities, expected %i <= %i <= %i" \
- % (qseqid, sseqid, expected_idendity, int(identity), expected_idendity + q_seq.count("X"))
+ expected_identity = sum(1 for q,h in zip(q_seq, h_seq) if q == h)
+ if not (expected_identity - xx <= int(nident) <= expected_identity + q_seq.count("X")):
+ stop_err("%s vs %s identities, expected %i <= %i <= %i" \
+ % (qseqid, sseqid, expected_identity, int(nident),
+ expected_identity + q_seq.count("X")))
evalue = hsp.findtext("Hsp_evalue")
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

25 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/100347b4e473/
changeset: r5595:100347b4e473
user: kanwei
date: 2011-05-25 11:31:26
summary: Fix a few XSS issues in workflow/history
affected #: 3 files (70 bytes)
--- a/lib/galaxy/web/controllers/history.py Tue May 24 05:33:07 2011 -0400
+++ b/lib/galaxy/web/controllers/history.py Wed May 25 11:31:26 2011 +0200
@@ -462,7 +462,7 @@
else:
assert history.user == trans.user
# Rename
- history.name = new_name
+ history.name = sanitize_html( new_name )
trans.sa_session.add( history )
trans.sa_session.flush()
return history.name
@@ -1129,7 +1129,7 @@
change_msg = change_msg + "<p>History: "+cur_names[i]+" is already named: "+name[i]+"</p>"
elif name[i] not in [None,'',' ']:
name[i] = escape(name[i])
- histories[i].name = name[i]
+ histories[i].name = sanitize_html( name[i] )
trans.sa_session.add( histories[i] )
trans.sa_session.flush()
change_msg = change_msg + "<p>History: "+cur_names[i]+" renamed to: "+name[i]+"</p>"
--- a/lib/galaxy/web/controllers/workflow.py Tue May 24 05:33:07 2011 -0400
+++ b/lib/galaxy/web/controllers/workflow.py Wed May 25 11:31:26 2011 +0200
@@ -364,7 +364,7 @@
# Update workflow attributes if new values submitted.
if 'name' in kwargs:
# Rename workflow.
- stored.name = kwargs[ 'name' ]
+ stored.name = sanitize_html( kwargs['name'] )
if 'annotation' in kwargs:
# Set workflow annotation; sanitize annotation before adding it.
annotation = sanitize_html( kwargs[ 'annotation' ], 'utf-8', 'text/html' )
@@ -380,7 +380,7 @@
def rename( self, trans, id, new_name=None, **kwargs ):
stored = self.get_stored_workflow( trans, id )
if new_name is not None:
- stored.name = new_name
+ stored.name = sanitize_html( new_name )
trans.sa_session.flush()
# For current workflows grid:
trans.set_message ( "Workflow renamed to '%s'." % new_name )
--- a/templates/workflow/list.mako Tue May 24 05:33:07 2011 -0400
+++ b/templates/workflow/list.mako Wed May 25 11:31:26 2011 +0200
@@ -56,7 +56,7 @@
<tr><td><div class="menubutton" style="float: left;" id="wf-${i}-popup">
- ${h.to_unicode( workflow.name )}
+ ${h.to_unicode( workflow.name ) | h}
</div></td><td>${len(workflow.latest_workflow.steps)}</td>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: natefoo: Fix the non-working default="true" for checkboxes, thanks Louise-Amélie Schmitt.
by Bitbucket 24 May '11
by Bitbucket 24 May '11
24 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/2f84c42a548a/
changeset: r5594:2f84c42a548a
user: natefoo
date: 2011-05-24 11:33:07
summary: Fix the non-working default="true" for checkboxes, thanks Louise-Amélie Schmitt.
affected #: 1 file (103 bytes)
--- a/lib/galaxy/web/form_builder.py Tue May 24 02:20:35 2011 +0200
+++ b/lib/galaxy/web/form_builder.py Tue May 24 05:33:07 2011 -0400
@@ -4,7 +4,7 @@
import logging, sys, os, time
from cgi import escape
-from galaxy.util import restore_text, relpath, nice_size
+from galaxy.util import restore_text, relpath, nice_size, string_as_bool
from galaxy.web import url_for
log = logging.getLogger(__name__)
@@ -112,6 +112,8 @@
# above for clarification. Basically, if value is not True, then it will always be a list with
# 2 input fields ( a checkbox and a hidden field ) if the checkbox is checked. If it is not
# checked, then value will be only the hidden field.
+ if isinstance( value, basestring ):
+ return string_as_bool( value )
return isinstance( value, list ) and len( value ) == 2
def set_checked(self, value):
if isinstance( value, basestring ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: jgoecks: Enable tags and annotations to work for new datasets in history. Fixes #550
by Bitbucket 23 May '11
by Bitbucket 23 May '11
23 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/6d13652f26d1/
changeset: r5593:6d13652f26d1
user: jgoecks
date: 2011-05-24 02:20:35
summary: Enable tags and annotations to work for new datasets in history. Fixes #550
affected #: 1 file (50 bytes)
--- a/templates/root/history.mako Sun May 22 23:54:01 2011 +0200
+++ b/templates/root/history.mako Tue May 24 02:20:35 2011 +0200
@@ -22,6 +22,89 @@
<% TERMINAL_STATES = ["ok", "error", "empty", "deleted", "discarded", "failed_metadata"] %>
TERMINAL_STATES = ${ h.to_json_string(TERMINAL_STATES) };
+// Tag handling.
+function tag_handling(parent_elt) {
+ $(parent_elt).find("a.icon-button.tags").each( function() {
+ // Use links parameters but custom URL as ajax URL.
+ $(this).click( function() {
+ // Get tag area, tag element.
+ var history_item = $(this).parents(".historyItem");
+ var tag_area = history_item.find(".tag-area");
+ var tag_elt = history_item.find(".tag-elt");
+
+ // Show or hide tag area; if showing tag area and it's empty, fill it.
+ if ( tag_area.is( ":hidden" ) ) {
+ if (!tag_elt.html()) {
+ // Need to fill tag element.
+ var href_parms = $(this).attr("href").split("?")[1];
+ var ajax_url = "${h.url_for( controller='tag', action='get_tagging_elt_async' )}?" + href_parms;
+ $.ajax({
+ url: ajax_url,
+ error: function() { alert( "Tagging failed" ) },
+ success: function(tag_elt_html) {
+ tag_elt.html(tag_elt_html);
+ tag_elt.find(".tooltip").tipsy( { gravity: 's' } );
+ tag_area.slideDown("fast");
+ }
+ });
+ } else {
+ // Tag element is filled; show.
+ tag_area.slideDown("fast");
+ }
+ } else {
+ // Hide.
+ tag_area.slideUp("fast");
+ }
+ return false;
+ });
+ });
+};
+
+// Annotation handling.
+function annotation_handling(parent_elt) {
+ $(parent_elt).find("a.icon-button.annotate").each( function() {
+ // Use links parameters but custom URL as ajax URL.
+ $(this).click( function() {
+ // Get tag area, tag element.
+ var history_item = $(this).parents(".historyItem");
+ var annotation_area = history_item.find(".annotation-area");
+ var annotation_elt = history_item.find(".annotation-elt");
+
+ // Show or hide annotation area; if showing annotation area and it's empty, fill it.
+ if ( annotation_area.is( ":hidden" ) ) {
+ if (!annotation_elt.html()) {
+ // Need to fill annotation element.
+ var href_parms = $(this).attr("href").split("?")[1];
+ var ajax_url = "${h.url_for( controller='dataset', action='get_annotation_async' )}?" + href_parms;
+ $.ajax({
+ url: ajax_url,
+ error: function() { alert( "Annotations failed" ) },
+ success: function(annotation) {
+ if (annotation == "") {
+ annotation = "<em>Describe or add notes to dataset</em>";
+ }
+ annotation_elt.html(annotation);
+ annotation_area.find(".tooltip").tipsy( { gravity: 's' } );
+ async_save_text(
+ annotation_elt.attr("id"), annotation_elt.attr("id"),
+ "${h.url_for( controller='/dataset', action='annotate_async')}?" + href_parms,
+ "new_annotation", 18, true, 4);
+ annotation_area.slideDown("fast");
+ }
+ });
+ } else {
+ // Annotation element is filled; show.
+ annotation_area.slideDown("fast");
+ }
+ } else {
+ // Hide.
+ annotation_area.slideUp("fast");
+ }
+ return false;
+ });
+ });
+};
+
$(function() {
var historywrapper = $("div.historyItemWrapper");
init_history_items(historywrapper);
@@ -91,84 +174,8 @@
$(this).find("a.show-details").bind("click", function() { return false; });
*/
- // Tag handling.
- $(this).find("a.icon-button.tags").each( function() {
- // Use links parameters but custom URL as ajax URL.
- $(this).click( function() {
- // Get tag area, tag element.
- var history_item = $(this).parents(".historyItem");
- var tag_area = history_item.find(".tag-area");
- var tag_elt = history_item.find(".tag-elt");
-
- // Show or hide tag area; if showing tag area and it's empty, fill it.
- if ( tag_area.is( ":hidden" ) ) {
- if (!tag_elt.html()) {
- // Need to fill tag element.
- var href_parms = $(this).attr("href").split("?")[1];
- var ajax_url = "${h.url_for( controller='tag', action='get_tagging_elt_async' )}?" + href_parms;
- $.ajax({
- url: ajax_url,
- error: function() { alert( "Tagging failed" ) },
- success: function(tag_elt_html) {
- tag_elt.html(tag_elt_html);
- tag_elt.find(".tooltip").tipsy( { gravity: 's' } );
- tag_area.slideDown("fast");
- }
- });
- } else {
- // Tag element is filled; show.
- tag_area.slideDown("fast");
- }
- } else {
- // Hide.
- tag_area.slideUp("fast");
- }
- return false;
- });
- });
-
- // Annotation handling.
- $(this).find("a.icon-button.annotate").each( function() {
- // Use links parameters but custom URL as ajax URL.
- $(this).click( function() {
- // Get tag area, tag element.
- var history_item = $(this).parents(".historyItem");
- var annotation_area = history_item.find(".annotation-area");
- var annotation_elt = history_item.find(".annotation-elt");
-
- // Show or hide annotation area; if showing annotation area and it's empty, fill it.
- if ( annotation_area.is( ":hidden" ) ) {
- if (!annotation_elt.html()) {
- // Need to fill annotation element.
- var href_parms = $(this).attr("href").split("?")[1];
- var ajax_url = "${h.url_for( controller='dataset', action='get_annotation_async' )}?" + href_parms;
- $.ajax({
- url: ajax_url,
- error: function() { alert( "Annotations failed" ) },
- success: function(annotation) {
- if (annotation == "") {
- annotation = "<em>Describe or add notes to dataset</em>";
- }
- annotation_elt.html(annotation);
- annotation_area.find(".tooltip").tipsy( { gravity: 's' } );
- async_save_text(
- annotation_elt.attr("id"), annotation_elt.attr("id"),
- "${h.url_for( controller="/dataset", action="annotate_async")}?" + href_parms,
- "new_annotation", 18, true, 4);
- annotation_area.slideDown("fast");
- }
- });
- } else {
- // Annotation element is filled; show.
- annotation_area.slideDown("fast");
- }
- } else {
- // Hide.
- annotation_area.slideUp("fast");
- }
- return false;
- });
- });
+ tag_handling(document);
+ annotation_handling(document);
});
// Trackster links
@@ -277,6 +284,8 @@
var container = $("#historyItemContainer-" + id);
container.html( val.html );
init_history_items( $("div.historyItemWrapper"), "noinit" );
+ tag_handling(container);
+ annotation_handling(container);
// If new state is terminal, stop tracking
if (TERMINAL_STATES.indexOf(val.state) !== -1) {
if ( val.force_history_refresh ){
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: jgoecks: When adding tracks to Trackster, add them in the order that they appear in the dataset listing.
by Bitbucket 22 May '11
by Bitbucket 22 May '11
22 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/ad184add11f3/
changeset: r5592:ad184add11f3
user: jgoecks
date: 2011-05-22 23:54:01
summary: When adding tracks to Trackster, add them in the order that they appear in the dataset listing.
affected #: 1 file (1.2 KB)
--- a/templates/tracks/browser.mako Fri May 20 16:04:30 2011 -0400
+++ b/templates/tracks/browser.mako Sun May 22 23:54:01 2011 +0200
@@ -178,6 +178,7 @@
hide_modal();
},
"Insert": function() {
+ var requests = [];
$('input[name=id]:checked,input[name=ldda_ids]:checked').each(function() {
var data,
id = $(this).val();
@@ -186,13 +187,25 @@
} else {
data = { ldda_id: id};
}
- $.ajax( {
- url: "${h.url_for( action='add_track_async' )}",
- data: data,
- dataType: "json",
- success: add_async_success
- });
-
+ requests[requests.length] = $.ajax({
+ url: "${h.url_for( action='add_track_async' )}",
+ data: data,
+ dataType: "json",
+ });
+ });
+ // To preserve order, wait until there are definitions for all tracks and then add
+ // them sequentially.
+ $.when.apply($, requests).then(function() {
+ // jQuery always returns an Array for arguments, so need to look at first element
+ // to determine whether multiple requests were made and consequently how to
+ // map arguments to track definitions.
+ var track_defs = (arguments[0] instanceof Array ?
+ $.map(arguments, function(arg) { return arg[0]; }) :
+ [ arguments[0] ]
+ );
+ for (var i= 0; i < track_defs.length; i++) {
+ add_async_success(track_defs[i]);
+ }
});
hide_modal();
}
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: greg: First pass of the next-gen Galaxy tool shed. See it demonsrated and discussed at the 2011 Gallaxy Community Conference in Lunteren on May 24, 25, 26.
by Bitbucket 20 May '11
by Bitbucket 20 May '11
20 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/70e1f41765e4/
changeset: r5591:70e1f41765e4
user: greg
date: 2011-05-20 22:04:30
summary: First pass of the next-gen Galaxy tool shed. See it demonsrated and discussed at the 2011 Gallaxy Community Conference in Lunteren on May 24,25,26.
affected #: 36 files (20.2 KB)
Diff too large to display.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: an...@grusha.bx.psu.edu: Fixes to picard tool intefaces and help sections. Disabled java heap selection by the user (set to 4G default, which was changed in picard_wrapper.py).
by Bitbucket 20 May '11
by Bitbucket 20 May '11
20 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/9f4956c0d94a/
changeset: r5590:9f4956c0d94a
user: an...(a)grusha.bx.psu.edu
date: 2011-05-20 19:26:45
summary: Fixes to picard tool intefaces and help sections. Disabled java heap selection by the user (set to 4G default, which was changed in picard_wrapper.py).
affected #: 13 files (7.0 KB)
--- a/tools/picard/picard_AddOrReplaceReadGroups.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/picard_AddOrReplaceReadGroups.xml Fri May 20 13:26:45 2011 -0400
@@ -18,13 +18,13 @@
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/AddOrReplaceReadGroups.jar"
</command><inputs>
- <param format="bam,sam" name="inputFile" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library" />
- <param name="rglb" value="" type="text" label="Read group library" />
- <param name="rgpl" value="" type="text" label="Read group platform" help="illumina, solid, etc." />
+ <param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to add or replace read groups in"
+ help="If empty, upload or import a SAM/BAM dataset." />
+ <param name="rgid" value="1" type="text" label="Read group ID (ID tag)" help="The most important read group tag. Galaxy will use a value of '1' if nothing provided." />
+ <param name="rgsm" value="" type="text" label="Read group sample name (SM tag)" />
+ <param name="rglb" value="" type="text" label="Read group library (LB tag)" />
+ <param name="rgpl" value="" type="text" label="Read group platform (PL tag)" help="illumina, solid, 454, pacbio, helicos" /><param name="rgpu" value="" type="text" label="Read group platform unit" help="like run barcode, etc." />
- <param name="rgsm" value="" type="text" label="Read group sample name" />
- <param name="rgid" value="1" type="text" label="Read group ID" help="Picard will use a value of '1' if nothing provided" /><conditional name="readGroupOpts"><param name="rgOpts" type="select" label="Specify additional (optional) arguments" help="Allows you to set RGCN and RGDS."><option value="preSet">Use pre-set defaults</option>
@@ -98,7 +98,44 @@
**Purpose**
-Add or Replace Read Groups in an input bam or sam file.
+Add or Replace Read Groups in an input BAM or SAM file.
+
+**Read Groups are Important!**
+
+Many downstream analysis tools (such as GATK, for example) require BAM datasets to contain read groups. Even if you are not going to use GATK, setting read groups correctly from the start will simplify your life greatly. Below we provide an explanation of read groups fields taken from GATK FAQ webpage:
+
+.. csv-table::
+ :header-rows: 1
+
+ Tag,Importance,Definition,Meaning
+ "ID","Required","Read group identifier. Each @RG line must have a unique ID. The value of ID is used in the RG tags of alignment records. Must be unique among all read groups in header section. Read group IDs may be modified when merging SAM files in order to handle collisions.","Ideally, this should be a globally unique identify across all sequencing data in the world, such as the Illumina flowcell + lane name and number. Will be referenced by each read with the RG:Z field, allowing tools to determine the read group information associated with each read, including the sample from which the read came. Also, a read group is effectively treated as a separate run of the NGS instrument in tools like base quality score recalibration (a GATK component) -- all reads within a read group are assumed to come from the same instrument run and to therefore share the same error model."
+ "SM","Sample. Use pool name where a pool is being sequenced.","Required. As important as ID.","The name of the sample sequenced in this read group. GATK tools treat all read groups with the same SM value as containing sequencing data for the same sample. Therefore it's critical that the SM field be correctly specified, especially when using multi-sample tools like the Unified Genotyper (a GATK component)."
+ "PL","Platform/technology used to produce the read. Valid values: ILLUMINA, SOLID, LS454, HELICOS and PACBIO.","Important. Not currently used in the GATK, but was in the past, and may return. The only way to known the sequencing technology used to generate the sequencing data","It's a good idea to use this field."
+ "LB","DNA preparation library identify","Essential for MarkDuplicates","MarkDuplicates uses the LB field to determine which read groups might contain molecular duplicates, in case the same DNA library was sequenced on multiple lanes."
+
+**Example of Read Group usage**
+
+Support we have a trio of samples: MOM, DAD, and KID. Each has two DNA libraries prepared, one with 400 bp inserts and another with 200 bp inserts. Each of these libraries is run on two lanes of an illumina hiseq, requiring 3 x 2 x 2 = 12 lanes of data. When the data come off the sequencer, we would create 12 BAM files, with the following @RG fields in the header::
+
+ Dad's data:
+ @RG ID:FLOWCELL1.LANE1 PL:illumina LB:LIB-DAD-1 SM:DAD PI:200
+ @RG ID:FLOWCELL1.LANE2 PL:illumina LB:LIB-DAD-1 SM:DAD PI:200
+ @RG ID:FLOWCELL1.LANE3 PL:illumina LB:LIB-DAD-2 SM:DAD PI:400
+ @RG ID:FLOWCELL1.LANE4 PL:illumina LB:LIB-DAD-2 SM:DAD PI:400
+
+ Mom's data:
+ @RG ID:FLOWCELL1.LANE5 PL:illumina LB:LIB-MOM-1 SM:MOM PI:200
+ @RG ID:FLOWCELL1.LANE6 PL:illumina LB:LIB-MOM-1 SM:MOM PI:200
+ @RG ID:FLOWCELL1.LANE7 PL:illumina LB:LIB-MOM-2 SM:MOM PI:400
+ @RG ID:FLOWCELL1.LANE8 PL:illumina LB:LIB-MOM-2 SM:MOM PI:400
+
+ Kid's data:
+ @RG ID:FLOWCELL2.LANE1 PL:illumina LB:LIB-KID-1 SM:KID PI:200
+ @RG ID:FLOWCELL2.LANE2 PL:illumina LB:LIB-KID-1 SM:KID PI:200
+ @RG ID:FLOWCELL2.LANE3 PL:illumina LB:LIB-KID-2 SM:KID PI:400
+ @RG ID:FLOWCELL2.LANE4 PL:illumina LB:LIB-KID-2 SM:KID PI:400
+
+Note the hierarchical relationship between read groups (unique for each lane) to libraries (sequenced on two lanes) and samples (across four lanes, two lanes for each library).
**Picard documentation**
@@ -143,12 +180,12 @@
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
+
</help>
--- a/tools/picard/picard_BamIndexStats.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/picard_BamIndexStats.xml Fri May 20 13:26:45 2011 -0400
@@ -9,8 +9,8 @@
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/BamIndexStats.jar"
</command><inputs>
- <param format="bam" name="input_file" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library" />
+ <param format="bam" name="input_file" type="data" label="BAM dataset to generate statistics for"
+ help="If empty, upload or import a BAM dataset" /></inputs><outputs><data format="html" name="htmlfile" label="${tool.name}_on_${on_string}.html" />
@@ -39,7 +39,7 @@
**Purpose**
-Generate Bam Index Stats for a provided bam file.
+Generate Bam Index Stats for a provided BAM file.
**Picard documentation**
@@ -53,26 +53,25 @@
**Inputs and outputs**
-The only input is the bam file you wish to obtain statistics for, which is required.
-Note that it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
+The only input is the BAM file you wish to obtain statistics for, which is required.
+Note that it must be coordinate-sorted. Galaxy currently coordinate-sorts all BAM files.
This tool outputs an HTML file that contains links to the actual metrics results, as well
as a log file with info on the exact command run.
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
------
**Example**
-Given a bam file created from the following::
+Given a BAM file created from the following::
@HD VN:1.0 SO:coordinate
@SQ SN:chr1 LN:101
--- a/tools/picard/picard_MarkDuplicates.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/picard_MarkDuplicates.xml Fri May 20 13:26:45 2011 -0400
@@ -24,7 +24,7 @@
--picard-cmd="MarkDuplicates"
</command><inputs>
- <param format="bam,sam" name="input_file" type="data" label="The sam- or bam-format short read data in your current history"
+ <param format="bam,sam" name="input_file" type="data" label="SAM/BAM dataset to mark duplicates in"
help="If the select list is empty, you need to upload or import some aligned short read data from a shared library"/><param name="remDups" type="boolean" label="Remove duplicates from output file" truevalue="true" falsevalue="false" checked="False"
help="If true do not write duplicates to the output file instead of writing them with appropriate flags set" />
--- a/tools/picard/picard_ReorderSam.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/picard_ReorderSam.xml Fri May 20 13:26:45 2011 -0400
@@ -1,4 +1,4 @@
-<tool name="Reorder SAM" id="picard_ReorderSam" version="0.3.0">
+<tool name="Reorder SAM/BAM" id="picard_ReorderSam" version="0.3.0"><requirements><requirement type="package">picard</requirement></requirements><command interpreter="python">
picard_wrapper.py
@@ -18,10 +18,10 @@
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/ReorderSam.jar"
</command><inputs>
- <param format="bam,sam" name="inputFile" type="data" label="The sam or bam file in your current history whose header you want to replace"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library" />
+ <param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to be reordered"
+ help="If empty, upload or import a SAM/BAM dataset." /><conditional name="source">
- <param name="indexSource" type="select" label="Choose the source for the reference list">
+ <param name="indexSource" type="select" label="Select Reference Genome" help="This tool will re-order SAM/BAM in the same order as reference selected below."><option value="built-in">Locally cached</option><option value="history">History</option></param>
@@ -39,7 +39,7 @@
</conditional><param name="allowIncDictConcord" type="boolean" checked="False" truevalue="true" falsevalue="false" label="Allow incomplete dict concordance?" help="Allows a partial overlap of the BAM contigs with the new reference sequence contigs." /><param name="allowContigLenDiscord" type="boolean" checked="False" truevalue="true" falsevalue="false" label="Allow contig length discordance?" help="This is dangerous--don't check it unless you know exactly what you're doing!" />
- <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output bam instead of sam" help="Uncheck for sam output" />
+ <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" /></inputs><outputs><data name="outFile" format="bam" label="${tool.name} on ${on_string}: reordered ${outputFormat}">
@@ -106,10 +106,10 @@
**Purpose**
-Reorder Sam to match contig ordering in a particular reference file. Note that this is
+Reorder SAM/BAM to match contig ordering in a particular reference file. Note that this is
not the same as sorting as done by the SortSam tool, which sorts by either coordinate
values or query name. The ordering in ReorderSam is based on exact name matching of
-contigs. Reads that are mapped to a contig that is not in the new reference file are
+contigs/chromosomes. Reads that are mapped to a contig that is not in the new reference file are
not included in the output.
**Picard documentation**
@@ -142,12 +142,11 @@
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
</help>
--- a/tools/picard/picard_ReplaceSamHeader.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/picard_ReplaceSamHeader.xml Fri May 20 13:26:45 2011 -0400
@@ -1,4 +1,4 @@
-<tool name="Replace Sam Header" id="picard_ReplaceSamHeader" version="0.2.0">
+<tool name="Replace SAM/BAM Header" id="picard_ReplaceSamHeader" version="0.2.0"><requirements><requirement type="package">picard</requirement></requirements><command interpreter="python">
picard_wrapper.py
@@ -10,11 +10,11 @@
--tmpdir "${__new_file_path__}"
</command><inputs>
- <param format="bam,sam" name="inputFile" type="data" label="Input: sam or bam format short read data in your current history whose header will be replaced"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library" />
- <param format="bam,sam" name="headerFile" type="data" label="sam or bam file from which header will be read"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library" />
- <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output bam instead of sam" help="Uncheck for sam output" />
+ <param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to replace header in (TARGET)"
+ help="If empty, upload or import a SAM/BAM dataset." />
+ <param format="bam,sam" name="headerFile" type="data" label="SAM/BAM to reader header from (SOURCE)"
+ help="If empty, upload or import a SAM/BAM dataset." />
+ <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" /></inputs><outputs><data name="outFile" format="bam" label="${tool.name} on ${on_string}: ${outputFormat} with replaced header">
@@ -91,12 +91,12 @@
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
+
</help>
--- a/tools/picard/picard_wrapper.py Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/picard_wrapper.py Fri May 20 13:26:45 2011 -0400
@@ -361,7 +361,7 @@
op.add_option('-n', '--title', default="Pick a Picard Tool")
op.add_option('-t', '--htmlout', default=None)
op.add_option('-d', '--outdir', default=None)
- op.add_option('-x', '--maxjheap', default='2g')
+ op.add_option('-x', '--maxjheap', default='4g')
op.add_option('-b', '--bisulphite', default='false')
op.add_option('-s', '--sortorder', default='query')
op.add_option('','--tmpdir', default='/tmp')
--- a/tools/picard/rgPicardASMetrics.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/rgPicardASMetrics.xml Fri May 20 13:26:45 2011 -0400
@@ -1,4 +1,4 @@
-<tool name="Sam/bam Alignment Summary Metrics" id="PicardASMetrics" version="0.03">
+<tool name="SAM/BAM Alignment Summary Metrics" id="PicardASMetrics" version="0.03"><command interpreter="python">
picard_wrapper.py -i "$input_file" -d "$html_file.files_path" -t "$html_file"
--assumesorted "$sorted" -b "$bisulphite" --adaptors "$adaptors" --maxinsert "$maxinsert" -n "$out_prefix"
@@ -11,21 +11,20 @@
</command><requirements><requirement type="package">picard</requirement></requirements><inputs>
- <param format="sam,bam" name="input_file" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library"/>
+ <param format="sam,bam" name="input_file" type="data" label="SAM/BAM dataset to generate statistics for"
+ help="If empty, upload or import a SAM/BAM dataset."/><param name="out_prefix" value="Picard Alignment Summary Metrics" type="text"
- label="Title for the output file - use this remind you what the job was for" size="80" />
+ label="Title for the output file" help="Use this remind you what the job was for." size="80" /><conditional name="genomeSource">
- <param name="refGenomeSource" type="select" help="This tool needs a reference genome. Default is usually right"
- label="Align to which reference genome? - default, built-in or choose from current history">
- <option value="default" selected="true">Default - use the input data genome/build</option>
+ <param name="refGenomeSource" type="select" label="Select Reference Genome">
+ <option value="default" selected="true">Use the assigned data genome/build</option><option value="indexed">Select a different built-in genome</option><option value="history">Use a genome (fasta format) from my history</option></param><when value="default">
- <param name="index" type="select" label="Select a default reference genome">
+ <param name="index" type="select" label="Check the assigned reference genome" help="Galaxy thinks that the reads in you dataset were aligned against this reference. If this is not correct, use the 'Select a build-in reference genome' option of the 'Select Reference Genome' dropdown to select approprtiate Reference."><options from_data_table="all_fasta"><filter type="data_meta" ref="input_file" key="dbkey" column="dbkey" multiple="True" separator="," /><validator type="no_options" message="No reference build available for selected input" />
@@ -33,18 +32,18 @@
</param></when><when value="indexed">
- <param name="index" type="select" label="Select a built-in reference genome" >
+ <param name="index" type="select" label="Select a built-in reference genome" help="This list contains genomes cached at this Galaxy instance. If your genome of interest is not present here request it by using 'Help' link at the top of Galaxy interface or use the 'Use a genome (fasta format) from my history' option of the 'Select Reference Genome' dropdown."><options from_data_table="all_fasta"></options></param></when><when value="history">
- <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome from history" />
+ <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome from history" help="This option works best for relatively small genomes. If you are working with large human-sized genomes, send request to Galaxy team for adding your reference to this Galaxy instance by using 'Help' link at the top of Galaxy interface."/></when></conditional><param name="sorted" type="boolean" label="Assume the input file is already sorted" checked="true" truevalue="true" falsevalue="false"/><param name="bisulphite" type="boolean" label="Input file contains Bisulphite sequenced reads" checked="false" falsevalue="false" truevalue="true" />
- <param name="adaptors" value="" type="text" area="true" label="Adapter sequences - one per line if multiple" size="5x120" />
+ <param name="adaptors" value="" type="text" area="true" label="Adapter sequences" help="One per line if multiple" size="5x120" /><param name="maxinsert" value="100000" type="integer" label="Larger paired end reads and inter-chromosomal pairs considered chimeric " size="20" /></inputs><outputs>
@@ -94,12 +93,17 @@
**Syntax**
-- **Input** is sam/bam format aligned short read data in your current history
-- **Title** is the title to use for all output files from this job - use it for high level metadata
-- **Refseq** is the sequence you want to interogate - eg hg19
-- **Assume Sorted** saves sorting time - but only if true!
-- **Bisulphite data** see Picard documentation http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
-- **Maximum acceptable insertion length** See Picard documentation at http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
+- **Input** - SAM/BAM format aligned short read data in your current history
+- **Title** - the title to use for all output files from this job - use it for high level metadata
+- **Reference Genome** - Galaxy (and Picard) needs to know which genomic reference was used to generate alignemnts within the input SAM/BAM dataset. Here you have three choices:
+
+ - *Assigned data genome/build* - a genome specified for this dataset. If you your SAM/BAM dataset has an assigned reference genome it will be displayed below this dropdown. If it does not -> use one of the following two options.
+ - *Select a different built-in genome* - this option will list all reference genomes presently cached at this instance of Galaxy.
+ - *Select a reference genome from history* - alternatively you can upload your own version of reference genome into your history and use it with this option. This is however not advisable with large human-sized genomes. If your genome is large contact Galaxy team using "Help" link at the top of the interface and provide exact details on where we can download sequences you would like to use as the refenece. We will then install them as a part of locally cached genomic references.
+
+- **Assume Sorted** - saves sorting time - but only if true!
+- **Bisulphite data** - see Picard documentation http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
+- **Maximum acceptable insertion length** - see Picard documentation at http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
-----
@@ -109,7 +113,7 @@
The Picard documentation (reformatted for Galaxy) says:
-.. csv-table:: ASMDoc
+.. csv-table::
:header-rows: 1
Option,Description
@@ -122,46 +126,35 @@
"IS_BISULFITE_SEQUENCED=Boolean","Whether the SAM or BAM file consists of bisulfite sequenced reads. Default value: false. "
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created."
-The output produced by the tool has the following columns:
+The output produced by the tool has the following columns::
-#. CATEGORY: One of either UNPAIRED (for a fragment run), FIRST_OF_PAIR when metrics are for only the first read in a paired run, SECOND_OF_PAIR when the metrics are for only the second read in a paired run or PAIR when the metrics are aggregeted for both first and second reads in a pair.
-#. TOTAL_READS: The total number of reads including all PF and non-PF reads. When CATEGORY equals PAIR this value will be 2x the number of clusters.
-#. PF_READS: The number of PF reads where PF is defined as passing Illumina's filter.
-#. PCT_PF_READS: The percentage of reads that are PF (PF_READS / TOTAL_READS)
-#. PF_NOISE_READS: The number of PF reads that are marked as noise reads. A noise read is one which is composed entirey of A bases and/or N bases. These reads are marked as they are usually artifactual and are of no use in downstream analysis.
-#. PF_READS_ALIGNED: The number of PF reads that were aligned to the reference sequence. This includes reads that aligned with low quality (i.e. their alignments are ambiguous).
-#. PCT_PF_READS_ALIGNED: The percentage of PF reads that aligned to the reference sequence. PF_READS_ALIGNED / PF_READS
-#. PF_HQ_ALIGNED_READS: The number of PF reads that were aligned to the reference sequence with a mapping quality of Q20 or higher signifying that the aligner estimates a 1/100 (or smaller) chance that the alignment is wrong.
-#. PF_HQ_ALIGNED_BASES: The number of bases aligned to the reference sequence in reads that were mapped at high quality. Will usually approximate PF_HQ_ALIGNED_READS * READ_LENGTH but may differ when either mixed read lengths are present or many reads are aligned with gaps.
-#. PF_HQ_ALIGNED_Q20_BASES: The subest of PF_HQ_ALIGNED_BASES where the base call quality was Q20 or higher.
-#. PF_HQ_MEDIAN_MISMATCHES: The median number of mismatches versus the reference sequence in reads that were aligned to the reference at high quality (i.e. PF_HQ_ALIGNED READS).
-#. PF_HQ_ERROR_RATE: The percentage of bases that mismatch the reference in PF HQ aligned reads.
-#. MEAN_READ_LENGTH: The mean read length of the set of reads examined. When looking at the data for a single lane with equal length reads this number is just the read length. When looking at data for merged lanes with differing read lengths this is the mean read length of all reads.
-#. READS_ALIGNED_IN_PAIRS: The number of aligned reads who's mate pair was also aligned to the reference.
-#. PCT_READS_ALIGNED_IN_PAIRS: The percentage of reads who's mate pair was also aligned to the reference. READS_ALIGNED_IN_PAIRS / PF_READS_ALIGNED
-#. BAD_CYCLES: The number of instrument cycles in which 80% or more of base calls were no-calls.
-#. STRAND_BALANCE: The number of PF reads aligned to the positive strand of the genome divided by the number of PF reads aligned to the genome.
-#. PCT_CHIMERAS: The percentage of reads that map outside of a maximum insert size (usually 100kb) or that have the two ends mapping to different chromosomes.
-#. PCT_ADAPTER: The percentage of PF reads that are unaligned and match to a known adapter sequence right from the start of the read.
+ 1. CATEGORY: One of either UNPAIRED (for a fragment run), FIRST_OF_PAIR when metrics are for only the first read in a paired run, SECOND_OF_PAIR when the metrics are for only the second read in a paired run or PAIR when the metrics are aggregeted for both first and second reads in a pair.
+ 2. TOTAL_READS: The total number of reads including all PF and non-PF reads. When CATEGORY equals PAIR this value will be 2x the number of clusters.
+ 3. PF_READS: The number of PF reads where PF is defined as passing Illumina's filter.
+ 4. PCT_PF_READS: The percentage of reads that are PF (PF_READS / TOTAL_READS)
+ 5. PF_NOISE_READS: The number of PF reads that are marked as noise reads. A noise read is one which is composed entirey of A bases and/or N bases. These reads are marked as they are usually artifactual and are of no use in downstream analysis.
+ 6. PF_READS_ALIGNED: The number of PF reads that were aligned to the reference sequence. This includes reads that aligned with low quality (i.e. their alignments are ambiguous).
+ 7. PCT_PF_READS_ALIGNED: The percentage of PF reads that aligned to the reference sequence. PF_READS_ALIGNED / PF_READS
+ 8. PF_HQ_ALIGNED_READS: The number of PF reads that were aligned to the reference sequence with a mapping quality of Q20 or higher signifying that the aligner estimates a 1/100 (or smaller) chance that the alignment is wrong.
+ 9. PF_HQ_ALIGNED_BASES: The number of bases aligned to the reference sequence in reads that were mapped at high quality. Will usually approximate PF_HQ_ALIGNED_READS * READ_LENGTH but may differ when either mixed read lengths are present or many reads are aligned with gaps.
+ 10. PF_HQ_ALIGNED_Q20_BASES: The subest of PF_HQ_ALIGNED_BASES where the base call quality was Q20 or higher.
+ 11. PF_HQ_MEDIAN_MISMATCHES: The median number of mismatches versus the reference sequence in reads that were aligned to the reference at high quality (i.e. PF_HQ_ALIGNED READS).
+ 12. PF_HQ_ERROR_RATE: The percentage of bases that mismatch the reference in PF HQ aligned reads.
+ 13. MEAN_READ_LENGTH: The mean read length of the set of reads examined. When looking at the data for a single lane with equal length reads this number is just the read length. When looking at data for merged lanes with differing read lengths this is the mean read length of all reads.
+ 14. READS_ALIGNED_IN_PAIRS: The number of aligned reads who's mate pair was also aligned to the reference.
+ 15. PCT_READS_ALIGNED_IN_PAIRS: The percentage of reads who's mate pair was also aligned to the reference. READS_ALIGNED_IN_PAIRS / PF_READS_ALIGNED
+ 16. BAD_CYCLES: The number of instrument cycles in which 80% or more of base calls were no-calls.
+ 17. STRAND_BALANCE: The number of PF reads aligned to the positive strand of the genome divided by the number of PF reads aligned to the genome.
+ 18. PCT_CHIMERAS: The percentage of reads that map outside of a maximum insert size (usually 100kb) or that have the two ends mapping to different chromosomes.
+ 19. PCT_ADAPTER: The percentage of PF reads that are unaligned and match to a known adapter sequence right from the start of the read.
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
-
------
-
-.. class:: infomark
-
-**Typical tool invocation without Galaxy is on a command line - eg:**
-
-java -jar /share/shared/galaxy/tool-data/shared/jars/CollectAlignmentSummaryMetrics.jar REFERENCE_SEQUENCE="hg18.fasta" ASSUME_SORTED=true ADAPTER_SEQUENCE='' IS_BISULFITE_SEQUENCED=false INPUT=test.bam OUTPUT=picardASMetrics.txt VALIDATION_STRINGENCY=LENIENT
-
-Note that last parameter - your life will be far easier if you use it.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
</help>
--- a/tools/picard/rgPicardFixMate.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/rgPicardFixMate.xml Fri May 20 13:26:45 2011 -0400
@@ -6,8 +6,8 @@
</command><requirements><requirement type="package">picard</requirement></requirements><inputs>
- <param format="bam,sam" name="input_file" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library"/>
+ <param format="bam,sam" name="input_file" type="data" label="SAM/BAM dataset to fix"
+ help="If empty, upload or import a SAM/BAM dataset."/><param name="sortOrder" type="select" help="If in doubt, leave as default and read Picard/Samtools documentation"
label="Sort order"><option value="coordinate" selected ="true">Coordinate sort</option>
@@ -15,8 +15,8 @@
<option value="unsorted">Unsorted - docs not clear if this means unchanged or not</option></param><param name="out_prefix" value="Fix Mate" type="text"
- label="Title for the output file - use this remind you what the job was for" size="80" />
- <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output bam instead of sam" help="Uncheck for sam output" />
+ label="Title for the output file" help="Use this remind you what the job was for." size="80" />
+ <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" /></inputs><outputs><data format="bam" name="out_file" label="${tool.name} on ${on_string}: ${outputFormat} with fixed mates">
@@ -61,8 +61,8 @@
**Useful for paired data only**
Likely won't do anything helpful for single end sequence data
-Currently, Galaxy doesn't distinguish paired from single ended sam/bam so make sure
-the data you choose are valid (paired end) sam or bam data - unless you trust this
+Currently, Galaxy doesn't distinguish paired from single ended SAM/BAM so make sure
+the data you choose are valid (paired end) SAM or BAM data - unless you trust this
tool not to harm your data.
-----
@@ -71,10 +71,10 @@
**Syntax**
-- **Input** is a paired read sam/bam format aligned short read data in your current history
-- **Sort order** can be used to adjust the ordering of reads
-- **Title** is the title to use for all output files from this job - use it for high level metadata
-- **Output Format** is either sam or compressed as bam
+- **Input** - a paired read sam/bam format aligned short read data in your current history
+- **Sort order** - can be used to adjust the ordering of reads
+- **Title** - the title to use for all output files from this job - use it for high level metadata
+- **Output Format** - either SAM or compressed as BAM
-----
@@ -82,7 +82,7 @@
**Inputs, outputs, and parameters**
-.. csv-table:: Fixmate
+.. csv-table::
:header-rows: 1
@@ -94,12 +94,11 @@
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
</help>
--- a/tools/picard/rgPicardGCBiasMetrics.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/rgPicardGCBiasMetrics.xml Fri May 20 13:26:45 2011 -0400
@@ -1,30 +1,28 @@
-<tool name="Sam/bam GC Bias Metrics" id="PicardGCBiasMetrics" version="0.01">
+<tool name="SAM/BAM GC Bias Metrics" id="PicardGCBiasMetrics" version="0.01"><command interpreter="python">
picard_wrapper.py -i "$input_file" -d "$html_file.files_path" -t "$html_file"
--windowsize "$windowsize" --mingenomefrac "$mingenomefrac" -n "$out_prefix" --tmpdir "${__new_file_path__}"
- -j ${GALAXY_DATA_INDEX_DIR}/shared/jars/CollectGcBiasMetrics.jar -x "$maxheap"
+ -j ${GALAXY_DATA_INDEX_DIR}/shared/jars/CollectGcBiasMetrics.jar
#if $genomeSource.refGenomeSource == "history":
--ref-file "$genomeSource.ownFile"
#else:
--ref "${ filter( lambda x: str( x[0] ) == str( $genomeSource.index ), $__app__.tool_data_tables[ 'all_fasta' ].get_fields() )[0][-1] }"
#end if
-
</command><requirements><requirement type="package">picard</requirement></requirements><inputs>
- <param format="sam,bam" name="input_file" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library"/>
+ <param format="sam,bam" name="input_file" type="data" label="SAM/BAM dataset to generateGC bias metrics"
+ help="If empty, upload or import a SAM/BAM dataset."/><param name="out_prefix" value="Short Read GC Bias Metrics" type="text"
- label="Title for the output file - use this remind you what the job was for" size="80" />
+ label="Title for the output file" help="Use this remind you what the job was for." size="80" /><conditional name="genomeSource">
- <param name="refGenomeSource" type="select" help="This tool needs a reference genome. Default is usually right"
- label="Align to which reference genome? - default, built-in or choose from current history">
- <option value="default" selected="true">Default - use the input data genome build</option>
- <option value="indexed">Select a different built-in genome </option>
- <option value="history">Use a genome (fasta format) from my history </option>
+ <param name="refGenomeSource" type="select" label="Select Reference Genome">
+ <option value="default" selected="true">Use the assigned data genome/build</option>
+ <option value="indexed">Select a different built-in genome</option>
+ <option value="history">Use a genome (fasta format) from my history</option></param><when value="default">
- <param name="index" type="select" label="Select a default reference genome">
+ <param name="index" type="select" label="Check the assigned reference genome" help="Galaxy thinks that the reads in you dataset were aligned against this reference. If this is not correct, use the 'Select a build-in reference genome' option of the 'Select Reference Genome' dropdown to select approprtiate Reference."><options from_data_table="all_fasta"><filter type="data_meta" ref="input_file" key="dbkey" column="dbkey" multiple="True" separator=","/><validator type="no_options" message="No reference build available for the selected input data" />
@@ -32,18 +30,23 @@
</param></when><when value="indexed">
- <param name="index" type="select" label="Select a built-in reference genome">
+ <param name="index" type="select" label="Select a built-in reference genome" help="This list contains genomes cached at this Galaxy instance. If your genome of interest is not present here request it by using 'Help' link at the top of Galaxy interface or use the 'Use a genome (fasta format) from my history' option of the 'Select Reference Genome' dropdown."><options from_data_table="all_fasta"/></param></when><when value="history">
- <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome from history" />
+ <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome from history" help="This option works best for relatively small genomes. If you are working with large human-sized genomes, send request to Galaxy team for adding your reference to this Galaxy instance by using 'Help' link at the top of Galaxy interface."/></when></conditional><param name="windowsize" type="integer" label="GC minimum window size" value="100"
- help="The size of windows on the genome that are used to bin reads. Default value: 100"/>
+ help="The size of windows on the genome that are used to bin reads. Default value: 100."/><param name="mingenomefrac" value="0.00001" type="float" label="Minimum Genome Fraction"
help="For summary metrics, exclude GC windows that include less than this fraction of the genome. Default value: 1.0E-5." />
+ <!--
+
+ Users can be enabled to set Java heap size by uncommenting this option and adding '-x "$maxheap"' to the <command> tag.
+ If commented out the heapsize defaults to the value specified within picard_wrapper.py
+
<param name="maxheap" type="select" help="If in doubt, choose 8G and read Picard documentation please"
label="Java heap size"><option value="1G">1GB: very small data</option>
@@ -52,6 +55,8 @@
<option value="8G" >8GB use if 4GB fails</option><option value="16G">16GB - try this if 8GB fails</option></param>
+
+ --></inputs><outputs>
@@ -90,9 +95,14 @@
**Syntax**
-- **Input** is sam/bam format aligned short read data in your current history
-- **Title** is the title to use for all output files from this job - use it for high level metadata
-- **Refseq** is the sequence you want to interogate - eg hg19 - can be Galaxy built-in or a special one from your history
+- **Input** - SAM/BAM format aligned short read data in your current history
+- **Title** - the title to use for all output files from this job - use it for high level metadata
+- **Reference Genome** - Galaxy (and Picard) needs to know which genomic reference was used to generate alignemnts within the input SAM/BAM dataset. Here you have three choices:
+
+ - *Assigned data genome/build* - a genome specified for this dataset. If you your SAM/BAM dataset has an assigned reference genome it will be displayed below this dropdown. If it does not -> use one of the following two options.
+ - *Select a different built-in genome* - this option will list all reference genomes presently cached at this instance of Galaxy.
+ - *Select a reference genome from history* - alternatively you can upload your own version of reference genome into your history and use it with this option. This is however not advisable with large human-sized genomes. If your genome is large contact Galaxy team using "Help" link at the top of the interface and provide exact details on where we can download sequences you would like to use as the refenece. We will then install them as a part of locally cached genomic references.
+
- **Window Size** see Picard documentation http://picard.sourceforge.net/command-line-overview.shtml#CollectGCBiasMetr…
- **Minimum Genome Fraction** See Picard documentation at http://picard.sourceforge.net/command-line-overview.shtml#CollectGCBiasMetr…
@@ -104,7 +114,7 @@
The Picard documentation (reformatted for Galaxy) says:
-.. csv-table:: GC Bias Doc
+.. csv-table::
:header-rows: 1
Option,Description
@@ -117,33 +127,22 @@
"MINIMUM_GENOME_FRACTION=Double","For summary metrics, exclude GC windows that include less than this fraction of the genome. Default value: 1.0E-5."
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false."
-The output produced by the tool has the following columns:
+The output produced by the tool has the following columns::
-#. GC: The G+C content of the reference sequence represented by this bin. Values are from 0% to 100%
-#. WINDOWS: The number of windows on the reference genome that have this G+C content.
-#. READ_STARTS: The number of reads who's start position is at the start of a window of this GC.
-#. MEAN_BASE_QUALITY: The mean quality (determined via the error rate) of all bases of all reads that are assigned to windows of this GC.
-#. NORMALIZED_COVERAGE: The ration of "coverage" in this GC bin vs. the mean coverage of all GC bins. A number of 1 represents mean coverage, a number less than one represents lower than mean coverage (e.g. 0.5 means half as much coverage as average) while a number greater than one represents higher than mean coverage (e.g. 3.1 means this GC bin has 3.1 times more reads per window than average).
-#. ERROR_BAR_WIDTH: The radius of error bars in this bin based on the number of observations made. For example if the normalized coverage is 0.75 and the error bar width is 0.1 then the error bars would be drawn from 0.65 to 0.85.
+ 1. GC: The G+C content of the reference sequence represented by this bin. Values are from 0% to 100%
+ 2. WINDOWS: The number of windows on the reference genome that have this G+C content.
+ 3. READ_STARTS: The number of reads who's start position is at the start of a window of this GC.
+ 4. MEAN_BASE_QUALITY: The mean quality (determined via the error rate) of all bases of all reads that are assigned to windows of this GC.
+ 5. NORMALIZED_COVERAGE: The ration of "coverage" in this GC bin vs. the mean coverage of all GC bins. A number of 1 represents mean coverage, a number less than one represents lower than mean coverage (e.g. 0.5 means half as much coverage as average) while a number greater than one represents higher than mean coverage (e.g. 3.1 means this GC bin has 3.1 times more reads per window than average).
+ 6. ERROR_BAR_WIDTH: The radius of error bars in this bin based on the number of observations made. For example if the normalized coverage is 0.75 and the error bar width is 0.1 then the error bars would be drawn from 0.65 to 0.85.
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
-
------
-
-.. class:: infomark
-
-**Typical tool invocation without Galaxy is on a command line - eg:**
-
-java -jar /share/shared/galaxy/tool-data/shared/jars/CollectGcBiasMetrics.jar REFERENCE_SEQUENCE="hg18.fasta"
-MINIMUM_GENOME_FRACTION=0.00001 INPUT=test.bam OUTPUT=picardASMetrics.txt OUTPUT=test.txt CHART_OUTPUT=test.pdf
-WINDOW_SIZE=100 VALIDATION_STRINGENCY=LENIENT
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
</help></tool>
--- a/tools/picard/rgPicardHsMetrics.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/rgPicardHsMetrics.xml Fri May 20 13:26:45 2011 -0400
@@ -1,25 +1,32 @@
-<tool name="Sam/bam Hybrid Selection Metrics" id="PicardHsMetrics" version="0.01">
- <description>For (eg exome) targeted data</description>
+<tool name="SAM/BAM Hybrid Selection Metrics" id="PicardHsMetrics" version="0.01">
+ <description>for targeted resequencing data</description><command interpreter="python">
picard_wrapper.py -i "$input_file" -d "$html_file.files_path" -t "$html_file" --datatype "$input_file.ext"
--baitbed "$bait_bed" --targetbed "$target_bed" -n "$out_prefix" --tmpdir "${__new_file_path__}"
- -j "${GALAXY_DATA_INDEX_DIR}/shared/jars/CalculateHsMetrics.jar" -x "$maxheap"
+ -j "${GALAXY_DATA_INDEX_DIR}/shared/jars/CalculateHsMetrics.jar"
</command><requirements><requirement type="package">picard</requirement></requirements><inputs>
- <param format="sam,bam" name="input_file" type="data" label="Sam or bam format short read from your current history" />
- <param name="out_prefix" value="Picard HS Metrics" type="text" label="Title for the output file - to remind you what the job was for" size="80" />
- <param name="bait_bed" type="data" format="interval" label="Bait intervals: Sequences for bait in the design - ucsc BED" size="80" />
- <param name="target_bed" type="data" format="interval" label="Target intervals: Sequences for targets in the design - ucsc BED" size="80" />
+ <param format="sam,bam" name="input_file" type="data" label="SAM/BAM dataset to generate statistics for" />
+ <param name="out_prefix" value="Picard HS Metrics" type="text" label="Title for the output file" help="Use to remind you what the job was for." size="80" />
+ <param name="bait_bed" type="data" format="interval" label="Bait intervals: Sequences for bait in the design" help="In UCSC BED format" size="80" />
+ <param name="target_bed" type="data" format="interval" label="Target intervals: Sequences for targets in the design" help="In UCSC BED format" size="80" />
+ <!--
+
+ Users can be enabled to set Java heap size by uncommenting this option and adding '-x "$maxheap"' to the <command> tag.
+ If commented out the heapsize defaults to the value specified within picard_wrapper.py
+
<param name="maxheap" type="select"
help="If in doubt, try the default. If it fails with a complaint about java heap size, try increasing it please - larger jobs will require your own hardware."
label="Java heap size"><option value="4G" selected = "true">4GB default </option><option value="8G" >8GB use if 4GB fails</option><option value="16G">16GB - try this if 8GB fails</option>
- </param>
+ </param>
+
+ --></inputs><outputs><data format="html" name="html_file" label="${out_prefix}.html" />
@@ -44,12 +51,9 @@
**Picard documentation**
-This is a Galaxy wrapper for CalculateHsMetrics_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for CollectAlignmentSummaryMetrics, a part of the external package Picard-tools_.
- .. _CalculateHsMetrics: http://picard.sourceforge.net/command-line-overview.shtml#CalculateHsMetrics
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
-----
@@ -61,7 +65,7 @@
Calculates a set of Hybrid Selection specific metrics from an aligned SAM or BAM file.
-.. csv-table:: HsDoc
+.. csv-table::
:header-rows: 1
"Option", "Description"
@@ -76,61 +80,52 @@
The set of metrics captured that are specific to a hybrid selection analysis.
-Output Column Definitions
+Output Column Definitions::
-#. BAIT_SET: The name of the bait set used in the hybrid selection.
-#. GENOME_SIZE: The number of bases in the reference genome used for alignment.
-#. BAIT_TERRITORY: The number of bases which have one or more baits on top of them.
-#. TARGET_TERRITORY: The unique number of target bases in the experiment where target is usually exons etc.
-#. BAIT_DESIGN_EFFICIENCY: Target terrirtoy / bait territory. 1 == perfectly efficient, 0.5 = half of baited bases are not target.
-#. TOTAL_READS: The total number of reads in the SAM or BAM file examine.
-#. PF_READS: The number of reads that pass the vendor's filter.
-#. PF_UNIQUE_READS: The number of PF reads that are not marked as duplicates.
-#. PCT_PF_READS: PF reads / total reads. The percent of reads passing filter.
-#. PCT_PF_UQ_READS: PF Unique Reads / Total Reads.
-#. PF_UQ_READS_ALIGNED: The number of PF unique reads that are aligned with mapping score > 0 to the reference genome.
-#. PCT_PF_UQ_READS_ALIGNED: PF Reads Aligned / PF Reads.
-#. PF_UQ_BASES_ALIGNED: The number of bases in the PF aligned reads that are mapped to a reference base. Accounts for clipping and gaps.
-#. ON_BAIT_BASES: The number of PF aligned bases that mapped to a baited region of the genome.
-#. NEAR_BAIT_BASES: The number of PF aligned bases that mapped to within a fixed interval of a baited region, but not on a baited region.
-#. OFF_BAIT_BASES: The number of PF aligned bases that mapped to neither on or near a bait.
-#. ON_TARGET_BASES: The number of PF aligned bases that mapped to a targetted region of the genome.
-#. PCT_SELECTED_BASES: On+Near Bait Bases / PF Bases Aligned.
-#. PCT_OFF_BAIT: The percentage of aligned PF bases that mapped neither on or near a bait.
-#. ON_BAIT_VS_SELECTED: The percentage of on+near bait bases that are on as opposed to near.
-#. MEAN_BAIT_COVERAGE: The mean coverage of all baits in the experiment.
-#. MEAN_TARGET_COVERAGE: The mean coverage of targets that recieved at least coverage depth = 2 at one base.
-#. PCT_USABLE_BASES_ON_BAIT: The number of aligned, de-duped, on-bait bases out of the PF bases available.
-#. PCT_USABLE_BASES_ON_TARGET: The number of aligned, de-duped, on-target bases out of the PF bases available.
-#. FOLD_ENRICHMENT: The fold by which the baited region has been amplified above genomic background.
-#. ZERO_CVG_TARGETS_PCT: The number of targets that did not reach coverage=2 over any base.
-#. FOLD_80_BASE_PENALTY: The fold over-coverage necessary to raise 80% of bases in "non-zero-cvg" targets to the mean coverage level in those targets.
-#. PCT_TARGET_BASES_2X: The percentage of ALL target bases acheiving 2X or greater coverage.
-#. PCT_TARGET_BASES_10X: The percentage of ALL target bases acheiving 10X or greater coverage.
-#. PCT_TARGET_BASES_20X: The percentage of ALL target bases acheiving 20X or greater coverage.
-#. PCT_TARGET_BASES_30X: The percentage of ALL target bases acheiving 30X or greater coverage.
-#. HS_LIBRARY_SIZE: The estimated number of unique molecules in the selected part of the library.
-#. HS_PENALTY_10X: The "hybrid selection penalty" incurred to get 80% of target bases to 10X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 10X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 10 * HS_PENALTY_10X.
-#. HS_PENALTY_20X: The "hybrid selection penalty" incurred to get 80% of target bases to 20X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 20X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 20 * HS_PENALTY_20X.
-#. HS_PENALTY_30X: The "hybrid selection penalty" incurred to get 80% of target bases to 10X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 30X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 30 * HS_PENALTY_30X.
+ 1. BAIT_SET: The name of the bait set used in the hybrid selection.
+ 2. GENOME_SIZE: The number of bases in the reference genome used for alignment.
+ 3. BAIT_TERRITORY: The number of bases which have one or more baits on top of them.
+ 4. TARGET_TERRITORY: The unique number of target bases in the experiment where target is usually exons etc.
+ 5. BAIT_DESIGN_EFFICIENCY: Target terrirtoy / bait territory. 1 == perfectly efficient, 0.5 = half of baited bases are not target.
+ 6. TOTAL_READS: The total number of reads in the SAM or BAM file examine.
+ 7. PF_READS: The number of reads that pass the vendor's filter.
+ 8. PF_UNIQUE_READS: The number of PF reads that are not marked as duplicates.
+ 9. PCT_PF_READS: PF reads / total reads. The percent of reads passing filter.
+ 10. PCT_PF_UQ_READS: PF Unique Reads / Total Reads.
+ 11. PF_UQ_READS_ALIGNED: The number of PF unique reads that are aligned with mapping score > 0 to the reference genome.
+ 12. PCT_PF_UQ_READS_ALIGNED: PF Reads Aligned / PF Reads.
+ 13. PF_UQ_BASES_ALIGNED: The number of bases in the PF aligned reads that are mapped to a reference base. Accounts for clipping and gaps.
+ 14. ON_BAIT_BASES: The number of PF aligned bases that mapped to a baited region of the genome.
+ 15. NEAR_BAIT_BASES: The number of PF aligned bases that mapped to within a fixed interval of a baited region, but not on a baited region.
+ 16. OFF_BAIT_BASES: The number of PF aligned bases that mapped to neither on or near a bait.
+ 17. ON_TARGET_BASES: The number of PF aligned bases that mapped to a targetted region of the genome.
+ 18. PCT_SELECTED_BASES: On+Near Bait Bases / PF Bases Aligned.
+ 19. PCT_OFF_BAIT: The percentage of aligned PF bases that mapped neither on or near a bait.
+ 20. ON_BAIT_VS_SELECTED: The percentage of on+near bait bases that are on as opposed to near.
+ 21. MEAN_BAIT_COVERAGE: The mean coverage of all baits in the experiment.
+ 22. MEAN_TARGET_COVERAGE: The mean coverage of targets that recieved at least coverage depth = 2 at one base.
+ 23. PCT_USABLE_BASES_ON_BAIT: The number of aligned, de-duped, on-bait bases out of the PF bases available.
+ 24. PCT_USABLE_BASES_ON_TARGET: The number of aligned, de-duped, on-target bases out of the PF bases available.
+ 25. FOLD_ENRICHMENT: The fold by which the baited region has been amplified above genomic background.
+ 26. ZERO_CVG_TARGETS_PCT: The number of targets that did not reach coverage=2 over any base.
+ 27. FOLD_80_BASE_PENALTY: The fold over-coverage necessary to raise 80% of bases in "non-zero-cvg" targets to the mean coverage level in those targets.
+ 28. PCT_TARGET_BASES_2X: The percentage of ALL target bases acheiving 2X or greater coverage.
+ 29. PCT_TARGET_BASES_10X: The percentage of ALL target bases acheiving 10X or greater coverage.
+ 30. PCT_TARGET_BASES_20X: The percentage of ALL target bases acheiving 20X or greater coverage.
+ 31. PCT_TARGET_BASES_30X: The percentage of ALL target bases acheiving 30X or greater coverage.
+ 32. HS_LIBRARY_SIZE: The estimated number of unique molecules in the selected part of the library.
+ 33. HS_PENALTY_10X: The "hybrid selection penalty" incurred to get 80% of target bases to 10X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 10X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 10 * HS_PENALTY_10X.
+ 34. HS_PENALTY_20X: The "hybrid selection penalty" incurred to get 80% of target bases to 20X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 20X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 20 * HS_PENALTY_20X.
+ 35. HS_PENALTY_30X: The "hybrid selection penalty" incurred to get 80% of target bases to 10X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 30X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 30 * HS_PENALTY_30X.
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
------
-
-.. class:: infomark
-
-**Typical tool invocation without Galaxy is on a command line - eg:**
-
-java -jar /share/shared/galaxy/tool-data/shared/jars/CalculateHsMetrics.jar BAIT_INTERVALS=test.pic TARGET_INTERVALS=test.pic INPUT=test.bam
-OUTPUT=picardHsMetrics.txt VALIDATION_STRINGENCY=LENIENT
</help></tool>
--- a/tools/picard/rgPicardInsertSize.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/rgPicardInsertSize.xml Fri May 20 13:26:45 2011 -0400
@@ -7,15 +7,15 @@
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/CollectInsertSizeMetrics.jar" -d "$html_file.files_path" -t "$html_file"
</command><inputs>
- <param format="bam,sam" name="input_file" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library"/>
+ <param format="bam,sam" name="input_file" type="data" label="SAM/BAM dataset to generate statistics for"
+ help="If empty, upload or import a SAM/BAM dataset."/><param name="out_prefix" value="Insertion size metrics" type="text"
- label="Title for the output file - use this remind you what the job was for" size="120" />
+ label="Title for the output file" help="Use this remind you what the job was for" size="120" /><param name="tailLimit" value="10000" type="integer"
label="Tail limit" size="5"
help="When calculating mean and stdev stop when the bins in the tail of the distribution contain fewer than mode/TAIL_LIMIT items" /><param name="histWidth" value="0" type="integer"
- label="Histogram Width" size="5"
+ label="Histogram width" size="5"
help="Explicitly sets the histogram width, overriding the TAIL_LIMIT option - leave 0 to ignore" /><param name="minPct" value="0.01" type="float"
label="Minimum percentage" size="5"
@@ -64,7 +64,7 @@
Picard documentation says (reformatted for Galaxy):
-.. csv-table:: Insert size metrics docs
+.. csv-table::
:header-rows: 1
Option,Description
@@ -79,12 +79,11 @@
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
</help></tool>
--- a/tools/picard/rgPicardLibComplexity.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/rgPicardLibComplexity.xml Fri May 20 13:26:45 2011 -0400
@@ -5,12 +5,12 @@
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/EstimateLibraryComplexity.jar" -d "$html_file.files_path" -t "$html_file"
</command><inputs>
- <param format="bam,sam" name="input_file" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library"/>
+ <param format="bam,sam" name="input_file" type="data" label="SAM/BAM dataset"
+ help="If empty, upload or import a SAM/BAM dataset."/><param name="out_prefix" value="Library Complexity" type="text"
- label="Title for the output file - use this remind you what the job was for" size="80" />
+ label="Title for the output file" help="Use this remind you what the job was for." size="80" /><param name="minIDbases" value="5" type="integer" label="Minimum identical bases at starts of reads for grouping" size="5"
- help="Total_reads / 4^max_id_bases reads will be compared at a time. Lower numbers = more accurate results and exponentially more time/ram" />
+ help="Total_reads / 4^max_id_bases reads will be compared at a time. Lower numbers = more accurate results and exponentially more time/memory." /><param name="maxDiff" value="0.03" type="float"
label="Maximum difference rate for identical reads" size="5"
help="The maximum rate of differences between two reads to call them identical" />
@@ -84,7 +84,7 @@
Picard documentation says (reformatted for Galaxy):
-.. csv-table:: Estimate complexity docs
+.. csv-table::
:header-rows: 1
Option Description
@@ -99,12 +99,11 @@
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
.. class:: infomark
--- a/tools/picard/rgPicardMarkDups.xml Fri May 20 06:17:35 2011 +0100
+++ b/tools/picard/rgPicardMarkDups.xml Fri May 20 13:26:45 2011 -0400
@@ -6,16 +6,16 @@
</command><requirements><requirement type="package">picard</requirement></requirements><inputs>
- <param format="bam,sam" name="input_file" type="data" label="Input: sam or bam format short read data in your current history"
- help="If the select list is empty, you need to upload or import some aligned short read data from a shared library"/>
+ <param format="bam,sam" name="input_file" type="data" label="SAM/BAM dataset to mark duplicates in"
+ help="If empty, upload or import a SAM/BAM dataset."/><param name="out_prefix" value="Dupes Marked" type="text"
- label="Title for the output file - use this remind you what the job was for" size="80" />
+ label="Title for the output file" help="Use this remind you what the job was for" size="80" /><param name="remDups" value="false" type="boolean" label="Remove duplicates from output file"
truevalue="true" falsevalue="false" checked="yes"
- help="If true do not write duplicates to the output file instead of writing them with appropriate flags set" />
+ help="If true do not write duplicates to the output file instead of writing them with appropriate flags set." /><param name="assumeSorted" value="true" type="boolean" label="Assume reads are already ordered"
truevalue="true" falsevalue="false" checked="yes"
- help="If true assume input data are already sorted (most Galaxy sam/bam should be)" />
+ help="If true assume input data are already sorted (most Galaxy SAM/BAM should be)." /><param name="readRegex" value="[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*" type="text" size="80"
label="Regular expression that can be used to parse read names in the incoming SAM file"
help="Names are parsed to extract: tile/region, x coordinate and y coordinate, to estimate optical duplication rate" >
@@ -30,7 +30,7 @@
</param><param name="optDupeDist" value="100" type="integer"
label="The maximum offset between two duplicate clusters in order to consider them optical duplicates." size="5"
- help="e.g. 5-10 pixels. Later Illumina software versions multiply pixel values by 10, in which case 50-100" >
+ help="e.g. 5-10 pixels. Later Illumina software versions multiply pixel values by 10, in which case 50-100." ><validator type="in_range" message="Minimum optical dupe distance must be positive" min="0" /></param>
@@ -68,7 +68,7 @@
**Purpose**
-Marks all duplicate reads in a provided sam or bam file and either removes them or flags them.
+Marks all duplicate reads in a provided SAM or BAM file and either removes them or flags them.
**Picard documentation**
@@ -100,27 +100,19 @@
.. class:: warningmark
-**Warning on Sam quality**
+**Warning on SAM/BAM quality**
-Unfortunately some packages seem perfectly capable of producing sam and bam files
-that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
-flag, which allows reads to be discarded if they're empty or don't map. This appears
-to be the only way to deal with sam that cannot be parsed.
-
+Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
+flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with SAM/BAM that cannot be parsed.
.. class:: infomark
**Note on the Regular Expression**
- (from the Picard docs)
- This tool requires a valid regular expression to parse out the read names in the incoming SAM or BAM file.
- These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size.
- The regular expression should contain three capture groups for the three variables, in order.
- Default value: [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
+(from the Picard docs)
+This tool requires a valid regular expression to parse out the read names in the incoming SAM or BAM file. These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size. The regular expression should contain three capture groups for the three variables, in order. Default value: [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).
- Examines aligned records in the supplied SAM or BAM file to locate duplicate molecules.
- All records are then written to the output file with the duplicate records flagged unless the
- remove duplicates option is selected. In some cases you may want to do this, but please only do
- this if you really understand what you are doing.
+Examines aligned records in the supplied SAM or BAM file to locate duplicate molecules. All records are then written to the output file with the duplicate records flagged unless the remove duplicates option is selected. In some cases you may want to do this, but please only do this if you really understand what you are doing.
</help></tool>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/316f79f7bc1a/
changeset: r5589:316f79f7bc1a
user: dan
date: 2011-05-20 07:17:35
summary: Fix typo (val to value).
affected #: 1 file (4 bytes)
--- a/lib/galaxy/tools/__init__.py Thu May 19 15:38:12 2011 -0400
+++ b/lib/galaxy/tools/__init__.py Fri May 20 06:17:35 2011 +0100
@@ -1854,7 +1854,7 @@
if isinstance( value, dict ):
rval.append( self._prepare_datasource_json_param_dict( value ) )
elif isinstance( value, list ):
- rval.append( self._prepare_datasource_json_list( val ) )
+ rval.append( self._prepare_datasource_json_list( value ) )
else:
rval.append( str( value ) )
return rval
@@ -1864,7 +1864,7 @@
if isinstance( value, dict ):
rval[ key ] = self._prepare_datasource_json_param_dict( value )
elif isinstance( value, list ):
- rval[ key ] = self._prepare_datasource_json_list( val )
+ rval[ key ] = self._prepare_datasource_json_list( value )
else:
rval[ key ] = str( value )
return rval
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/e2128e1c95ba/
changeset: r5588:e2128e1c95ba
user: kellyv
date: 2011-05-19 21:38:12
summary: Added hg_g1k_v37 to manual builds
affected #: 1 file (29 bytes)
--- a/tool-data/shared/ucsc/manual_builds.txt Thu May 19 14:29:58 2011 -0400
+++ b/tool-data/shared/ucsc/manual_builds.txt Thu May 19 15:38:12 2011 -0400
@@ -700,3 +700,4 @@
Zea_mays_B73_RefGen_v2 Maize (Zea mays) chr1=301354135,chr2=237068928,chr3=232140222,chr4=241473566,chr5=217872898,chr6=169174371,chr7=176764813,chr8=175793772,chr9=156750718,chr10=150189513,chr11=7140224
Homo_sapiens_AK1 Korean Man chrM=16571,chr1=247249719,chr2=242951149,chr3=199501827,chr4=191273063,chr5=180857866,chr6=170899992,chr7=158821424,chr8=146274826,chr9=140273252,chr10=135374737,chr11=134452384,chr12=132349534,chr13=114142980,chr14=106368585,chr15=100338915,chr16=88827254,chr17=78774742,chr18=76117153,chr19=63811651,chr20=62435964,chr21=46944323,chr22=49691432,chrX=154913754,chrY=57772954
Tcas_3.0 Red Flour Beetle (Tribolium castaneum)
+hg_g1k_v37 Homo sapiens b37
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: jgoecks: Trackster bug fixes when (a) running tools in a shared visualization and (b) when drawing a track created by a tool.
by Bitbucket 19 May '11
by Bitbucket 19 May '11
19 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/7eb9191a9668/
changeset: r5587:7eb9191a9668
user: jgoecks
date: 2011-05-19 20:29:58
summary: Trackster bug fixes when (a) running tools in a shared visualization and (b) when drawing a track created by a tool.
affected #: 2 files (176 bytes)
--- a/static/scripts/trackster.js Thu May 19 13:47:52 2011 -0400
+++ b/static/scripts/trackster.js Thu May 19 14:29:58 2011 -0400
@@ -292,7 +292,7 @@
}
*/
- // Look for key in cache and, if found, do callback.
+ // Look for entry and return if found.
var entry = this.get(this.gen_key(low, high, mode));
if (entry) {
return entry;
@@ -1867,6 +1867,10 @@
* tiles after drawing new tiles.
*/
draw: function(force, clear_after) {
+ // Cannot draw without dataset_id; dataset_id may not be set if track dynamically created
+ // and is waiting for dataset.
+ if (!this.dataset_id) { return; }
+
var low = this.view.low,
high = this.view.high,
range = high - low,
--- a/templates/visualization/display.mako Thu May 19 13:47:52 2011 -0400
+++ b/templates/visualization/display.mako Thu May 19 14:29:58 2011 -0400
@@ -64,7 +64,7 @@
var default_data_url = "${h.url_for( controller='/tracks', action='data' )}",
raw_data_url = "${h.url_for( controller='/tracks', action='raw_data' )}",
run_tool_url = "${h.url_for( controller='/tracks', action='run_tool' )}",
- rerun_tool_url = "${h.url_for( controller='/tracks', action='run_tool' )}",
+ rerun_tool_url = "${h.url_for( controller='/tracks', action='rerun_tool' )}",
reference_url = "${h.url_for( controller='/tracks', action='reference' )}",
chrom_url = "${h.url_for( controller='/tracks', action='chroms' )}",
dataset_state_url = "${h.url_for( controller='/tracks', action='dataset_state' )}",
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: jgoecks: Trackster: have child track inherit mode from parent track.
by Bitbucket 19 May '11
by Bitbucket 19 May '11
19 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/3335a0aef0b1/
changeset: r5586:3335a0aef0b1
user: jgoecks
date: 2011-05-19 19:47:52
summary: Trackster: have child track inherit mode from parent track.
affected #: 2 files (450 bytes)
--- a/static/scripts/packed/trackster.js Thu May 19 10:07:53 2011 -0400
+++ b/static/scripts/packed/trackster.js Thu May 19 13:47:52 2011 -0400
@@ -1,1 +1,1 @@
-var class_module=function(b,a){var c=function(){var f=arguments[0];for(var e=1;e<arguments.length;e++){var d=arguments[e];for(key in d){f[key]=d[key]}}return f};a.extend=c};var BEFORE=1001,CONTAINS=1002,OVERLAP_START=1003,OVERLAP_END=1004,CONTAINED_BY=1005,AFTER=1006;var compute_overlap=function(e,b){var g=e[0],f=e[1],d=b[0],c=b[1],a;if(g<d){if(f<d){a=BEFORE}else{if(f<=c){a=OVERLAP_START}else{a=CONTAINS}}}else{if(g>c){a=AFTER}else{if(f<=c){a=CONTAINED_BY}else{a=OVERLAP_END}}}return a};var is_overlap=function(c,b){var a=compute_overlap(c,b);return(a!==BEFORE&&a!==AFTER)};var trackster_module=function(f,S){var n=f("class").extend,p=f("slotting"),H=f("painters");var Y=function(Z,aa){this.document=Z;this.default_font=aa!==undefined?aa:"9px Monaco, Lucida Console, monospace";this.dummy_canvas=this.new_canvas();this.dummy_context=this.dummy_canvas.getContext("2d");this.dummy_context.font=this.default_font;this.char_width_px=this.dummy_context.measureText("A").width;this.patterns={};this.load_pattern("right_strand","/visualization/strand_right.png");this.load_pattern("left_strand","/visualization/strand_left.png");this.load_pattern("right_strand_inv","/visualization/strand_right_inv.png");this.load_pattern("left_strand_inv","/visualization/strand_left_inv.png")};n(Y.prototype,{load_pattern:function(Z,ad){var aa=this.patterns,ab=this.dummy_context,ac=new Image();ac.src=image_path+ad;ac.onload=function(){aa[Z]=ab.createPattern(ac,"repeat")}},get_pattern:function(Z){return this.patterns[Z]},new_canvas:function(){var Z=this.document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(Z)}Z.manager=this;return Z}});var B=function(Z,aa){Z.bind("drag",{handle:aa,relative:true},function(ae,af){var ad=$(this).parent();var ac=ad.children();var ab;for(ab=0;ab<ac.length;ab++){if(af.offsetY<$(ac.get(ab)).position().top){break}}if(ab===ac.length){if(this!==ac.get(ab-1)){ad.append(this)}}else{if(this!==ac.get(ab)){$(this).insertBefore(ac.get(ab))}}}).bind("dragstart",function(){$(this).css({"border-top":"1px solid blue","border-bottom":"1px solid blue"})}).bind("dragend",function(){$(this).css("border","0px")})};S.sortable=B;var C=9,z=10,N=C+2,w=100,E=12000,L=200,s=10,G=5000,t=100,m="There was an error in indexing this dataset. ",F="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",A="No data for this chrom/contig.",q="Currently indexing... please wait",v="Tool cannot be rerun: ",a="Loading data...",T="Ready for display",d=10,r=5,y=5;function u(Z){return Math.round(Z*1000)/1000}var c=function(Z){this.num_elements=Z;this.clear()};n(c.prototype,{get:function(aa){var Z=this.key_ary.indexOf(aa);if(Z!==-1){this.move_key_to_end(aa,Z)}return this.obj_cache[aa]},set:function(aa,ab){if(!this.obj_cache[aa]){if(this.key_ary.length>=this.num_elements){var Z=this.key_ary.shift();delete this.obj_cache[Z]}this.key_ary.push(aa)}this.obj_cache[aa]=ab;return ab},move_key_to_end:function(aa,Z){this.key_ary.splice(Z,1);this.key_ary.push(aa)},clear:function(){this.obj_cache={};this.key_ary=[]},size:function(){return this.key_ary.length}});var M=function(aa,Z,ab){c.call(this,aa);this.track=Z;this.subset=(ab!==undefined?ab:true)};n(M.prototype,c.prototype,{load_data:function(ah,ai,ad,ag,aa,af){var ac={chrom:ah,low:ai,high:ad,mode:ag,resolution:aa,dataset_id:this.track.dataset_id,hda_ldda:this.track.hda_ldda};$.extend(ac,af);if(this.track.filters_manager){var aj=[];var Z=this.track.filters_manager.filters;for(var ae=0;ae<Z.length;ae++){aj[aj.length]=Z[ae].name}ac.filter_cols=JSON.stringify(aj)}var ab=this;return $.getJSON(this.track.data_url,ac,function(ak){ab.set_data(ai,ad,ag,ak)})},get_data:function(ab,Z,ae,af,aa,ad){var ac=this.get(this.gen_key(Z,ae,af));if(ac){return ac}ac=this.load_data(ab,Z,ae,af,aa,ad);this.set_data(Z,ae,af,ac);return ac},set_data:function(aa,ab,ac,Z){return this.set(this.gen_key(aa,ab,ac),Z)},gen_key:function(Z,ab,ac){var aa=Z+"_"+ab+"_"+ac;return aa},split_key:function(Z){return Z.split("_")}});var D=function(aa,Z,ab){M.call(this,aa,Z,ab)};n(D.prototype,M.prototype,c.prototype,{load_data:function(ab,Z,ad,ae,aa,ac){if(aa>1){return}return M.prototype.load_data.call(this,ab,Z,ad,ae,aa,ac)}});var X=function(Z,ac,ab,aa,ad){this.container=Z;this.chrom=null;this.vis_id=ab;this.dbkey=aa;this.title=ac;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(ad);this.canvas_manager=new Y(Z.get(0).ownerDocument);this.reset()};n(X.prototype,{init:function(ac){var ab=this.container,Z=this;this.top_container=$("<div/>").addClass("top-container").appendTo(ab);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(ab);this.bottom_container=$("<div/>").addClass("bottom-container").appendTo(ab);this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(this.top_container);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide();this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.bottom_container);this.nav_container=$("<div/>").addClass("nav-container").prependTo(this.top_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.bottom_container);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a href='javascript:void(0);'>Close Overview</a>").addClass("overview-close").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div/>").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.nav_controls);var aa=function(ad){if(ad.type==="focusout"||(ad.keyCode||ad.which)===13||(ad.keyCode||ad.which)===27){if((ad.keyCode||ad.which)!==27){Z.go_to($(this).val())}$(this).hide();$(this).val("");Z.location_span.show();Z.chrom_select.show()}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keyup focusout",aa).appendTo(this.nav_controls);this.location_span=$("<span/>").addClass("location").appendTo(this.nav_controls);this.location_span.bind("click",function(){Z.location_span.hide();Z.chrom_select.hide();Z.nav_input.val(Z.chrom+":"+Z.low+"-"+Z.high);Z.nav_input.css("display","inline-block");Z.nav_input.select();Z.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.nav_controls)}this.zo_link=$("<a id='zoom-out' />").click(function(){Z.zoom_out();Z.redraw()}).appendTo(this.nav_controls);this.zi_link=$("<a id='zoom-in' />").click(function(){Z.zoom_in();Z.redraw()}).appendTo(this.nav_controls);this.load_chroms({low:0},ac);this.chrom_select.bind("change",function(){Z.change_chrom(Z.chrom_select.val())});this.intro_div.show();this.content_div.bind("click",function(ad){$(this).find("input").trigger("blur")});this.content_div.bind("dblclick",function(ad){Z.zoom_in(ad.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(ad,ae){this.current_x=ae.offsetX}).bind("drag",function(ad,af){var ag=af.offsetX-this.current_x;this.current_x=af.offsetX;var ae=Math.round(ag/Z.viewport_container.width()*(Z.max_high-Z.max_low));Z.move_delta(-ae)});this.overview_close.bind("click",function(){for(var ae=0,ad=Z.tracks.length;ae<ad;ae++){Z.tracks[ae].is_overview=false}$(this).siblings().filter("canvas").remove();$(this).parent().css("height",Z.overview_box.height());Z.overview_highlight.hide();$(this).hide()});this.viewport_container.bind("draginit",function(ad,ae){if(ad.clientX>Z.viewport_container.width()-16){return false}}).bind("dragstart",function(ad,ae){ae.original_low=Z.low;ae.current_height=ad.clientY;ae.current_x=ae.offsetX}).bind("drag",function(af,ah){var ad=$(this);var ai=ah.offsetX-ah.current_x;var ae=ad.scrollTop()-(af.clientY-ah.current_height);ad.scrollTop(ae);ah.current_height=af.clientY;ah.current_x=ah.offsetX;var ag=Math.round(ai/Z.viewport_container.width()*(Z.high-Z.low));Z.move_delta(ag)}).bind("mousewheel",function(af,ah,ae,ad){if(ae){var ag=Math.round(-ae/Z.viewport_container.width()*(Z.high-Z.low));Z.move_delta(ag)}});this.top_labeltrack.bind("dragstart",function(ad,ae){return $("<div />").css({height:Z.content_div.height()+Z.top_labeltrack.height()+Z.nav_labeltrack.height()+1,top:"0px",position:"absolute","background-color":"#ccf",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(ah,ai){$(ai.proxy).css({left:Math.min(ah.pageX,ai.startX),width:Math.abs(ah.pageX-ai.startX)});var ae=Math.min(ah.pageX,ai.startX)-Z.container.offset().left,ad=Math.max(ah.pageX,ai.startX)-Z.container.offset().left,ag=(Z.high-Z.low),af=Z.viewport_container.width();Z.update_location(Math.round(ae/af*ag)+Z.low,Math.round(ad/af*ag)+Z.low)}).bind("dragend",function(ai,aj){var ae=Math.min(ai.pageX,aj.startX),ad=Math.max(ai.pageX,aj.startX),ag=(Z.high-Z.low),af=Z.viewport_container.width(),ah=Z.low;Z.low=Math.round(ae/af*ag)+ah;Z.high=Math.round(ad/af*ag)+ah;$(aj.proxy).remove();Z.redraw()});this.add_label_track(new W(this,this.top_labeltrack));this.add_label_track(new W(this,this.nav_labeltrack));$(window).bind("resize",function(){Z.resize_window()});$(document).bind("redraw",function(){Z.redraw()});this.reset();$(window).trigger("resize")},update_location:function(Z,aa){this.location_span.text(commatize(Z)+" - "+commatize(aa));this.nav_input.val(this.chrom+":"+commatize(Z)+"-"+commatize(aa))},load_chroms:function(aa,ab){aa.num=t;$.extend(aa,(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}));var Z=this;$.ajax({url:chrom_url,data:aa,dataType:"json",success:function(ad){if(ad.chrom_info.length===0){alert("Invalid chromosome: "+aa.chrom);return}if(ad.reference){Z.add_label_track(new x(Z))}Z.chrom_data=ad.chrom_info;var ag='<option value="">Select Chrom/Contig</option>';for(var af=0,ac=Z.chrom_data.length;af<ac;af++){var ae=Z.chrom_data[af].chrom;ag+='<option value="'+ae+'">'+ae+"</option>"}if(ad.prev_chroms){ag+='<option value="previous">Previous '+t+"</option>"}if(ad.next_chroms){ag+='<option value="next">Next '+t+"</option>"}Z.chrom_select.html(ag);if(ab){ab()}Z.chrom_start_index=ad.start_index},error:function(){alert("Could not load chroms for this dbkey:",Z.dbkey)}})},change_chrom:function(ad,aa,af){if(!ad||ad==="None"){return}var ac=this;if(ad==="previous"){ac.load_chroms({low:this.chrom_start_index-t});return}if(ad==="next"){ac.load_chroms({low:this.chrom_start_index+t});return}var ae=$.grep(ac.chrom_data,function(ah,ai){return ah.chrom===ad})[0];if(ae===undefined){ac.load_chroms({chrom:ad},function(){ac.change_chrom(ad,aa,af)});return}else{if(ad!==ac.chrom){ac.chrom=ad;if(!ac.chrom){ac.intro_div.show()}else{ac.intro_div.hide()}ac.chrom_select.val(ac.chrom);ac.max_high=ae.len-1;ac.reset();ac.redraw(true);for(var ag=0,Z=ac.tracks.length;ag<Z;ag++){var ab=ac.tracks[ag];if(ab.init){ab.init()}}}if(aa!==undefined&&af!==undefined){ac.low=Math.max(aa,0);ac.high=Math.min(af,ac.max_high)}ac.reset_overview();ac.redraw()}},go_to:function(ad){var ah=this,Z,ac,aa=ad.split(":"),af=aa[0],ag=aa[1];if(ag!==undefined){try{var ae=ag.split("-");Z=parseInt(ae[0].replace(/,/g,""),10);ac=parseInt(ae[1].replace(/,/g,""),10)}catch(ab){return false}}ah.change_chrom(af,Z,ac)},move_fraction:function(ab){var Z=this;var aa=Z.high-Z.low;this.move_delta(ab*aa)},move_delta:function(ab){var Z=this;var aa=Z.high-Z.low;if(Z.low-ab<Z.max_low){Z.low=Z.max_low;Z.high=Z.max_low+aa}else{if(Z.high-ab>Z.max_high){Z.high=Z.max_high;Z.low=Z.max_high-aa}else{Z.high-=ab;Z.low-=ab}}Z.redraw()},add_track:function(Z){Z.view=this;Z.track_id=this.track_id_counter;this.tracks.push(Z);if(Z.init){Z.init()}Z.container_div.attr("id","track_"+Z.track_id);B(Z.container_div,".draghandle");this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(Z){Z.view=this;this.label_tracks.push(Z)},remove_track:function(Z){this.has_changes=true;Z.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(Z)];this.num_tracks-=1},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(ag){var af=this.high-this.low,ae=this.low,aa=this.high;if(ae<this.max_low){ae=this.max_low}if(aa>this.max_high){aa=this.max_high}if(this.high!==0&&af<this.min_separation){aa=ae+this.min_separation}this.low=Math.floor(ae);this.high=Math.ceil(aa);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/L)/Math.LN10));this.zoom_res=Math.pow(s,Math.max(0,Math.ceil(Math.log(this.resolution,s)/Math.log(s))));var Z=(this.low/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ad=((this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ah=13;this.overview_box.css({left:Z,width:Math.max(ah,ad)}).show();if(ad<ah){this.overview_box.css("left",Z-(ah-ad)/2)}if(this.overview_highlight){this.overview_highlight.css({left:Z,width:ad})}this.update_location(this.low,this.high);if(!ag){for(var ab=0,ac=this.tracks.length;ab<ac;ab++){if(this.tracks[ab]&&this.tracks[ab].enabled){this.tracks[ab].draw()}}for(ab=0,ac=this.label_tracks.length;ab<ac;ab++){this.label_tracks[ab].draw()}}},zoom_in:function(aa,ab){if(this.max_high===0||this.high-this.low<this.min_separation){return}var ac=this.high-this.low,ad=ac/2+this.low,Z=(ac/this.zoom_factor)/2;if(aa){ad=aa/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(ad-Z);this.high=Math.round(ad+Z);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var aa=this.high-this.low,ab=aa/2+this.low,Z=(aa*this.zoom_factor)/2;this.low=Math.round(ab-Z);this.high=Math.round(ab+Z);this.redraw()},resize_window:function(){this.viewport_container.height(this.container.height()-this.top_container.height()-this.bottom_container.height());this.nav_container.width(this.container.width());this.redraw()},reset_overview:function(){this.overview_viewport.find("canvas").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide()}});var o=function(ab,af){this.track=ab;this.name=af.name;this.params=[];var am=af.params;for(var ac=0;ac<am.length;ac++){var ah=am[ac],aa=ah.name,al=ah.label,ad=unescape(ah.html),an=ah.value,aj=ah.type;if(aj==="number"){this.params[this.params.length]=new g(aa,al,ad,an,ah.min,ah.max)}else{if(aj=="select"){this.params[this.params.length]=new J(aa,al,ad,an)}else{console.log("WARNING: unrecognized tool parameter type:",aa,aj)}}}this.parent_div=$("<div/>").addClass("dynamic-tool").hide();this.parent_div.bind("drag",function(ap){ap.stopPropagation()}).bind("click",function(ap){ap.stopPropagation()}).bind("dblclick",function(ap){ap.stopPropagation()});var ak=$("<div class='tool-name'>").appendTo(this.parent_div).text(this.name);var ai=this.params;var ag=this;$.each(this.params,function(aq,au){var at=$("<div>").addClass("param-row").appendTo(ag.parent_div);var ap=$("<div>").addClass("param-label").text(au.label).appendTo(at);var ar=$("<div/>").addClass("slider").html(au.html).appendTo(at);ar.find(":input").val(au.value);$("<div style='clear: both;'/>").appendTo(at)});this.parent_div.find("input").click(function(){$(this).select()});var ao=$("<div>").addClass("param-row").appendTo(this.parent_div);var ae=$("<input type='submit'>").attr("value","Run on complete dataset").appendTo(ao);var Z=$("<input type='submit'>").attr("value","Run on visible region").css("margin-left","3em").appendTo(ao);var ag=this;Z.click(function(){ag.run_on_region()});ae.click(function(){ag.run_on_dataset()})};n(o.prototype,{get_param_values_dict:function(){var Z={};this.parent_div.find(":input").each(function(){var aa=$(this).attr("name"),ab=$(this).val();Z[aa]=JSON.stringify(ab)});return Z},get_param_values:function(){var aa=[];var Z={};this.parent_div.find(":input").each(function(){var ab=$(this).attr("name"),ac=$(this).val();if(ab){aa[aa.length]=ac}});return aa},run_on_dataset:function(){var Z=this;Z.run({dataset_id:this.track.original_dataset_id,tool_id:Z.name},function(aa){show_modal(Z.name+" is Running",Z.name+" is running on the complete dataset. Tool outputs are in dataset's history.",{Close:hide_modal})})},run_on_region:function(){var Z={dataset_id:this.track.original_dataset_id,chrom:this.track.view.chrom,low:this.track.view.low,high:this.track.view.high,tool_id:this.name},ab=this.track,aa=Z.tool_id+ab.tool_region_and_parameters_str(Z.chrom,Z.low,Z.high),ac;if(ab.track_type==="FeatureTrack"){ac=new P(aa,view,ab.hda_ldda,undefined,{},{},ab)}this.track.add_track(ac);ac.content_div.text("Starting job.");this.run(Z,function(ad){ac.dataset_id=ad.dataset_id;ac.content_div.text("Running job.");ac.init()})},run:function(aa,ab){$.extend(aa,this.get_param_values_dict());var Z=function(){$.getJSON(rerun_tool_url,aa,function(ac){if(ac==="no converter"){new_track.container_div.addClass("error");new_track.content_div.text(F)}else{if(ac.error){new_track.container_div.addClass("error");new_track.content_div.text(v+ac.message)}else{if(ac==="pending"){new_track.container_div.addClass("pending");new_track.content_div.text("Converting input data so that it can be easily reused.");setTimeout(Z,2000)}else{ab(ac)}}}})};Z()}});var J=function(aa,Z,ab,ac){this.name=aa;this.label=Z;this.html=ab;this.value=ac};var g=function(ab,aa,ad,ae,ac,Z){J.call(this,ab,aa,ad,ae);this.min=ac;this.max=Z};var h=function(aa,Z,ab,ac){this.name=aa;this.index=Z;this.tool_id=ab;this.tool_exp_name=ac};var Q=function(aa,Z,ab,ac){h.call(this,aa,Z,ab,ac);this.low=-Number.MAX_VALUE;this.high=Number.MAX_VALUE;this.min=Number.MAX_VALUE;this.max=-Number.MAX_VALUE;this.slider=null;this.slider_label=null};n(Q.prototype,{applies_to:function(Z){if(Z.length>this.index){return true}return false},keep:function(Z){if(!this.applies_to(Z)){return true}var aa=parseInt(Z[this.index]);return(isNaN(aa)||(aa>=this.low&&aa<=this.high))},update_attrs:function(aa){var Z=false;if(!this.applies_to(aa)){return Z}if(aa[this.index]<this.min){this.min=Math.floor(aa[this.index]);Z=true}if(aa[this.index]>this.max){this.max=Math.ceil(aa[this.index]);Z=true}return Z},update_ui_elt:function(){var ab=function(ae,ac){var ad=ac-ae;return(ad<=2?0.01:1)};var aa=this.slider.slider("option","min"),Z=this.slider.slider("option","max");if(this.min<aa||this.max>Z){this.slider.slider("option","min",this.min);this.slider.slider("option","max",this.max);this.slider.slider("option","step",ab(this.min,this.max));this.slider.slider("option","values",[this.min,this.max])}}});var V=function(ab,ak){this.track=ab;this.filters=[];for(var af=0;af<ak.length;af++){var Z=ak[af],aa=Z.name,aj=Z.type,ah=Z.index,am=Z.tool_id,ac=Z.tool_exp_name;if(aj==="int"||aj==="float"){this.filters[af]=new Q(aa,ah,am,ac)}else{console.log("ERROR: unsupported filter: ",aa,aj)}}var ai=function(an,ao,ap){an.click(function(){var aq=ao.text();max=parseFloat(ap.slider("option","max")),input_size=(max<=1?4:max<=1000000?max.toString().length:6),multi_value=false;if(ap.slider("option","values")){input_size=2*input_size+1;multi_value=true}ao.text("");$("<input type='text'/>").attr("size",input_size).attr("maxlength",input_size).attr("value",aq).appendTo(ao).focus().select().click(function(ar){ar.stopPropagation()}).blur(function(){$(this).remove();ao.text(aq)}).keyup(function(aw){if(aw.keyCode===27){$(this).trigger("blur")}else{if(aw.keyCode===13){var au=ap.slider("option","min"),ar=ap.slider("option","max"),av=function(ax){return(isNaN(ax)||ax>ar||ax<au)},at=$(this).val();if(!multi_value){at=parseFloat(at);if(av(at)){alert("Parameter value must be in the range ["+au+"-"+ar+"]");return $(this)}}else{at=at.split("-");at=[parseFloat(at[0]),parseFloat(at[1])];if(av(at[0])||av(at[1])){alert("Parameter value must be in the range ["+au+"-"+ar+"]");return $(this)}}ap.slider((multi_value?"values":"value"),at)}}})})};this.parent_div=$("<div/>").addClass("filters").hide();this.parent_div.bind("drag",function(an){an.stopPropagation()}).bind("click",function(an){an.stopPropagation()}).bind("dblclick",function(an){an.stopPropagation()}).bind("keydown",function(an){an.stopPropagation()});var ad=this;$.each(this.filters,function(au,ao){var aq=$("<div/>").addClass("slider-row").appendTo(ad.parent_div);var an=$("<div/>").addClass("slider-label").appendTo(aq);var aw=$("<span/>").addClass("slider-name").text(ao.name+" ").appendTo(an);var ap=$("<span/>");var ar=$("<span/>").addClass("slider-value").appendTo(an).append("[").append(ap).append("]");var av=$("<div/>").addClass("slider").appendTo(aq);ao.control_element=$("<div/>").attr("id",ao.name+"-filter-control").appendTo(av);var at=[0,0];ao.control_element.slider({range:true,min:Number.MAX_VALUE,max:-Number.MIN_VALUE,values:[0,0],slide:function(ax,ay){at=ay.values;ap.text(ay.values[0]+"-"+ay.values[1]);setTimeout(function(){if(ay.values[0]==at[0]&&ay.values[1]==at[1]){var az=ay.values;ap.text(az[0]+"-"+az[1]);ao.low=az[0];ao.high=az[1];ad.track.draw(true,true)}},50)},change:function(ax,ay){ao.control_element.slider("option","slide").call(ao.control_element,ax,ay)}});ao.slider=ao.control_element;ao.slider_label=ap;ai(ar,ap,ao.control_element);$("<div style='clear: both;'/>").appendTo(aq)});if(this.filters.length!=0){var al=$("<div>").addClass("param-row").appendTo(this.parent_div);var ag=$("<input type='submit'>").attr("value","Run on complete dataset").appendTo(al);var ae=this;ag.click(function(){ae.run_on_dataset()})}};n(V.prototype,{reset_filters:function(){for(var Z=0;Z<this.filters.length;Z++){filter=this.filters[Z];filter.slider.slider("option","values",[filter.min,filter.max])}},run_on_dataset:function(){var ah=function(al,aj,ak){if(!(aj in al)){al[aj]=ak}return al[aj]};var ab={},Z,aa,ac;for(var ad=0;ad<this.filters.length;ad++){Z=this.filters[ad];if(Z.tool_id){if(Z.min!=Z.low){aa=ah(ab,Z.tool_id,[]);aa[aa.length]=Z.tool_exp_name+" >= "+Z.low}if(Z.max!=Z.high){aa=ah(ab,Z.tool_id,[]);aa[aa.length]=Z.tool_exp_name+" <= "+Z.high}}}var af=[];for(var ai in ab){af[af.length]=[ai,ab[ai]]}var ag=af.length;(function ae(ap,am){var ak=am[0],al=ak[0],ao=ak[1],an="("+ao.join(") and (")+")",aj={cond:an,input:ap,target_dataset_id:ap,tool_id:al},am=am.slice(1);$.getJSON(run_tool_url,aj,function(aq){if(aq.error){show_modal("Filter Dataset","Error running tool "+al,{Close:hide_modal})}else{if(am.length===0){show_modal("Filtering Dataset","Filter(s) are running on the complete dataset. Outputs are in dataset's history.",{Close:hide_modal})}else{ae(aq.dataset_id,am)}}})})(this.track.dataset_id,af)}});var U=function(Z){this.track=Z.track;this.params=Z.params;this.values={};if(Z.saved_values){this.restore_values(Z.saved_values)}this.onchange=Z.onchange};n(U.prototype,{restore_values:function(Z){var aa=this;$.each(this.params,function(ab,ac){if(Z[ac.key]!==undefined){aa.values[ac.key]=Z[ac.key]}else{aa.values[ac.key]=ac.default_value}})},build_form:function(){var aa=this;var Z=$("<div />");$.each(this.params,function(ae,ac){if(!ac.hidden){var ab="param_"+ae;var aj=$("<div class='form-row' />").appendTo(Z);aj.append($("<label />").attr("for",ab).text(ac.label+":"));if(ac.type==="bool"){aj.append($('<input type="checkbox" />').attr("id",ab).attr("name",ab).attr("checked",aa.values[ac.key]))}else{if(ac.type==="color"){var ag=aa.values[ac.key];var af=$("<input />").attr("id",ab).attr("name",ab).val(ag);var ah=$("<div class='tipsy tipsy-north' style='position: absolute;' />").hide();var ad=$("<div style='background-color: black; padding: 10px;'></div>").appendTo(ah);var ai=$("<div/>").appendTo(ad).farbtastic({width:100,height:100,callback:af,color:ag});$("<div />").append(af).append(ah).appendTo(aj).bind("click",function(ak){ah.css({left:$(this).position().left+($(af).width()/2)-60,top:$(this).position().top+$(this.height)}).show();$(document).bind("click.color-picker",function(){ah.hide();$(document).unbind("click.color-picker")});ak.stopPropagation()})}else{aj.append($("<input />").attr("id",ab).attr("name",ab).val(aa.values[ac.key]))}}}});return Z},update_from_form:function(Z){var ab=this;var aa=false;$.each(this.params,function(ac,ae){if(!ae.hidden){var af="param_"+ac;var ad=Z.find("#"+af).val();if(ae.type==="float"){ad=parseFloat(ad)}else{if(ae.type==="int"){ad=parseInt(ad)}else{if(ae.type==="bool"){ad=Z.find("#"+af).is(":checked")}}}if(ad!==ab.values[ae.key]){ab.values[ae.key]=ad;aa=true}}});if(aa){this.onchange()}}});var b=function(ab,aa,Z){this.index=ab;this.resolution=aa;this.canvas=$("<div class='track-tile'/>").append(Z)};var l=function(ab,aa,Z,ac){b.call(this,ab,aa,Z);this.max_val=ac};var K=function(ab,aa,Z){b.call(this,ab,aa,Z)};var j=function(aa,Z,ad,ab,ac){this.name=aa;this.view=Z;this.parent_element=ad;this.data_url=(ab?ab:default_data_url);this.data_url_extra_params={};this.data_query_wait=(ac?ac:G);this.dataset_check_url=converted_datasets_state_url;this.container_div=$("<div />").addClass("track").css("position","relative");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);if(this.view.editor){this.drag_div=$("<div class='draghandle' />").appendTo(this.header_div)}this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name);this.name_div.attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase())}this.content_div=$("<div class='track-content'>").appendTo(this.container_div);this.parent_element.append(this.container_div)};n(j.prototype,{init:function(){var Z=this;Z.enabled=false;Z.tile_cache.clear();Z.data_cache.clear();Z.initial_canvas=undefined;Z.content_div.css("height","auto");Z.container_div.removeClass("nodata error pending");if(!Z.dataset_id){return}$.getJSON(converted_datasets_state_url,{hda_ldda:Z.hda_ldda,dataset_id:Z.dataset_id,chrom:Z.view.chrom},function(aa){if(!aa||aa==="error"||aa.kind==="error"){Z.container_div.addClass("error");Z.content_div.text(m);if(aa.message){var ac=Z.view.tracks.indexOf(Z);var ab=$(" <a href='javascript:void(0);'></a>").text("View error").bind("click",function(){show_modal("Trackster Error","<pre>"+aa.message+"</pre>",{Close:hide_modal})});Z.content_div.append(ab)}}else{if(aa==="no converter"){Z.container_div.addClass("error");Z.content_div.text(F)}else{if(aa==="no data"||(aa.data!==undefined&&(aa.data===null||aa.data.length===0))){Z.container_div.addClass("nodata");Z.content_div.text(A)}else{if(aa==="pending"){Z.container_div.addClass("pending");Z.content_div.text(q);setTimeout(function(){Z.init()},Z.data_query_wait)}else{if(aa.status==="data"){if(aa.valid_chroms){Z.valid_chroms=aa.valid_chroms;Z.make_name_popup_menu()}Z.content_div.text(T);if(Z.view.chrom){Z.content_div.text("");Z.content_div.css("height",Z.height_px+"px");Z.enabled=true;$.when(Z.predraw_init()).done(function(){Z.container_div.removeClass("nodata error pending");Z.draw()})}}}}}}})},predraw_init:function(){},update_name:function(Z){this.old_name=this.name;this.name=Z;this.name_div.text(this.name)},revert_name:function(){this.name=this.old_name;this.name_div.text(this.name)}});var I=function(ah,af,ai){var aa=this,aj=aa.view;this.filters_manager=(ah!==undefined?new V(this,ah):undefined);this.filters_available=false;this.filters_visible=false;this.tool=(af!==undefined&&obj_length(af)>0?new o(this,af):undefined);this.parent_track=ai;this.child_tracks=[];if(aa.hidden){return}if(this.parent_track){this.header_div.find(".draghandle").removeClass("draghandle").addClass("child-track-icon").addClass("icon-button");this.parent_element.addClass("child-track");this.tool=undefined}aa.child_tracks_container=$("<div/>").addClass("child-tracks-container").hide();aa.container_div.append(aa.child_tracks_container);if(this.filters_manager){this.filters_div=this.filters_manager.parent_div;this.header_div.after(this.filters_div)}if(this.tool){this.dynamic_tool_div=this.tool.parent_div;this.header_div.after(this.dynamic_tool_div)}if(aa.display_modes!==undefined){if(aa.mode_div===undefined){aa.mode_div=$("<div class='right-float menubutton popup' />").appendTo(aa.header_div);var ac=(aa.track_config&&aa.track_config.values.mode?aa.track_config.values.mode:aa.display_modes[0]);aa.mode=ac;aa.mode_div.text(ac);var ab=function(ak){aa.mode_div.text(ak);aa.mode=ak;aa.track_config.values.mode=ak;aa.tile_cache.clear();aa.draw()};var Z={};for(var ad=0,ag=aa.display_modes.length;ad<ag;ad++){var ae=aa.display_modes[ad];Z[ae]=function(ak){return function(){ab(ak)}}(ae)}make_popupmenu(aa.mode_div,Z)}else{aa.mode_div.hide()}}this.make_name_popup_menu()};n(I.prototype,j.prototype,{make_name_popup_menu:function(){var aa=this;var Z={};Z["Edit configuration"]=function(){var ag=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},ae=function(){aa.track_config.update_from_form($(".dialog-box"));hide_modal();$(window).unbind("keypress.check_enter_esc")},af=function(ah){if((ah.keyCode||ah.which)===27){ag()}else{if((ah.keyCode||ah.which)===13){ae()}}};$(window).bind("keypress.check_enter_esc",af);show_modal("Configure Track",aa.track_config.build_form(),{Cancel:ag,OK:ae})};if(aa.filters_available>0){var ad=(aa.filters_div.is(":visible")?"Hide filters":"Show filters");Z[ad]=function(){aa.filters_visible=(aa.filters_div.is(":visible"));if(aa.filters_visible){aa.filters_manager.reset_filters()}aa.filters_div.toggle();aa.make_name_popup_menu()}}if(aa.tool){var ad=(aa.dynamic_tool_div.is(":visible")?"Hide tool":"Show tool");Z[ad]=function(){if(!aa.dynamic_tool_div.is(":visible")){aa.update_name(aa.name+aa.tool_region_and_parameters_str())}else{menu_option_text="Show dynamic tool";aa.revert_name()}aa.dynamic_tool_div.toggle();aa.make_name_popup_menu()}}if(aa.valid_chroms){Z["List chrom/contigs with data"]=function(){show_modal("Chrom/contigs with data","<p>"+aa.valid_chroms.join("<br/>")+"</p>",{Close:function(){hide_modal()}})}}var ab=view;var ac=function(){$("#no-tracks").show()};if(this.parent_track){ab=this.parent_track;ac=function(){}}Z.Remove=function(){ab.remove_track(aa);if(ab.num_tracks===0){ac()}};make_popupmenu(aa.name_div,Z)},draw:function(Z,ab){var at=this.view.low,af=this.view.high,ah=af-at,aj=this.view.container.width(),ad=aj/ah,ak=this.view.resolution,ac=$("<div style='position: relative;'></div>"),al=function(av,aw,au){return av+"_"+aw+"_"+au};if(!ab){this.content_div.children().remove()}this.content_div.append(ac);this.max_height=0;var an=Math.floor(at/ak/L);var ae=[];var ao=0;while((an*L*ak)<af){var ar=al(aj,ad,an);var ag=this.tile_cache.get(ar);var ap=an*L*this.view.resolution;var aa=ap+L*this.view.resolution;if(!Z&&ag){ae[ae.length]=ag;this.show_tile(ag,ac,ap,ad)}else{this.delayed_draw(Z,ar,an,ak,ac,ad,ae)}an+=1;ao++}var ai=this;var aq=setInterval(function(){if(ae.length===ao){clearInterval(aq);if(ab){var ax=ai.content_div.children();var ay=false;for(var aw=ax.length-1,aC=0;aw>=aC;aw--){var av=$(ax[aw]);if(ay){av.remove()}else{if(av.children().length!==0){ay=true}}}}if(ai.track_type=="FeatureTrack"&&ai.mode=="Histogram"){var aB=-1;for(var aw=0;aw<ae.length;aw++){var aE=ae[aw].max_val;if(aE>aB){aB=aE}}for(var aw=0;aw<ae.length;aw++){if(ae[aw].max_val!==aB){var aD=ae[aw];aD.canvas.remove();ai.delayed_draw(true,al(aj,ad,aD.index),aD.index,aD.resolution,ac,ad,[],{max:aB})}}}if(ai.filters_manager){var au=ai.filters_manager.filters;for(var aA=0;aA<au.length;aA++){au[aA].update_ui_elt()}var az=false;if(ai.example_feature){for(var aA=0;aA<au.length;aA++){if(au[aA].applies_to(ai.example_feature)){az=true;break}}}if(ai.filters_available!==az){ai.filters_available=az;if(!ai.filters_available){ai.filters_div.hide()}ai.make_name_popup_menu()}}}},50);for(var am=0;am<this.child_tracks.length;am++){this.child_tracks[am].draw(Z,ab)}},delayed_draw:function(aa,ah,ab,ad,ai,al,aj,ae){var ac=this,af=ab*L*ad,ak=af+L*ad;var ag=function(au,am,ao,an,ar,at,ap){var aq=ac.draw_tile(am,ao,an,at,ap);ac.tile_cache.set(ah,aq);if(aq===undefined){return}ac.show_tile(aq,ar,af,at);aj[aj.length]=aq};var Z=setTimeout(function(){if(af<=ac.view.high&&ak>=ac.view.low){var am=(aa?undefined:ac.tile_cache.get(ah));if(am){ac.show_tile(am,ai,af,al);aj[aj.length]=am}else{$.when(ac.data_cache.get_data(view.chrom,af,ak,ac.mode,ad,ac.data_url_extra_params)).then(function(an){n(an,ae);if(view.reference_track&&al>view.canvas_manager.char_width_px){$.when(view.reference_track.data_cache.get_data(view.chrom,af,ak,ac.mode,ad,view.reference_track.data_url_extra_params)).then(function(ao){ag(Z,an,ad,ab,ai,al,ao)})}else{ag(Z,an,ad,ab,ai,al)}})}}},50)},show_tile:function(ac,af,ad,ag){var aa=this;var ab=this.view.high-this.view.low,ae=(ad-this.view.low)*ag;if(this.left_offset){ae-=this.left_offset}var Z=ac.canvas;Z.css({position:"absolute",top:0,left:ae,height:""});af.append(Z);aa.max_height=Math.max(aa.max_height,Z.height());aa.content_div.css("height",aa.max_height+"px");af.children().css("height",aa.max_height+"px")},set_overview:function(){var Z=this.view;if(this.initial_canvas&&this.is_overview){Z.overview_close.show();Z.overview_viewport.append(this.initial_canvas);Z.overview_highlight.show().height(this.initial_canvas.height());Z.overview_viewport.height(this.initial_canvas.height()+Z.overview_box.height())}$(window).trigger("resize")},tool_region_and_parameters_str:function(ab,Z,ac){var aa=this,ad=(ab!==undefined&&Z!==undefined&&ac!==undefined?ab+":"+Z+"-"+ac:"all");return" - region=["+ad+"], parameters=["+aa.tool.get_param_values().join(", ")+"]"},add_track:function(Z){Z.track_id=this.track_id+"_"+this.child_tracks.length;Z.container_div.attr("id","track_"+Z.track_id);this.child_tracks_container.append(Z.container_div);B(Z.container_div,".child-track-icon");if(!$(this.child_tracks_container).is(":visible")){this.child_tracks_container.show()}this.child_tracks.push(Z);this.view.has_changes=true},remove_track:function(Z){Z.container_div.fadeOut("slow",function(){$(this).remove()})}});var W=function(Z,aa){this.track_type="LabelTrack";this.hidden=true;j.call(this,null,Z,aa);this.container_div.addClass("label-track")};n(W.prototype,j.prototype,{draw:function(){var ab=this.view,ac=ab.high-ab.low,af=Math.floor(Math.pow(10,Math.floor(Math.log(ac)/Math.log(10)))),Z=Math.floor(ab.low/af)*af,ad=this.view.container.width(),aa=$("<div style='position: relative; height: 1.3em;'></div>");while(Z<ab.high){var ae=(Z-ab.low)/ac*ad;aa.append($("<div class='label'>"+commatize(Z)+"</div>").css({position:"absolute",left:ae-1}));Z+=af}this.content_div.children(":first").remove();this.content_div.append(aa)}});var x=function(Z){this.track_type="ReferenceTrack";this.hidden=true;j.call(this,null,Z,Z.top_labeltrack);I.call(this);Z.reference_track=this;this.left_offset=200;this.height_px=12;this.container_div.addClass("reference-track");this.content_div.css("background","none");this.content_div.css("min-height","0px");this.content_div.css("border","none");this.data_url=reference_url;this.data_url_extra_params={dbkey:Z.dbkey};this.data_cache=new D(y,this,false);this.tile_cache=new c(r)};n(x.prototype,I.prototype,{draw_tile:function(ah,ae,aa,aj){var ad=this,ab=L*ae;if(aj>this.view.canvas_manager.char_width_px){if(ah===null){ad.content_div.css("height","0px");return}var ac=this.view.canvas_manager.new_canvas();var ai=ac.getContext("2d");ac.width=Math.ceil(ab*aj+ad.left_offset);ac.height=ad.height_px;ai.font=ai.canvas.manager.default_font;ai.textAlign="center";for(var af=0,ag=ah.length;af<ag;af++){var Z=Math.round(af*aj);ai.fillText(ah[af],Z+ad.left_offset,10)}return new b(aa,ae,ac)}this.content_div.css("height","0px")}});var k=function(ad,ab,ae,Z,ac){var aa=this;this.track_type="LineTrack";this.display_modes=["Histogram","Line","Filled","Intensity"];this.mode="Histogram";j.call(this,ad,ab,ab.viewport_container);I.call(this);this.min_height_px=16;this.max_height_px=400;this.height_px=80;this.hda_ldda=ae;this.dataset_id=Z;this.original_dataset_id=Z;this.data_cache=new M(y,this);this.tile_cache=new c(r);this.track_config=new U({track:this,params:[{key:"color",label:"Color",type:"color",default_value:"black"},{key:"min_value",label:"Min Value",type:"float",default_value:undefined},{key:"max_value",label:"Max Value",type:"float",default_value:undefined},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:this.height_px,hidden:true}],saved_values:ac,onchange:function(){aa.vertical_range=aa.prefs.max_value-aa.prefs.min_value;$("#linetrack_"+aa.track_id+"_minval").text(aa.prefs.min_value);$("#linetrack_"+aa.track_id+"_maxval").text(aa.prefs.max_value);aa.tile_cache.clear();aa.draw()}});this.prefs=this.track_config.values;this.height_px=this.track_config.values.height;this.vertical_range=this.track_config.values.max_value-this.track_config.values.min_value;this.add_resize_handle()};n(k.prototype,I.prototype,{add_resize_handle:function(){var Z=this;var ac=false;var ab=false;var aa=$("<div class='track-resize'>");$(Z.container_div).hover(function(){ac=true;aa.show()},function(){ac=false;if(!ab){aa.hide()}});aa.hide().bind("dragstart",function(ad,ae){ab=true;ae.original_height=$(Z.content_div).height()}).bind("drag",function(ae,af){var ad=Math.min(Math.max(af.original_height+af.deltaY,Z.min_height_px),Z.max_height_px);$(Z.content_div).css("height",ad);Z.height_px=ad;Z.draw(true)}).bind("dragend",function(ad,ae){Z.tile_cache.clear();ab=false;if(!ac){aa.hide()}Z.track_config.values.height=Z.height_px}).appendTo(Z.container_div)},predraw_init:function(){var Z=this,aa=Z.view.tracks.indexOf(Z);Z.vertical_range=undefined;return $.getJSON(Z.data_url,{stats:true,chrom:Z.view.chrom,low:null,high:null,hda_ldda:Z.hda_ldda,dataset_id:Z.dataset_id},function(ab){Z.container_div.addClass("line-track");var ad=ab.data;if(isNaN(parseFloat(Z.prefs.min_value))||isNaN(parseFloat(Z.prefs.max_value))){Z.prefs.min_value=ad.min;Z.prefs.max_value=ad.max;$("#track_"+aa+"_minval").val(Z.prefs.min_value);$("#track_"+aa+"_maxval").val(Z.prefs.max_value)}Z.vertical_range=Z.prefs.max_value-Z.prefs.min_value;Z.total_frequency=ad.total_frequency;Z.container_div.find(".yaxislabel").remove();var ae=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+aa+"_minval").text(u(Z.prefs.min_value));var ac=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+aa+"_maxval").text(u(Z.prefs.max_value));ac.css({position:"absolute",top:"24px",left:"10px"});ac.prependTo(Z.container_div);ae.css({position:"absolute",bottom:"2px",left:"10px"});ae.prependTo(Z.container_div)})},draw_tile:function(aj,ad,aa,ai){if(this.vertical_range===undefined){return}var ae=aa*L*ad,ac=L*ad,Z=Math.ceil(ac*ai),ag=this.height_px;var ab=this.view.canvas_manager.new_canvas();ab.width=Z,ab.height=ag;var ah=ab.getContext("2d");var af=new H.LinePainter(aj.data,ae,ae+ac,this.prefs,this.mode);af.draw(ah,Z,ag);return new b(ac,ad,ab)}});var e=function(Z,ae,ad,ah,ag,ab,ac,af){var aa=this;this.track_type="FeatureTrack";this.display_modes=["Auto","Histogram","Dense","Squish","Pack"];this.track_config=new U({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:ag,onchange:function(){aa.tile_cache.clear();aa.draw()}});this.prefs=this.track_config.values;j.call(this,Z,ae,ae.viewport_container);I.call(this,ab,ac,af);this.height_px=0;this.container_div.addClass("feature-track");this.hda_ldda=ad;this.dataset_id=ah;this.original_dataset_id=ah;this.show_labels_scale=0.001;this.showing_details=false;this.summary_draw_height=30;this.inc_slots={};this.start_end_dct={};this.tile_cache=new c(d);this.data_cache=new M(20,this);this.left_offset=200;this.painter=H.LinkedFeaturePainter};n(e.prototype,I.prototype,{update_auto_mode:function(Z){if(this.mode=="Auto"){if(Z=="no_detail"){Z="feature spans"}else{if(Z=="summary_tree"){Z="coverage histogram"}}this.mode_div.text("Auto ("+Z+")")}},incremental_slots:function(ad,aa,ac){var ab=this.view.canvas_manager.dummy_context,Z=this.inc_slots[ad];if(!Z||(Z.mode!==ac)){Z=new (p.FeatureSlotter)(ad,ac==="Pack",w,function(ae){return ab.measureText(ae)});Z.mode=ac;this.inc_slots[ad]=Z}return Z.slot_features(aa)},get_summary_tree_data:function(ad,ag,ab,ao){if(ao>ab-ag){ao=ab-ag}var ak=Math.floor((ab-ag)/ao),an=[],ac=0;var ae=0,af=0,aj,am=0,ah=[],al,ai;var aa=function(ar,aq,at,ap){ar[0]=aq+at*ap;ar[1]=aq+(at+1)*ap};while(am<ao&&ae!==ad.length){var Z=false;for(;am<ao&&!Z;am++){aa(ah,ag,am,ak);for(af=ae;af<ad.length;af++){aj=ad[af].slice(1,3);if(is_overlap(aj,ah)){Z=true;break}}if(Z){break}}data_start_index=af;an[an.length]=al=[ah[0],0];for(;af<ad.length;af++){aj=ad[af].slice(1,3);if(is_overlap(aj,ah)){al[1]++}else{break}}if(al[1]>ac){ac=al[1]}am++}return{max:ac,delta:ak,data:an}},draw_tile:function(am,av,az,ai,ac){var ar=this,aB=az*L*av,aa=(az+1)*L*av,ao=aa-aB,at=Math.ceil(ao*ai),aq=this.mode,aF=25,ad=this.left_offset,an,ae;if(aq==="Auto"){if(am.dataset_type==="summary_tree"){aq=am.dataset_type}else{if(am.extra_info==="no_detail"){aq="no_detail"}else{var aE=am.data;if(this.view.high-this.view.low>E){aq="Squish"}else{aq="Pack"}}}this.update_auto_mode(aq)}if(aq==="summary_tree"||aq==="Histogram"){ae=this.summary_draw_height;this.container_div.find(".yaxislabel").remove();var Z=$("<div />").addClass("yaxislabel");Z.text(am.max);Z.css({position:"absolute",top:"24px",left:"10px",color:this.prefs.label_color});Z.prependTo(this.container_div);var ab=this.view.canvas_manager.new_canvas();ab.width=at+ad;ab.height=ae+N;if(am.dataset_type!="summary_tree"){var aj=this.get_summary_tree_data(am.data,aB,aa,200);if(am.max){aj.max=am.max}am=aj}var aC=new H.SummaryTreePainter(am,aB,aa,this.prefs);var au=ab.getContext("2d");au.translate(ad,N);aC.draw(au,at,ae);return new l(az,av,ab,am.max)}var an,ag=1;if(aq==="no_detail"||aq==="Squish"||aq==="Pack"){ag=this.incremental_slots(ai,am.data,aq);an=this.inc_slots[ai].slots}var ah=[];if(am.data){var ak=this.filters_manager.filters;for(var aw=0,ay=am.data.length;aw<ay;aw++){var af=am.data[aw];var ax=false;var al;for(var aA=0,aD=ak.length;aA<aD;aA++){al=ak[aA];al.update_attrs(af);if(!al.keep(af)){ax=true;break}}if(!ax){ah.push(af)}}}var aC=new (this.painter)(ah,aB,aa,this.prefs,aq,ac);var ae=aC.get_required_height(ag)+z;var ab=this.view.canvas_manager.new_canvas();ab.width=at+ad;ab.height=ae;var au=ab.getContext("2d");au.fillStyle=this.prefs.block_color;au.font=au.canvas.manager.default_font;au.textAlign="right";this.container_div.find(".yaxislabel").remove();if(am.message){au.fillStyle="red";au.textAlign="left";var ap=au.textBaseline;au.textBaseline="top";au.fillRect(ad,0,ab.width-ad,1);au.fillText(am.message,ad,2);au.textBaseline=ap;if(!am.data){return new b(az,av,ab,ae)}}this.example_feature=(am.data.length?am.data[0]:undefined);au.translate(ad,z);aC.draw(au,at,ae,an);return new K(az,av,ab)}});var O=function(ac,aa,ae,Z,ab,ad){e.call(this,ac,aa,ae,Z,ab,ad);this.track_type="VcfTrack";this.painter=H.VariantPainter};n(O.prototype,I.prototype,e.prototype);var R=function(ac,aa,ae,Z,ab,ad){e.call(this,ac,aa,ae,Z,ab,ad);this.track_config=new U({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_insertions",label:"Show insertions",type:"bool",default_value:false},{key:"show_differences",label:"Show differences only",type:"bool",default_value:true},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:ab,onchange:function(){this.track.tile_cache.clear();this.track.draw()}});this.prefs=this.track_config.values;this.track_type="ReadTrack";this.painter=H.ReadPainter;this.make_name_popup_menu()};n(R.prototype,I.prototype,e.prototype);var P=function(ad,ab,af,Z,ac,ae,aa){e.call(this,ad,ab,af,Z,ac,ae,{},aa);this.track_type="ToolDataFeatureTrack";this.data_url=raw_data_url;this.data_query_wait=1000;this.dataset_check_url=dataset_state_url};n(P.prototype,I.prototype,e.prototype,{predraw_init:function(){var aa=this;var Z=function(){if(aa.data_cache.size()===0){setTimeout(Z,300)}else{aa.data_url=default_data_url;aa.data_query_wait=G;aa.dataset_state_url=converted_datasets_state_url;$.getJSON(aa.dataset_state_url,{dataset_id:aa.dataset_id,hda_ldda:aa.hda_ldda},function(ab){})}};Z()}});S.View=X;S.LineTrack=k;S.FeatureTrack=e;S.ReadTrack=R};var slotting_module=function(c,b){var e=c("class").extend;var d=2,a=5;b.FeatureSlotter=function(j,h,f,g){this.slots={};this.start_end_dct={};this.w_scale=j;this.include_label=h;this.max_rows=f;this.measureText=g};e(b.FeatureSlotter.prototype,{slot_features:function(m){var p=this.w_scale,s=this.slots,h=this.start_end_dct,y=[],A=[],n=0,z=this.max_rows;for(var w=0,x=m.length;w<x;w++){var l=m[w],o=l[0];if(s[o]!==undefined){n=Math.max(n,s[o]);A.push(s[o])}else{y.push(w)}}var q=function(G,H){for(var F=0;F<=z;F++){var D=false,I=h[F];if(I!==undefined){for(var C=0,E=I.length;C<E;C++){var B=I[C];if(H>B[0]&&G<B[1]){D=true;break}}}if(!D){return F}}return -1};for(var w=0,x=y.length;w<x;w++){var l=m[y[w]],o=l[0],u=l[1],f=l[2],r=l[3],g=Math.floor(u*p),k=Math.ceil(f*p),v=this.measureText(r).width,j;if(r!==undefined&&this.include_label){v+=(d+a);if(g-v>=0){g-=v;j="left"}else{k+=v;j="right"}}var t=q(g,k);if(t>=0){if(h[t]===undefined){h[t]=[]}h[t].push([g,k]);s[o]=t;n=Math.max(n,t)}else{}}return n+1}})};var painters_module=function(j,w){var t=j("class").extend;var o=function(H,z,F,y,E,C){if(C===undefined){C=4}var B=y-z;var A=E-F;var D=Math.floor(Math.sqrt(B*B+A*A)/C);var I=B/D;var G=A/D;var x;for(x=0;x<D;x++,z+=I,F+=G){if(x%2!==0){continue}H.fillRect(z,F,C,1)}};var p=function(A,z,x,D){var C=z-D/2,B=z+D/2,E=x-Math.sqrt(D*3/2);A.beginPath();A.moveTo(C,E);A.lineTo(B,E);A.lineTo(z,x);A.lineTo(C,E);A.strokeStyle=this.fillStyle;A.fill();A.stroke();A.closePath()};var m=function(z,B,x,y,A){this.data=z;this.view_start=B;this.view_end=x;this.prefs=t({},this.default_prefs,y);this.mode=A};m.prototype.default_prefs={};var u=function(z,B,x,y,A){m.call(this,z,B,x,y,A)};u.prototype.default_prefs={show_counts:false};u.prototype.draw=function(M,z,L){var E=this.view_start,O=this.view_end-this.view_start,N=z/O;var J=this.data.data,I=this.data.delta,G=this.data.max,B=L;delta_x_px=Math.ceil(I*N);M.save();for(var C=0,D=J.length;C<D;C++){var H=Math.floor((J[C][0]-E)*N);var F=J[C][1];if(!F){continue}var K=F/G*L;if(F!==0&&K<1){K=1}M.fillStyle=this.prefs.block_color;M.fillRect(H,B-K,delta_x_px,K);var A=4;if(this.prefs.show_counts&&(M.measureText(F).width+A)<delta_x_px){M.fillStyle=this.prefs.label_color;M.textAlign="center";M.fillText(F,H+(delta_x_px/2),10)}}M.restore()};var c=function(x,B,D,E,z){m.call(this,x,B,D,E,z);if(this.prefs.min_value===undefined){var F=Infinity;for(var y=0,A=this.data.length;y<A;y++){F=Math.min(F,this.data[y][1])}this.prefs.min_value=F}if(this.prefs.max_value===undefined){var C=-Infinity;for(var y=0,A=this.data.length;y<A;y++){C=Math.max(C,this.data[y][1])}this.prefs.max_value=C}};c.prototype.default_prefs={min_value:undefined,max_value:undefined,mode:"Histogram",color:"#000",overflow_color:"#F66"};c.prototype.draw=function(O,N,L){var F=false,H=this.prefs.min_value,D=this.prefs.max_value,K=D-H,z=L,A=this.view_start,M=this.view_end-this.view_start,B=N/M,I=this.mode,S=this.data;O.save();var T=Math.round(L+H/K*L);if(I!=="Intensity"){O.fillStyle="#aaa";O.fillRect(0,T,N,1)}O.beginPath();O.fillStyle=this.prefs.color;var R,E,C;if(S.length>1){C=Math.ceil((S[1][0]-S[0][0])*B)}else{C=10}for(var P=0,Q=S.length;P<Q;P++){R=Math.round((S[P][0]-A)*B);E=S[P][1];if(E===null){if(F&&I==="Filled"){O.lineTo(R,z)}F=false;continue}if(E<H){E=H}else{if(E>D){E=D}}if(I==="Histogram"){E=Math.round(E/K*z);O.fillRect(R,T,C,-E)}else{if(I==="Intensity"){E=255-Math.floor((E-H)/K*255);O.fillStyle="rgb("+E+","+E+","+E+")";O.fillRect(R,0,C,z)}else{E=Math.round(z-(E-H)/K*z);if(F){O.lineTo(R,E)}else{F=true;if(I==="Filled"){O.moveTo(R,z);O.lineTo(R,E)}else{O.moveTo(R,E)}}}}}if(I==="Filled"){if(F){O.lineTo(R,T);O.lineTo(0,T)}O.fill()}else{O.stroke()}var x=-1,J=-1;O.fillStyle=this.prefs.overflow_color;var G;for(var P=0,Q=S.length;P<Q;P++){E=S[P][1];R=Math.round((S[P][0]-A)*B);if(J>=0&&(E===null||E<D)){O.fillRect(J,0,G+C-J,2);J=-1}else{if(x>=0&&(E===null||E>H)){O.fillRect(x,L-2,G+C-x,2);x=-1}}if(E!==null&&E>D&&J<0){J=R}else{if(E!==null&&E<H&&x<0){x=R}}G=R}O.restore()};var n=function(z,B,x,y,A){m.call(this,z,B,x,y,A)};n.prototype.default_prefs={block_color:"#FFF",connector_color:"#FFF"};t(n.prototype,{get_required_height:function(y){var x=y_scale=this.get_row_height(),z=this.mode;if(z==="no_detail"||z==="Squish"||z==="Pack"){x=y*y_scale}return x+Math.max(Math.round(y_scale/2),5)},draw:function(J,A,I,F){var D=this.data,G=this.view_start,K=this.view_end;J.save();J.fillStyle=this.prefs.block_color;J.textAlign="right";var N=this.view_end-this.view_start,M=A/N,z=this.get_row_height();for(var C=0,E=D.length;C<E;C++){var L=D[C],B=L[0],x=L[1],y=L[2],H=(F&&F[B]!==undefined?F[B]:null);if((x<K&&y>G)&&(this.mode=="Dense"||H!==null)){this.draw_element(J,this.mode,L,H,G,K,M,z,A)}}J.restore()}});var d=10,h=3,l=5,v=10,f=1,r=3,e=3,a=9,k=2,g="#ccc";var q=function(z,B,x,y,A){n.call(this,z,B,x,y,A)};t(q.prototype,n.prototype,{get_row_height:function(){var y=this.mode,x;if(y==="Dense"){x=d}else{if(y==="no_detail"){x=h}else{if(y==="Squish"){x=l}else{x=v}}}return x},draw_element:function(J,C,R,E,L,ab,af,ag,x){var O=R[0],ad=R[1],V=R[2],M=R[3],W=Math.floor(Math.max(0,(ad-L)*af)),K=Math.ceil(Math.min(x,Math.max(0,(V-L)*af))),U=(C==="Dense"?0:(0+E))*ag,I,Z,N=null,ah=null,A=this.prefs.block_color,Y=this.prefs.label_color;if(C=="Dense"){E=1}if(C==="no_detail"){J.fillStyle=A;J.fillRect(W,U+5,K-W,f)}else{var H=R[4],T=R[5],X=R[6],B=R[7];if(T&&X){N=Math.floor(Math.max(0,(T-L)*af));ah=Math.ceil(Math.min(x,Math.max(0,(X-L)*af)))}var ae,P;if(C==="Squish"||C==="Dense"){ae=1;P=e}else{ae=5;P=a}if(!B){if(R.strand){if(R.strand==="+"){J.fillStyle=J.canvas.manager.get_pattern("right_strand_inv")}else{if(R.strand==="-"){J.fillStyle=J.canvas.manager.get_pattern("left_strand_inv")}}}else{J.fillStyle=A}J.fillRect(W,U,K-W,P)}else{var G,Q;if(C==="Squish"||C==="Dense"){J.fillStyle=g;G=U+Math.floor(e/2)+1;Q=1}else{if(H){var G=U;var Q=P;if(H==="+"){J.fillStyle=J.canvas.manager.get_pattern("right_strand")}else{if(H==="-"){J.fillStyle=J.canvas.manager.get_pattern("left_strand")}}}else{J.fillStyle=g;G+=(e/2)+1;Q=1}}J.fillRect(W,G,K-W,Q);for(var ac=0,z=B.length;ac<z;ac++){var D=B[ac],y=Math.floor(Math.max(0,(D[0]-L)*af)),S=Math.ceil(Math.min(x,Math.max((D[1]-L)*af)));if(y>S){continue}J.fillStyle=A;J.fillRect(y,U+(P-ae)/2+1,S-y,ae);if(N!==undefined&&X>T&&!(y>ah||S<N)){var aa=Math.max(y,N),F=Math.min(S,ah);J.fillRect(aa,U+1,F-aa,P);if(B.length==1&&C=="Pack"){if(H==="+"){J.fillStyle=J.canvas.manager.get_pattern("right_strand_inv")}else{if(H==="-"){J.fillStyle=J.canvas.manager.get_pattern("left_strand_inv")}}if(aa+14<F){aa+=2;F-=2}J.fillRect(aa,U+1,F-aa,P)}}}}if(C==="Pack"&&ad>L){J.fillStyle=Y;if(L===0&&W-J.measureText(M).width<0){J.textAlign="left";J.fillText(M,K+k,U+8)}else{J.textAlign="right";J.fillText(M,W-k,U+8)}J.fillStyle=A}}}});var b=function(z,B,x,y,A){n.call(this,z,B,x,y,A)};t(b.prototype,n.prototype,{draw_element:function(Q,L,F,B,T,z,I,R,O){var F=data[i],H=F[0],P=F[1],A=F[2],K=F[3],D=Math.floor(Math.max(0,(P-T)*I)),G=Math.ceil(Math.min(O,Math.max(0,(A-T)*I))),C=(L==="Dense"?0:(0+B))*R,x,U,y=null,J=null;if(no_label){Q.fillStyle=block_color;Q.fillRect(D+left_offset,C+5,G-D,1)}else{var S=F[4],N=F[5],E=F[6];x=9;U=1;Q.fillRect(D+left_offset,C,G-D,x);if(L!=="Dense"&&K!==undefined&&P>T){Q.fillStyle=label_color;if(T===0&&D-Q.measureText(K).width<0){Q.textAlign="left";Q.fillText(K,G+2+left_offset,C+8)}else{Q.textAlign="right";Q.fillText(K,D-2+left_offset,C+8)}Q.fillStyle=block_color}var M=S+" / "+N;if(P>T&&Q.measureText(M).width<(G-D)){Q.fillStyle="white";Q.textAlign="center";Q.fillText(M,left_offset+D+(G-D)/2,C+8);Q.fillStyle=block_color}}}});var s=function(A,C,x,z,B,y){n.call(this,A,C,x,z,B);this.ref_seq=y};s.prototype.default_prefs=t({},n.prototype.default_prefs,{show_insertions:false});t(s.prototype,n.prototype,{get_row_height:function(){var x,y=this.mode;if(y==="Dense"){x=d}else{if(y==="Squish"){x=l}else{x=v;if(this.prefs.show_insertions){x*=2}}}return x},draw_read:function(T,O,K,Y,z,S,H,E,D){T.textAlign="center";var R=this,y=[Y,z],N=0,U=0,Q=0;ref_seq=this.ref_seq,char_width_px=T.canvas.manager.char_width_px;var ad=[];if((O==="Pack"||this.mode==="Auto")&&E!==undefined&&K>char_width_px){Q=Math.round(K/2)}if(!H){H=[[0,E.length]]}for(var L=0,W=H.length;L<W;L++){var I=H[L],A="MIDNSHP=X"[I[0]],M=I[1];if(A==="H"||A==="S"){N-=M}var F=S+N,ac=Math.floor(Math.max(0,(F-Y)*K)),G=Math.floor(Math.max(0,(F+M-Y)*K));if(ac===G){G+=1}switch(A){case"H":break;case"S":case"M":case"=":if(is_overlap([F,F+M],y)){var P=E.slice(U,U+M);if(Q>0){T.fillStyle=this.prefs.block_color;T.fillRect(ac-Q,D+1,G-ac,9);T.fillStyle=g;for(var aa=0,x=P.length;aa<x;aa++){if(this.prefs.show_differences&&ref_seq){var J=ref_seq[F-Y+aa];if(!J||J.toLowerCase()===P[aa].toLowerCase()){continue}}if(F+aa>=Y&&F+aa<=z){var ab=Math.floor(Math.max(0,(F+aa-Y)*K));T.fillText(P[aa],ab,D+9)}}}else{T.fillStyle=this.prefs.block_color;T.fillRect(ac,D+4,G-ac,e)}}U+=M;N+=M;break;case"N":T.fillStyle=g;T.fillRect(ac-Q,D+5,G-ac,1);N+=M;break;case"D":T.fillStyle="red";T.fillRect(ac-Q,D+4,G-ac,3);N+=M;break;case"P":break;case"I":var X=ac-Q;if(is_overlap([F,F+M],y)){var P=E.slice(U,U+M);if(this.prefs.show_insertions){var C=ac-(G-ac)/2;if((O==="Pack"||this.mode==="Auto")&&E!==undefined&&K>char_width_px){T.fillStyle="yellow";T.fillRect(C-Q,D-9,G-ac,9);ad[ad.length]={type:"triangle",data:[X,D+4,5]};T.fillStyle=g;switch(seq_tile_overlap){case (OVERLAP_START):P=P.slice(Y-F);break;case (OVERLAP_END):P=P.slice(0,F-z);break;case (CONTAINED_BY):break;case (CONTAINS):P=P.slice(Y-F,F-z);break}for(var aa=0,x=P.length;aa<x;aa++){var ab=Math.floor(Math.max(0,(F+aa-Y)*K));T.fillText(P[aa],ab-(G-ac)/2,D)}}else{T.fillStyle="yellow";T.fillRect(C,D+(this.mode!=="Dense"?2:5),G-ac,(O!=="Dense"?e:r))}}else{if((O==="Pack"||this.mode==="Auto")&&E!==undefined&&K>char_width_px){ad[ad.length]={type:"text",data:[P.length,X,D+9]}}else{}}}U+=M;break;case"X":U+=M;break}}T.fillStyle="yellow";var Z,B,ae;for(var V=0;V<ad.length;V++){Z=ad[V];B=Z.type;ae=Z.data;if(B==="text"){T.save();T.font="bold "+T.font;T.fillText(ae[0],ae[1],ae[2]);T.restore()}else{if(B=="triangle"){p(T,ae[0],ae[1],ae[2])}}}},draw_element:function(Q,L,D,A,T,y,H,R,O){var G=D[0],P=D[1],z=D[2],I=D[3],C=Math.floor(Math.max(0,(P-T)*H)),E=Math.ceil(Math.min(O,Math.max(0,(z-T)*H))),B=(L==="Dense"?0:(0+A))*R,U=this.prefs.block_color,F=this.prefs.label_color,N=0;if((L==="Pack"||this.mode==="Auto")&&H>Q.canvas.manager.char_width_px){var N=Math.round(H/2)}Q.fillStyle=U;if(D[5] instanceof Array){var M=Math.floor(Math.max(0,(D[4][0]-T)*H)),K=Math.ceil(Math.min(O,Math.max(0,(D[4][1]-T)*H))),J=Math.floor(Math.max(0,(D[5][0]-T)*H)),x=Math.ceil(Math.min(O,Math.max(0,(D[5][1]-T)*H)));if(D[4][1]>=T&&D[4][0]<=y&&D[4][2]){this.draw_read(Q,L,H,T,y,D[4][0],D[4][2],D[4][3],B)}if(D[5][1]>=T&&D[5][0]<=y&&D[5][2]){this.draw_read(Q,L,H,T,y,D[5][0],D[5][2],D[5][3],B)}if(J>K){Q.fillStyle=g;o(Q,K-N,B+5,J-N,B+5)}}else{Q.fillStyle=U;this.draw_read(Q,L,H,T,y,P,D[4],D[5],B)}if(L==="Pack"&&P>T){Q.fillStyle=this.prefs.label_color;var S=1;if(S===0&&C-Q.measureText(I).width<0){Q.textAlign="left";Q.fillText(I,E+k-N,B+8)}else{Q.textAlign="right";Q.fillText(I,C-k-N,B+8)}Q.fillStyle=U}}});w.SummaryTreePainter=u;w.LinePainter=c;w.LinkedFeaturePainter=q;w.ReadPainter=s;w.VariantPainter=b};(function(d){var c={};var b=function(e){return c[e]};var a=function(f,g){var e={};g(b,e);c[f]=e};a("class",class_module);a("slotting",slotting_module);a("painters",painters_module);a("trackster",trackster_module);for(key in c.trackster){d[key]=c.trackster[key]}})(window);
\ No newline at end of file
+var class_module=function(b,a){var c=function(){var f=arguments[0];for(var e=1;e<arguments.length;e++){var d=arguments[e];for(key in d){f[key]=d[key]}}return f};a.extend=c};var BEFORE=1001,CONTAINS=1002,OVERLAP_START=1003,OVERLAP_END=1004,CONTAINED_BY=1005,AFTER=1006;var compute_overlap=function(e,b){var g=e[0],f=e[1],d=b[0],c=b[1],a;if(g<d){if(f<d){a=BEFORE}else{if(f<=c){a=OVERLAP_START}else{a=CONTAINS}}}else{if(g>c){a=AFTER}else{if(f<=c){a=CONTAINED_BY}else{a=OVERLAP_END}}}return a};var is_overlap=function(c,b){var a=compute_overlap(c,b);return(a!==BEFORE&&a!==AFTER)};var trackster_module=function(f,T){var n=f("class").extend,p=f("slotting"),I=f("painters");var Z=function(aa,ab){this.document=aa;this.default_font=ab!==undefined?ab:"9px Monaco, Lucida Console, monospace";this.dummy_canvas=this.new_canvas();this.dummy_context=this.dummy_canvas.getContext("2d");this.dummy_context.font=this.default_font;this.char_width_px=this.dummy_context.measureText("A").width;this.patterns={};this.load_pattern("right_strand","/visualization/strand_right.png");this.load_pattern("left_strand","/visualization/strand_left.png");this.load_pattern("right_strand_inv","/visualization/strand_right_inv.png");this.load_pattern("left_strand_inv","/visualization/strand_left_inv.png")};n(Z.prototype,{load_pattern:function(aa,ae){var ab=this.patterns,ac=this.dummy_context,ad=new Image();ad.src=image_path+ae;ad.onload=function(){ab[aa]=ac.createPattern(ad,"repeat")}},get_pattern:function(aa){return this.patterns[aa]},new_canvas:function(){var aa=this.document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(aa)}aa.manager=this;return aa}});var C=function(aa,ab){aa.bind("drag",{handle:ab,relative:true},function(af,ag){var ae=$(this).parent();var ad=ae.children();var ac;for(ac=0;ac<ad.length;ac++){if(ag.offsetY<$(ad.get(ac)).position().top){break}}if(ac===ad.length){if(this!==ad.get(ac-1)){ae.append(this)}}else{if(this!==ad.get(ac)){$(this).insertBefore(ad.get(ac))}}}).bind("dragstart",function(){$(this).css({"border-top":"1px solid blue","border-bottom":"1px solid blue"})}).bind("dragend",function(){$(this).css("border","0px")})};T.sortable=C;var D=9,A=10,O=D+2,w=100,F=12000,M=200,z=5,s=10,H=5000,t=100,m="There was an error in indexing this dataset. ",G="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",B="No data for this chrom/contig.",q="Currently indexing... please wait",v="Tool cannot be rerun: ",a="Loading data...",U="Ready for display",d=10,r=5,y=5;function u(aa){return Math.round(aa*1000)/1000}var c=function(aa){this.num_elements=aa;this.clear()};n(c.prototype,{get:function(ab){var aa=this.key_ary.indexOf(ab);if(aa!==-1){this.move_key_to_end(ab,aa)}return this.obj_cache[ab]},set:function(ab,ac){if(!this.obj_cache[ab]){if(this.key_ary.length>=this.num_elements){var aa=this.key_ary.shift();delete this.obj_cache[aa]}this.key_ary.push(ab)}this.obj_cache[ab]=ac;return ac},move_key_to_end:function(ab,aa){this.key_ary.splice(aa,1);this.key_ary.push(ab)},clear:function(){this.obj_cache={};this.key_ary=[]},size:function(){return this.key_ary.length}});var N=function(ab,aa,ac){c.call(this,ab);this.track=aa;this.subset=(ac!==undefined?ac:true)};n(N.prototype,c.prototype,{load_data:function(ai,aj,ae,ah,ab,ag){var ad={chrom:ai,low:aj,high:ae,mode:ah,resolution:ab,dataset_id:this.track.dataset_id,hda_ldda:this.track.hda_ldda};$.extend(ad,ag);if(this.track.filters_manager){var ak=[];var aa=this.track.filters_manager.filters;for(var af=0;af<aa.length;af++){ak[ak.length]=aa[af].name}ad.filter_cols=JSON.stringify(ak)}var ac=this;return $.getJSON(this.track.data_url,ad,function(al){ac.set_data(aj,ae,ah,al)})},get_data:function(ac,aa,af,ag,ab,ae){var ad=this.get(this.gen_key(aa,af,ag));if(ad){return ad}ad=this.load_data(ac,aa,af,ag,ab,ae);this.set_data(aa,af,ag,ad);return ad},set_data:function(ab,ac,ad,aa){return this.set(this.gen_key(ab,ac,ad),aa)},gen_key:function(aa,ac,ad){var ab=aa+"_"+ac+"_"+ad;return ab},split_key:function(aa){return aa.split("_")}});var E=function(ab,aa,ac){N.call(this,ab,aa,ac)};n(E.prototype,N.prototype,c.prototype,{load_data:function(ac,aa,ae,af,ab,ad){if(ab>1){return}return N.prototype.load_data.call(this,ac,aa,ae,af,ab,ad)}});var Y=function(aa,ad,ac,ab,ae){this.container=aa;this.chrom=null;this.vis_id=ac;this.dbkey=ab;this.title=ad;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(ae);this.canvas_manager=new Z(aa.get(0).ownerDocument);this.reset()};n(Y.prototype,{init:function(ad){var ac=this.container,aa=this;this.top_container=$("<div/>").addClass("top-container").appendTo(ac);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(ac);this.bottom_container=$("<div/>").addClass("bottom-container").appendTo(ac);this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(this.top_container);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide();this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.bottom_container);this.nav_container=$("<div/>").addClass("nav-container").prependTo(this.top_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.bottom_container);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a href='javascript:void(0);'>Close Overview</a>").addClass("overview-close").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div/>").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.nav_controls);var ab=function(ae){if(ae.type==="focusout"||(ae.keyCode||ae.which)===13||(ae.keyCode||ae.which)===27){if((ae.keyCode||ae.which)!==27){aa.go_to($(this).val())}$(this).hide();$(this).val("");aa.location_span.show();aa.chrom_select.show()}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keyup focusout",ab).appendTo(this.nav_controls);this.location_span=$("<span/>").addClass("location").appendTo(this.nav_controls);this.location_span.bind("click",function(){aa.location_span.hide();aa.chrom_select.hide();aa.nav_input.val(aa.chrom+":"+aa.low+"-"+aa.high);aa.nav_input.css("display","inline-block");aa.nav_input.select();aa.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.nav_controls)}this.zo_link=$("<a id='zoom-out' />").click(function(){aa.zoom_out();aa.redraw()}).appendTo(this.nav_controls);this.zi_link=$("<a id='zoom-in' />").click(function(){aa.zoom_in();aa.redraw()}).appendTo(this.nav_controls);this.load_chroms({low:0},ad);this.chrom_select.bind("change",function(){aa.change_chrom(aa.chrom_select.val())});this.intro_div.show();this.content_div.bind("click",function(ae){$(this).find("input").trigger("blur")});this.content_div.bind("dblclick",function(ae){aa.zoom_in(ae.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(ae,af){this.current_x=af.offsetX}).bind("drag",function(ae,ag){var ah=ag.offsetX-this.current_x;this.current_x=ag.offsetX;var af=Math.round(ah/aa.viewport_container.width()*(aa.max_high-aa.max_low));aa.move_delta(-af)});this.overview_close.bind("click",function(){for(var af=0,ae=aa.tracks.length;af<ae;af++){aa.tracks[af].is_overview=false}$(this).siblings().filter("canvas").remove();$(this).parent().css("height",aa.overview_box.height());aa.overview_highlight.hide();$(this).hide()});this.viewport_container.bind("draginit",function(ae,af){if(ae.clientX>aa.viewport_container.width()-16){return false}}).bind("dragstart",function(ae,af){af.original_low=aa.low;af.current_height=ae.clientY;af.current_x=af.offsetX}).bind("drag",function(ag,ai){var ae=$(this);var aj=ai.offsetX-ai.current_x;var af=ae.scrollTop()-(ag.clientY-ai.current_height);ae.scrollTop(af);ai.current_height=ag.clientY;ai.current_x=ai.offsetX;var ah=Math.round(aj/aa.viewport_container.width()*(aa.high-aa.low));aa.move_delta(ah)}).bind("mousewheel",function(ag,ai,af,ae){if(af){var ah=Math.round(-af/aa.viewport_container.width()*(aa.high-aa.low));aa.move_delta(ah)}});this.top_labeltrack.bind("dragstart",function(ae,af){return $("<div />").css({height:aa.content_div.height()+aa.top_labeltrack.height()+aa.nav_labeltrack.height()+1,top:"0px",position:"absolute","background-color":"#ccf",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(ai,aj){$(aj.proxy).css({left:Math.min(ai.pageX,aj.startX),width:Math.abs(ai.pageX-aj.startX)});var af=Math.min(ai.pageX,aj.startX)-aa.container.offset().left,ae=Math.max(ai.pageX,aj.startX)-aa.container.offset().left,ah=(aa.high-aa.low),ag=aa.viewport_container.width();aa.update_location(Math.round(af/ag*ah)+aa.low,Math.round(ae/ag*ah)+aa.low)}).bind("dragend",function(aj,ak){var af=Math.min(aj.pageX,ak.startX),ae=Math.max(aj.pageX,ak.startX),ah=(aa.high-aa.low),ag=aa.viewport_container.width(),ai=aa.low;aa.low=Math.round(af/ag*ah)+ai;aa.high=Math.round(ae/ag*ah)+ai;$(ak.proxy).remove();aa.redraw()});this.add_label_track(new X(this,this.top_labeltrack));this.add_label_track(new X(this,this.nav_labeltrack));$(window).bind("resize",function(){aa.resize_window()});$(document).bind("redraw",function(){aa.redraw()});this.reset();$(window).trigger("resize")},update_location:function(aa,ab){this.location_span.text(commatize(aa)+" - "+commatize(ab));this.nav_input.val(this.chrom+":"+commatize(aa)+"-"+commatize(ab))},load_chroms:function(ab,ac){ab.num=t;$.extend(ab,(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}));var aa=this;$.ajax({url:chrom_url,data:ab,dataType:"json",success:function(ae){if(ae.chrom_info.length===0){alert("Invalid chromosome: "+ab.chrom);return}if(ae.reference){aa.add_label_track(new x(aa))}aa.chrom_data=ae.chrom_info;var ah='<option value="">Select Chrom/Contig</option>';for(var ag=0,ad=aa.chrom_data.length;ag<ad;ag++){var af=aa.chrom_data[ag].chrom;ah+='<option value="'+af+'">'+af+"</option>"}if(ae.prev_chroms){ah+='<option value="previous">Previous '+t+"</option>"}if(ae.next_chroms){ah+='<option value="next">Next '+t+"</option>"}aa.chrom_select.html(ah);if(ac){ac()}aa.chrom_start_index=ae.start_index},error:function(){alert("Could not load chroms for this dbkey:",aa.dbkey)}})},change_chrom:function(ae,ab,ag){if(!ae||ae==="None"){return}var ad=this;if(ae==="previous"){ad.load_chroms({low:this.chrom_start_index-t});return}if(ae==="next"){ad.load_chroms({low:this.chrom_start_index+t});return}var af=$.grep(ad.chrom_data,function(ai,aj){return ai.chrom===ae})[0];if(af===undefined){ad.load_chroms({chrom:ae},function(){ad.change_chrom(ae,ab,ag)});return}else{if(ae!==ad.chrom){ad.chrom=ae;if(!ad.chrom){ad.intro_div.show()}else{ad.intro_div.hide()}ad.chrom_select.val(ad.chrom);ad.max_high=af.len-1;ad.reset();ad.redraw(true);for(var ah=0,aa=ad.tracks.length;ah<aa;ah++){var ac=ad.tracks[ah];if(ac.init){ac.init()}}}if(ab!==undefined&&ag!==undefined){ad.low=Math.max(ab,0);ad.high=Math.min(ag,ad.max_high)}ad.reset_overview();ad.redraw()}},go_to:function(ae){var ai=this,aa,ad,ab=ae.split(":"),ag=ab[0],ah=ab[1];if(ah!==undefined){try{var af=ah.split("-");aa=parseInt(af[0].replace(/,/g,""),10);ad=parseInt(af[1].replace(/,/g,""),10)}catch(ac){return false}}ai.change_chrom(ag,aa,ad)},move_fraction:function(ac){var aa=this;var ab=aa.high-aa.low;this.move_delta(ac*ab)},move_delta:function(ac){var aa=this;var ab=aa.high-aa.low;if(aa.low-ac<aa.max_low){aa.low=aa.max_low;aa.high=aa.max_low+ab}else{if(aa.high-ac>aa.max_high){aa.high=aa.max_high;aa.low=aa.max_high-ab}else{aa.high-=ac;aa.low-=ac}}aa.redraw()},add_track:function(aa){aa.view=this;aa.track_id=this.track_id_counter;this.tracks.push(aa);if(aa.init){aa.init()}aa.container_div.attr("id","track_"+aa.track_id);C(aa.container_div,".draghandle");this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(aa){aa.view=this;this.label_tracks.push(aa)},remove_track:function(aa){this.has_changes=true;aa.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(aa)];this.num_tracks-=1},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(ah){var ag=this.high-this.low,af=this.low,ab=this.high;if(af<this.max_low){af=this.max_low}if(ab>this.max_high){ab=this.max_high}if(this.high!==0&&ag<this.min_separation){ab=af+this.min_separation}this.low=Math.floor(af);this.high=Math.ceil(ab);this.resolution=Math.pow(z,Math.ceil(Math.log((this.high-this.low)/M)/Math.log(z)));this.zoom_res=Math.pow(s,Math.max(0,Math.ceil(Math.log(this.resolution,s)/Math.log(s))));var aa=(this.low/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ae=((this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ai=13;this.overview_box.css({left:aa,width:Math.max(ai,ae)}).show();if(ae<ai){this.overview_box.css("left",aa-(ai-ae)/2)}if(this.overview_highlight){this.overview_highlight.css({left:aa,width:ae})}this.update_location(this.low,this.high);if(!ah){for(var ac=0,ad=this.tracks.length;ac<ad;ac++){if(this.tracks[ac]&&this.tracks[ac].enabled){this.tracks[ac].draw()}}for(ac=0,ad=this.label_tracks.length;ac<ad;ac++){this.label_tracks[ac].draw()}}},zoom_in:function(ab,ac){if(this.max_high===0||this.high-this.low<this.min_separation){return}var ad=this.high-this.low,ae=ad/2+this.low,aa=(ad/this.zoom_factor)/2;if(ab){ae=ab/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(ae-aa);this.high=Math.round(ae+aa);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var ab=this.high-this.low,ac=ab/2+this.low,aa=(ab*this.zoom_factor)/2;this.low=Math.round(ac-aa);this.high=Math.round(ac+aa);this.redraw()},resize_window:function(){this.viewport_container.height(this.container.height()-this.top_container.height()-this.bottom_container.height());this.nav_container.width(this.container.width());this.redraw()},reset_overview:function(){this.overview_viewport.find("canvas").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide()}});var o=function(ac,ag){this.track=ac;this.name=ag.name;this.params=[];var an=ag.params;for(var ad=0;ad<an.length;ad++){var ai=an[ad],ab=ai.name,am=ai.label,ae=unescape(ai.html),ao=ai.value,ak=ai.type;if(ak==="number"){this.params[this.params.length]=new g(ab,am,ae,ao,ai.min,ai.max)}else{if(ak=="select"){this.params[this.params.length]=new K(ab,am,ae,ao)}else{console.log("WARNING: unrecognized tool parameter type:",ab,ak)}}}this.parent_div=$("<div/>").addClass("dynamic-tool").hide();this.parent_div.bind("drag",function(aq){aq.stopPropagation()}).bind("click",function(aq){aq.stopPropagation()}).bind("dblclick",function(aq){aq.stopPropagation()});var al=$("<div class='tool-name'>").appendTo(this.parent_div).text(this.name);var aj=this.params;var ah=this;$.each(this.params,function(ar,av){var au=$("<div>").addClass("param-row").appendTo(ah.parent_div);var aq=$("<div>").addClass("param-label").text(av.label).appendTo(au);var at=$("<div/>").addClass("slider").html(av.html).appendTo(au);at.find(":input").val(av.value);$("<div style='clear: both;'/>").appendTo(au)});this.parent_div.find("input").click(function(){$(this).select()});var ap=$("<div>").addClass("param-row").appendTo(this.parent_div);var af=$("<input type='submit'>").attr("value","Run on complete dataset").appendTo(ap);var aa=$("<input type='submit'>").attr("value","Run on visible region").css("margin-left","3em").appendTo(ap);var ah=this;aa.click(function(){ah.run_on_region()});af.click(function(){ah.run_on_dataset()})};n(o.prototype,{get_param_values_dict:function(){var aa={};this.parent_div.find(":input").each(function(){var ab=$(this).attr("name"),ac=$(this).val();aa[ab]=JSON.stringify(ac)});return aa},get_param_values:function(){var ab=[];var aa={};this.parent_div.find(":input").each(function(){var ac=$(this).attr("name"),ad=$(this).val();if(ac){ab[ab.length]=ad}});return ab},run_on_dataset:function(){var aa=this;aa.run({dataset_id:this.track.original_dataset_id,tool_id:aa.name},function(ab){show_modal(aa.name+" is Running",aa.name+" is running on the complete dataset. Tool outputs are in dataset's history.",{Close:hide_modal})})},run_on_region:function(){var aa={dataset_id:this.track.original_dataset_id,chrom:this.track.view.chrom,low:this.track.view.low,high:this.track.view.high,tool_id:this.name},ac=this.track,ab=aa.tool_id+ac.tool_region_and_parameters_str(aa.chrom,aa.low,aa.high),ad;if(ac.track_type==="FeatureTrack"){ad=new Q(ab,view,ac.hda_ldda,undefined,{},{},ac);ad.change_mode(ac.mode)}this.track.add_track(ad);ad.content_div.text("Starting job.");this.run(aa,function(ae){ad.dataset_id=ae.dataset_id;ad.content_div.text("Running job.");ad.init()})},run:function(ab,ac){$.extend(ab,this.get_param_values_dict());var aa=function(){$.getJSON(rerun_tool_url,ab,function(ad){if(ad==="no converter"){new_track.container_div.addClass("error");new_track.content_div.text(G)}else{if(ad.error){new_track.container_div.addClass("error");new_track.content_div.text(v+ad.message)}else{if(ad==="pending"){new_track.container_div.addClass("pending");new_track.content_div.text("Converting input data so that it can be easily reused.");setTimeout(aa,2000)}else{ac(ad)}}}})};aa()}});var K=function(ab,aa,ac,ad){this.name=ab;this.label=aa;this.html=ac;this.value=ad};var g=function(ac,ab,ae,af,ad,aa){K.call(this,ac,ab,ae,af);this.min=ad;this.max=aa};var h=function(ab,aa,ac,ad){this.name=ab;this.index=aa;this.tool_id=ac;this.tool_exp_name=ad};var R=function(ab,aa,ac,ad){h.call(this,ab,aa,ac,ad);this.low=-Number.MAX_VALUE;this.high=Number.MAX_VALUE;this.min=Number.MAX_VALUE;this.max=-Number.MAX_VALUE;this.slider=null;this.slider_label=null};n(R.prototype,{applies_to:function(aa){if(aa.length>this.index){return true}return false},keep:function(aa){if(!this.applies_to(aa)){return true}var ab=parseInt(aa[this.index]);return(isNaN(ab)||(ab>=this.low&&ab<=this.high))},update_attrs:function(ab){var aa=false;if(!this.applies_to(ab)){return aa}if(ab[this.index]<this.min){this.min=Math.floor(ab[this.index]);aa=true}if(ab[this.index]>this.max){this.max=Math.ceil(ab[this.index]);aa=true}return aa},update_ui_elt:function(){var ac=function(af,ad){var ae=ad-af;return(ae<=2?0.01:1)};var ab=this.slider.slider("option","min"),aa=this.slider.slider("option","max");if(this.min<ab||this.max>aa){this.slider.slider("option","min",this.min);this.slider.slider("option","max",this.max);this.slider.slider("option","step",ac(this.min,this.max));this.slider.slider("option","values",[this.min,this.max])}}});var W=function(ac,al){this.track=ac;this.filters=[];for(var ag=0;ag<al.length;ag++){var aa=al[ag],ab=aa.name,ak=aa.type,ai=aa.index,an=aa.tool_id,ad=aa.tool_exp_name;if(ak==="int"||ak==="float"){this.filters[ag]=new R(ab,ai,an,ad)}else{console.log("ERROR: unsupported filter: ",ab,ak)}}var aj=function(ao,ap,aq){ao.click(function(){var ar=ap.text();max=parseFloat(aq.slider("option","max")),input_size=(max<=1?4:max<=1000000?max.toString().length:6),multi_value=false;if(aq.slider("option","values")){input_size=2*input_size+1;multi_value=true}ap.text("");$("<input type='text'/>").attr("size",input_size).attr("maxlength",input_size).attr("value",ar).appendTo(ap).focus().select().click(function(at){at.stopPropagation()}).blur(function(){$(this).remove();ap.text(ar)}).keyup(function(ax){if(ax.keyCode===27){$(this).trigger("blur")}else{if(ax.keyCode===13){var av=aq.slider("option","min"),at=aq.slider("option","max"),aw=function(ay){return(isNaN(ay)||ay>at||ay<av)},au=$(this).val();if(!multi_value){au=parseFloat(au);if(aw(au)){alert("Parameter value must be in the range ["+av+"-"+at+"]");return $(this)}}else{au=au.split("-");au=[parseFloat(au[0]),parseFloat(au[1])];if(aw(au[0])||aw(au[1])){alert("Parameter value must be in the range ["+av+"-"+at+"]");return $(this)}}aq.slider((multi_value?"values":"value"),au)}}})})};this.parent_div=$("<div/>").addClass("filters").hide();this.parent_div.bind("drag",function(ao){ao.stopPropagation()}).bind("click",function(ao){ao.stopPropagation()}).bind("dblclick",function(ao){ao.stopPropagation()}).bind("keydown",function(ao){ao.stopPropagation()});var ae=this;$.each(this.filters,function(av,ap){var ar=$("<div/>").addClass("slider-row").appendTo(ae.parent_div);var ao=$("<div/>").addClass("slider-label").appendTo(ar);var ax=$("<span/>").addClass("slider-name").text(ap.name+" ").appendTo(ao);var aq=$("<span/>");var at=$("<span/>").addClass("slider-value").appendTo(ao).append("[").append(aq).append("]");var aw=$("<div/>").addClass("slider").appendTo(ar);ap.control_element=$("<div/>").attr("id",ap.name+"-filter-control").appendTo(aw);var au=[0,0];ap.control_element.slider({range:true,min:Number.MAX_VALUE,max:-Number.MIN_VALUE,values:[0,0],slide:function(ay,az){au=az.values;aq.text(az.values[0]+"-"+az.values[1]);setTimeout(function(){if(az.values[0]==au[0]&&az.values[1]==au[1]){var aA=az.values;aq.text(aA[0]+"-"+aA[1]);ap.low=aA[0];ap.high=aA[1];ae.track.draw(true,true)}},50)},change:function(ay,az){ap.control_element.slider("option","slide").call(ap.control_element,ay,az)}});ap.slider=ap.control_element;ap.slider_label=aq;aj(at,aq,ap.control_element);$("<div style='clear: both;'/>").appendTo(ar)});if(this.filters.length!=0){var am=$("<div>").addClass("param-row").appendTo(this.parent_div);var ah=$("<input type='submit'>").attr("value","Run on complete dataset").appendTo(am);var af=this;ah.click(function(){af.run_on_dataset()})}};n(W.prototype,{reset_filters:function(){for(var aa=0;aa<this.filters.length;aa++){filter=this.filters[aa];filter.slider.slider("option","values",[filter.min,filter.max])}},run_on_dataset:function(){var ai=function(am,ak,al){if(!(ak in am)){am[ak]=al}return am[ak]};var ac={},aa,ab,ad;for(var ae=0;ae<this.filters.length;ae++){aa=this.filters[ae];if(aa.tool_id){if(aa.min!=aa.low){ab=ai(ac,aa.tool_id,[]);ab[ab.length]=aa.tool_exp_name+" >= "+aa.low}if(aa.max!=aa.high){ab=ai(ac,aa.tool_id,[]);ab[ab.length]=aa.tool_exp_name+" <= "+aa.high}}}var ag=[];for(var aj in ac){ag[ag.length]=[aj,ac[aj]]}var ah=ag.length;(function af(aq,an){var al=an[0],am=al[0],ap=al[1],ao="("+ap.join(") and (")+")",ak={cond:ao,input:aq,target_dataset_id:aq,tool_id:am},an=an.slice(1);$.getJSON(run_tool_url,ak,function(ar){if(ar.error){show_modal("Filter Dataset","Error running tool "+am,{Close:hide_modal})}else{if(an.length===0){show_modal("Filtering Dataset","Filter(s) are running on the complete dataset. Outputs are in dataset's history.",{Close:hide_modal})}else{af(ar.dataset_id,an)}}})})(this.track.dataset_id,ag)}});var V=function(aa){this.track=aa.track;this.params=aa.params;this.values={};if(aa.saved_values){this.restore_values(aa.saved_values)}this.onchange=aa.onchange};n(V.prototype,{restore_values:function(aa){var ab=this;$.each(this.params,function(ac,ad){if(aa[ad.key]!==undefined){ab.values[ad.key]=aa[ad.key]}else{ab.values[ad.key]=ad.default_value}})},build_form:function(){var ab=this;var aa=$("<div />");$.each(this.params,function(af,ad){if(!ad.hidden){var ac="param_"+af;var ak=$("<div class='form-row' />").appendTo(aa);ak.append($("<label />").attr("for",ac).text(ad.label+":"));if(ad.type==="bool"){ak.append($('<input type="checkbox" />').attr("id",ac).attr("name",ac).attr("checked",ab.values[ad.key]))}else{if(ad.type==="color"){var ah=ab.values[ad.key];var ag=$("<input />").attr("id",ac).attr("name",ac).val(ah);var ai=$("<div class='tipsy tipsy-north' style='position: absolute;' />").hide();var ae=$("<div style='background-color: black; padding: 10px;'></div>").appendTo(ai);var aj=$("<div/>").appendTo(ae).farbtastic({width:100,height:100,callback:ag,color:ah});$("<div />").append(ag).append(ai).appendTo(ak).bind("click",function(al){ai.css({left:$(this).position().left+($(ag).width()/2)-60,top:$(this).position().top+$(this.height)}).show();$(document).bind("click.color-picker",function(){ai.hide();$(document).unbind("click.color-picker")});al.stopPropagation()})}else{ak.append($("<input />").attr("id",ac).attr("name",ac).val(ab.values[ad.key]))}}}});return aa},update_from_form:function(aa){var ac=this;var ab=false;$.each(this.params,function(ad,af){if(!af.hidden){var ag="param_"+ad;var ae=aa.find("#"+ag).val();if(af.type==="float"){ae=parseFloat(ae)}else{if(af.type==="int"){ae=parseInt(ae)}else{if(af.type==="bool"){ae=aa.find("#"+ag).is(":checked")}}}if(ae!==ac.values[af.key]){ac.values[af.key]=ae;ab=true}}});if(ab){this.onchange()}}});var b=function(ac,ab,aa){this.index=ac;this.resolution=ab;this.canvas=$("<div class='track-tile'/>").append(aa)};var l=function(ac,ab,aa,ad){b.call(this,ac,ab,aa);this.max_val=ad};var L=function(ac,ab,aa){b.call(this,ac,ab,aa)};var j=function(ab,aa,ae,ac,ad){this.name=ab;this.view=aa;this.parent_element=ae;this.data_url=(ac?ac:default_data_url);this.data_url_extra_params={};this.data_query_wait=(ad?ad:H);this.dataset_check_url=converted_datasets_state_url;this.container_div=$("<div />").addClass("track").css("position","relative");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);if(this.view.editor){this.drag_div=$("<div class='draghandle' />").appendTo(this.header_div)}this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name);this.name_div.attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase())}this.content_div=$("<div class='track-content'>").appendTo(this.container_div);this.parent_element.append(this.container_div)};n(j.prototype,{init:function(){var aa=this;aa.enabled=false;aa.tile_cache.clear();aa.data_cache.clear();aa.initial_canvas=undefined;aa.content_div.css("height","auto");aa.container_div.removeClass("nodata error pending");if(!aa.dataset_id){return}$.getJSON(converted_datasets_state_url,{hda_ldda:aa.hda_ldda,dataset_id:aa.dataset_id,chrom:aa.view.chrom},function(ab){if(!ab||ab==="error"||ab.kind==="error"){aa.container_div.addClass("error");aa.content_div.text(m);if(ab.message){var ad=aa.view.tracks.indexOf(aa);var ac=$(" <a href='javascript:void(0);'></a>").text("View error").bind("click",function(){show_modal("Trackster Error","<pre>"+ab.message+"</pre>",{Close:hide_modal})});aa.content_div.append(ac)}}else{if(ab==="no converter"){aa.container_div.addClass("error");aa.content_div.text(G)}else{if(ab==="no data"||(ab.data!==undefined&&(ab.data===null||ab.data.length===0))){aa.container_div.addClass("nodata");aa.content_div.text(B)}else{if(ab==="pending"){aa.container_div.addClass("pending");aa.content_div.text(q);setTimeout(function(){aa.init()},aa.data_query_wait)}else{if(ab.status==="data"){if(ab.valid_chroms){aa.valid_chroms=ab.valid_chroms;aa.make_name_popup_menu()}aa.content_div.text(U);if(aa.view.chrom){aa.content_div.text("");aa.content_div.css("height",aa.height_px+"px");aa.enabled=true;$.when(aa.predraw_init()).done(function(){aa.container_div.removeClass("nodata error pending");aa.draw()})}}}}}}})},predraw_init:function(){},update_name:function(aa){this.old_name=this.name;this.name=aa;this.name_div.text(this.name)},revert_name:function(){this.name=this.old_name;this.name_div.text(this.name)}});var J=function(ah,af,ai){var ab=this,aj=ab.view;this.filters_manager=(ah!==undefined?new W(this,ah):undefined);this.filters_available=false;this.filters_visible=false;this.tool=(af!==undefined&&obj_length(af)>0?new o(this,af):undefined);this.parent_track=ai;this.child_tracks=[];if(ab.hidden){return}if(this.parent_track){this.header_div.find(".draghandle").removeClass("draghandle").addClass("child-track-icon").addClass("icon-button");this.parent_element.addClass("child-track");this.tool=undefined}ab.child_tracks_container=$("<div/>").addClass("child-tracks-container").hide();ab.container_div.append(ab.child_tracks_container);if(this.filters_manager){this.filters_div=this.filters_manager.parent_div;this.header_div.after(this.filters_div)}if(this.tool){this.dynamic_tool_div=this.tool.parent_div;this.header_div.after(this.dynamic_tool_div)}if(ab.display_modes!==undefined){if(ab.mode_div===undefined){ab.mode_div=$("<div class='right-float menubutton popup' />").appendTo(ab.header_div);var ac=(ab.track_config&&ab.track_config.values.mode?ab.track_config.values.mode:ab.display_modes[0]);ab.mode=ac;ab.mode_div.text(ac);var aa={};for(var ad=0,ag=ab.display_modes.length;ad<ag;ad++){var ae=ab.display_modes[ad];aa[ae]=function(ak){return function(){ab.change_mode(ak)}}(ae)}make_popupmenu(ab.mode_div,aa)}else{ab.mode_div.hide()}}this.make_name_popup_menu()};n(J.prototype,j.prototype,{change_mode:function(ab){var aa=this;aa.mode_div.text(ab);aa.mode=ab;aa.track_config.values.mode=ab;aa.tile_cache.clear();aa.draw()},make_name_popup_menu:function(){var ab=this;var aa={};aa["Edit configuration"]=function(){var ah=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},af=function(){ab.track_config.update_from_form($(".dialog-box"));hide_modal();$(window).unbind("keypress.check_enter_esc")},ag=function(ai){if((ai.keyCode||ai.which)===27){ah()}else{if((ai.keyCode||ai.which)===13){af()}}};$(window).bind("keypress.check_enter_esc",ag);show_modal("Configure Track",ab.track_config.build_form(),{Cancel:ah,OK:af})};if(ab.filters_available>0){var ae=(ab.filters_div.is(":visible")?"Hide filters":"Show filters");aa[ae]=function(){ab.filters_visible=(ab.filters_div.is(":visible"));if(ab.filters_visible){ab.filters_manager.reset_filters()}ab.filters_div.toggle();ab.make_name_popup_menu()}}if(ab.tool){var ae=(ab.dynamic_tool_div.is(":visible")?"Hide tool":"Show tool");aa[ae]=function(){if(!ab.dynamic_tool_div.is(":visible")){ab.update_name(ab.name+ab.tool_region_and_parameters_str())}else{menu_option_text="Show dynamic tool";ab.revert_name()}ab.dynamic_tool_div.toggle();ab.make_name_popup_menu()}}if(ab.valid_chroms){aa["List chrom/contigs with data"]=function(){show_modal("Chrom/contigs with data","<p>"+ab.valid_chroms.join("<br/>")+"</p>",{Close:function(){hide_modal()}})}}var ac=view;var ad=function(){$("#no-tracks").show()};if(this.parent_track){ac=this.parent_track;ad=function(){}}aa.Remove=function(){ac.remove_track(ab);if(ac.num_tracks===0){ad()}};make_popupmenu(ab.name_div,aa)},draw:function(aa,ac){var au=this.view.low,ag=this.view.high,ai=ag-au,ak=this.view.container.width(),ae=ak/ai,al=this.view.resolution,ad=$("<div style='position: relative;'></div>"),am=function(aw,ax,av){return aw+"_"+ax+"_"+av};if(!ac){this.content_div.children().remove()}this.content_div.append(ad);this.max_height=0;var ao=Math.floor(au/al/M);var af=[];var ap=0;while((ao*M*al)<ag){var at=am(ak,ae,ao);var ah=this.tile_cache.get(at);var aq=ao*M*this.view.resolution;var ab=aq+M*this.view.resolution;if(!aa&&ah){af[af.length]=ah;this.show_tile(ah,ad,aq,ae)}else{this.delayed_draw(aa,at,ao,al,ad,ae,af)}ao+=1;ap++}var aj=this;var ar=setInterval(function(){if(af.length===ap){clearInterval(ar);if(ac){var ay=aj.content_div.children();var az=false;for(var ax=ay.length-1,aD=0;ax>=aD;ax--){var aw=$(ay[ax]);if(az){aw.remove()}else{if(aw.children().length!==0){az=true}}}}if(aj.track_type=="FeatureTrack"&&aj.mode=="Histogram"){var aC=-1;for(var ax=0;ax<af.length;ax++){var aF=af[ax].max_val;if(aF>aC){aC=aF}}for(var ax=0;ax<af.length;ax++){if(af[ax].max_val!==aC){var aE=af[ax];aE.canvas.remove();aj.delayed_draw(true,am(ak,ae,aE.index),aE.index,aE.resolution,ad,ae,[],{max:aC})}}}if(aj.filters_manager){var av=aj.filters_manager.filters;for(var aB=0;aB<av.length;aB++){av[aB].update_ui_elt()}var aA=false;if(aj.example_feature){for(var aB=0;aB<av.length;aB++){if(av[aB].applies_to(aj.example_feature)){aA=true;break}}}if(aj.filters_available!==aA){aj.filters_available=aA;if(!aj.filters_available){aj.filters_div.hide()}aj.make_name_popup_menu()}}}},50);for(var an=0;an<this.child_tracks.length;an++){this.child_tracks[an].draw(aa,ac)}},delayed_draw:function(ab,ai,ac,ae,aj,am,ak,af){var ad=this,ag=ac*M*ae,al=ag+M*ae;var ah=function(av,an,ap,ao,at,au,aq){var ar=ad.draw_tile(an,ap,ao,au,aq);ad.tile_cache.set(ai,ar);if(ar===undefined){return}ad.show_tile(ar,at,ag,au);ak[ak.length]=ar};var aa=setTimeout(function(){if(ag<=ad.view.high&&al>=ad.view.low){var an=(ab?undefined:ad.tile_cache.get(ai));if(an){ad.show_tile(an,aj,ag,am);ak[ak.length]=an}else{$.when(ad.data_cache.get_data(view.chrom,ag,al,ad.mode,ae,ad.data_url_extra_params)).then(function(ao){n(ao,af);if(view.reference_track&&am>view.canvas_manager.char_width_px){$.when(view.reference_track.data_cache.get_data(view.chrom,ag,al,ad.mode,ae,view.reference_track.data_url_extra_params)).then(function(ap){ah(aa,ao,ae,ac,aj,am,ap)})}else{ah(aa,ao,ae,ac,aj,am)}})}}},50)},show_tile:function(ad,ag,ae,ah){var ab=this;var ac=this.view.high-this.view.low,af=(ae-this.view.low)*ah;if(this.left_offset){af-=this.left_offset}var aa=ad.canvas;aa.css({position:"absolute",top:0,left:af,height:""});ag.append(aa);ab.max_height=Math.max(ab.max_height,aa.height());ab.content_div.css("height",ab.max_height+"px");ag.children().css("height",ab.max_height+"px")},set_overview:function(){var aa=this.view;if(this.initial_canvas&&this.is_overview){aa.overview_close.show();aa.overview_viewport.append(this.initial_canvas);aa.overview_highlight.show().height(this.initial_canvas.height());aa.overview_viewport.height(this.initial_canvas.height()+aa.overview_box.height())}$(window).trigger("resize")},tool_region_and_parameters_str:function(ac,aa,ad){var ab=this,ae=(ac!==undefined&&aa!==undefined&&ad!==undefined?ac+":"+aa+"-"+ad:"all");return" - region=["+ae+"], parameters=["+ab.tool.get_param_values().join(", ")+"]"},add_track:function(aa){aa.track_id=this.track_id+"_"+this.child_tracks.length;aa.container_div.attr("id","track_"+aa.track_id);this.child_tracks_container.append(aa.container_div);C(aa.container_div,".child-track-icon");if(!$(this.child_tracks_container).is(":visible")){this.child_tracks_container.show()}this.child_tracks.push(aa);this.view.has_changes=true},remove_track:function(aa){aa.container_div.fadeOut("slow",function(){$(this).remove()})}});var X=function(aa,ab){this.track_type="LabelTrack";this.hidden=true;j.call(this,null,aa,ab);this.container_div.addClass("label-track")};n(X.prototype,j.prototype,{draw:function(){var ac=this.view,ad=ac.high-ac.low,ag=Math.floor(Math.pow(10,Math.floor(Math.log(ad)/Math.log(10)))),aa=Math.floor(ac.low/ag)*ag,ae=this.view.container.width(),ab=$("<div style='position: relative; height: 1.3em;'></div>");while(aa<ac.high){var af=(aa-ac.low)/ad*ae;ab.append($("<div class='label'>"+commatize(aa)+"</div>").css({position:"absolute",left:af-1}));aa+=ag}this.content_div.children(":first").remove();this.content_div.append(ab)}});var x=function(aa){this.track_type="ReferenceTrack";this.hidden=true;j.call(this,null,aa,aa.top_labeltrack);J.call(this);aa.reference_track=this;this.left_offset=200;this.height_px=12;this.container_div.addClass("reference-track");this.content_div.css("background","none");this.content_div.css("min-height","0px");this.content_div.css("border","none");this.data_url=reference_url;this.data_url_extra_params={dbkey:aa.dbkey};this.data_cache=new E(y,this,false);this.tile_cache=new c(r)};n(x.prototype,J.prototype,{draw_tile:function(ai,af,ab,ak){var ae=this,ac=M*af;if(ak>this.view.canvas_manager.char_width_px){if(ai===null){ae.content_div.css("height","0px");return}var ad=this.view.canvas_manager.new_canvas();var aj=ad.getContext("2d");ad.width=Math.ceil(ac*ak+ae.left_offset);ad.height=ae.height_px;aj.font=aj.canvas.manager.default_font;aj.textAlign="center";for(var ag=0,ah=ai.length;ag<ah;ag++){var aa=Math.round(ag*ak);aj.fillText(ai[ag],aa+ae.left_offset,10)}return new b(ab,af,ad)}this.content_div.css("height","0px")}});var k=function(ae,ac,af,aa,ad){var ab=this;this.track_type="LineTrack";this.display_modes=["Histogram","Line","Filled","Intensity"];this.mode="Histogram";j.call(this,ae,ac,ac.viewport_container);J.call(this);this.min_height_px=16;this.max_height_px=400;this.height_px=80;this.hda_ldda=af;this.dataset_id=aa;this.original_dataset_id=aa;this.data_cache=new N(y,this);this.tile_cache=new c(r);this.track_config=new V({track:this,params:[{key:"color",label:"Color",type:"color",default_value:"black"},{key:"min_value",label:"Min Value",type:"float",default_value:undefined},{key:"max_value",label:"Max Value",type:"float",default_value:undefined},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:this.height_px,hidden:true}],saved_values:ad,onchange:function(){ab.vertical_range=ab.prefs.max_value-ab.prefs.min_value;$("#linetrack_"+ab.track_id+"_minval").text(ab.prefs.min_value);$("#linetrack_"+ab.track_id+"_maxval").text(ab.prefs.max_value);ab.tile_cache.clear();ab.draw()}});this.prefs=this.track_config.values;this.height_px=this.track_config.values.height;this.vertical_range=this.track_config.values.max_value-this.track_config.values.min_value;this.add_resize_handle()};n(k.prototype,J.prototype,{add_resize_handle:function(){var aa=this;var ad=false;var ac=false;var ab=$("<div class='track-resize'>");$(aa.container_div).hover(function(){ad=true;ab.show()},function(){ad=false;if(!ac){ab.hide()}});ab.hide().bind("dragstart",function(ae,af){ac=true;af.original_height=$(aa.content_div).height()}).bind("drag",function(af,ag){var ae=Math.min(Math.max(ag.original_height+ag.deltaY,aa.min_height_px),aa.max_height_px);$(aa.content_div).css("height",ae);aa.height_px=ae;aa.draw(true)}).bind("dragend",function(ae,af){aa.tile_cache.clear();ac=false;if(!ad){ab.hide()}aa.track_config.values.height=aa.height_px}).appendTo(aa.container_div)},predraw_init:function(){var aa=this,ab=aa.view.tracks.indexOf(aa);aa.vertical_range=undefined;return $.getJSON(aa.data_url,{stats:true,chrom:aa.view.chrom,low:null,high:null,hda_ldda:aa.hda_ldda,dataset_id:aa.dataset_id},function(ac){aa.container_div.addClass("line-track");var ae=ac.data;if(isNaN(parseFloat(aa.prefs.min_value))||isNaN(parseFloat(aa.prefs.max_value))){aa.prefs.min_value=ae.min;aa.prefs.max_value=ae.max;$("#track_"+ab+"_minval").val(aa.prefs.min_value);$("#track_"+ab+"_maxval").val(aa.prefs.max_value)}aa.vertical_range=aa.prefs.max_value-aa.prefs.min_value;aa.total_frequency=ae.total_frequency;aa.container_div.find(".yaxislabel").remove();var af=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+ab+"_minval").text(u(aa.prefs.min_value));var ad=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+ab+"_maxval").text(u(aa.prefs.max_value));ad.css({position:"absolute",top:"24px",left:"10px"});ad.prependTo(aa.container_div);af.css({position:"absolute",bottom:"2px",left:"10px"});af.prependTo(aa.container_div)})},draw_tile:function(ak,ae,ab,aj){if(this.vertical_range===undefined){return}var af=ab*M*ae,ad=M*ae,aa=Math.ceil(ad*aj),ah=this.height_px;var ac=this.view.canvas_manager.new_canvas();ac.width=aa,ac.height=ah;var ai=ac.getContext("2d");var ag=new I.LinePainter(ak.data,af,af+ad,this.prefs,this.mode);ag.draw(ai,aa,ah);return new b(ad,ae,ac)}});var e=function(aa,af,ae,ai,ah,ac,ad,ag){var ab=this;this.track_type="FeatureTrack";this.display_modes=["Auto","Histogram","Dense","Squish","Pack"];this.track_config=new V({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:ah,onchange:function(){ab.tile_cache.clear();ab.draw()}});this.prefs=this.track_config.values;j.call(this,aa,af,af.viewport_container);J.call(this,ac,ad,ag);this.height_px=0;this.container_div.addClass("feature-track");this.hda_ldda=ae;this.dataset_id=ai;this.original_dataset_id=ai;this.show_labels_scale=0.001;this.showing_details=false;this.summary_draw_height=30;this.inc_slots={};this.start_end_dct={};this.tile_cache=new c(d);this.data_cache=new N(20,this);this.left_offset=200;this.painter=I.LinkedFeaturePainter};n(e.prototype,J.prototype,{update_auto_mode:function(aa){if(this.mode=="Auto"){if(aa=="no_detail"){aa="feature spans"}else{if(aa=="summary_tree"){aa="coverage histogram"}}this.mode_div.text("Auto ("+aa+")")}},incremental_slots:function(ae,ab,ad){var ac=this.view.canvas_manager.dummy_context,aa=this.inc_slots[ae];if(!aa||(aa.mode!==ad)){aa=new (p.FeatureSlotter)(ae,ad==="Pack",w,function(af){return ac.measureText(af)});aa.mode=ad;this.inc_slots[ae]=aa}return aa.slot_features(ab)},get_summary_tree_data:function(ae,ah,ac,ap){if(ap>ac-ah){ap=ac-ah}var al=Math.floor((ac-ah)/ap),ao=[],ad=0;var af=0,ag=0,ak,an=0,ai=[],am,aj;var ab=function(at,ar,au,aq){at[0]=ar+au*aq;at[1]=ar+(au+1)*aq};while(an<ap&&af!==ae.length){var aa=false;for(;an<ap&&!aa;an++){ab(ai,ah,an,al);for(ag=af;ag<ae.length;ag++){ak=ae[ag].slice(1,3);if(is_overlap(ak,ai)){aa=true;break}}if(aa){break}}data_start_index=ag;ao[ao.length]=am=[ai[0],0];for(;ag<ae.length;ag++){ak=ae[ag].slice(1,3);if(is_overlap(ak,ai)){am[1]++}else{break}}if(am[1]>ad){ad=am[1]}an++}return{max:ad,delta:al,data:ao}},draw_tile:function(an,aw,aA,aj,ad){var at=this,aC=aA*M*aw,ab=(aA+1)*M*aw,ap=ab-aC,au=Math.ceil(ap*aj),ar=this.mode,aG=25,ae=this.left_offset,ao,af;if(ar==="Auto"){if(an.dataset_type==="summary_tree"){ar=an.dataset_type}else{if(an.extra_info==="no_detail"){ar="no_detail"}else{var aF=an.data;if(this.view.high-this.view.low>F){ar="Squish"}else{ar="Pack"}}}this.update_auto_mode(ar)}if(ar==="summary_tree"||ar==="Histogram"){af=this.summary_draw_height;this.container_div.find(".yaxislabel").remove();var aa=$("<div />").addClass("yaxislabel");aa.text(an.max);aa.css({position:"absolute",top:"24px",left:"10px",color:this.prefs.label_color});aa.prependTo(this.container_div);var ac=this.view.canvas_manager.new_canvas();ac.width=au+ae;ac.height=af+O;if(an.dataset_type!="summary_tree"){var ak=this.get_summary_tree_data(an.data,aC,ab,200);if(an.max){ak.max=an.max}an=ak}var aD=new I.SummaryTreePainter(an,aC,ab,this.prefs);var av=ac.getContext("2d");av.translate(ae,O);aD.draw(av,au,af);return new l(aA,aw,ac,an.max)}var ao,ah=1;if(ar==="no_detail"||ar==="Squish"||ar==="Pack"){ah=this.incremental_slots(aj,an.data,ar);ao=this.inc_slots[aj].slots}var ai=[];if(an.data){var al=this.filters_manager.filters;for(var ax=0,az=an.data.length;ax<az;ax++){var ag=an.data[ax];var ay=false;var am;for(var aB=0,aE=al.length;aB<aE;aB++){am=al[aB];am.update_attrs(ag);if(!am.keep(ag)){ay=true;break}}if(!ay){ai.push(ag)}}}var aD=new (this.painter)(ai,aC,ab,this.prefs,ar,ad);var af=aD.get_required_height(ah)+A;var ac=this.view.canvas_manager.new_canvas();ac.width=au+ae;ac.height=af;var av=ac.getContext("2d");av.fillStyle=this.prefs.block_color;av.font=av.canvas.manager.default_font;av.textAlign="right";this.container_div.find(".yaxislabel").remove();if(an.message){av.fillStyle="red";av.textAlign="left";var aq=av.textBaseline;av.textBaseline="top";av.fillRect(ae,0,ac.width-ae,1);av.fillText(an.message,ae,2);av.textBaseline=aq;if(!an.data){return new b(aA,aw,ac,af)}}this.example_feature=(an.data.length?an.data[0]:undefined);av.translate(ae,A);aD.draw(av,au,af,ao);return new L(aA,aw,ac)}});var P=function(ad,ab,af,aa,ac,ae){e.call(this,ad,ab,af,aa,ac,ae);this.track_type="VcfTrack";this.painter=I.VariantPainter};n(P.prototype,J.prototype,e.prototype);var S=function(ad,ab,af,aa,ac,ae){e.call(this,ad,ab,af,aa,ac,ae);this.track_config=new V({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_insertions",label:"Show insertions",type:"bool",default_value:false},{key:"show_differences",label:"Show differences only",type:"bool",default_value:true},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:ac,onchange:function(){this.track.tile_cache.clear();this.track.draw()}});this.prefs=this.track_config.values;this.track_type="ReadTrack";this.painter=I.ReadPainter;this.make_name_popup_menu()};n(S.prototype,J.prototype,e.prototype);var Q=function(ae,ac,ag,aa,ad,af,ab){e.call(this,ae,ac,ag,aa,ad,af,{},ab);this.track_type="ToolDataFeatureTrack";this.data_url=raw_data_url;this.data_query_wait=1000;this.dataset_check_url=dataset_state_url};n(Q.prototype,J.prototype,e.prototype,{predraw_init:function(){var ab=this;var aa=function(){if(ab.data_cache.size()===0){setTimeout(aa,300)}else{ab.data_url=default_data_url;ab.data_query_wait=H;ab.dataset_state_url=converted_datasets_state_url;$.getJSON(ab.dataset_state_url,{dataset_id:ab.dataset_id,hda_ldda:ab.hda_ldda},function(ac){})}};aa()}});T.View=Y;T.LineTrack=k;T.FeatureTrack=e;T.ReadTrack=S};var slotting_module=function(c,b){var e=c("class").extend;var d=2,a=5;b.FeatureSlotter=function(j,h,f,g){this.slots={};this.start_end_dct={};this.w_scale=j;this.include_label=h;this.max_rows=f;this.measureText=g};e(b.FeatureSlotter.prototype,{slot_features:function(m){var p=this.w_scale,s=this.slots,h=this.start_end_dct,y=[],A=[],n=0,z=this.max_rows;for(var w=0,x=m.length;w<x;w++){var l=m[w],o=l[0];if(s[o]!==undefined){n=Math.max(n,s[o]);A.push(s[o])}else{y.push(w)}}var q=function(G,H){for(var F=0;F<=z;F++){var D=false,I=h[F];if(I!==undefined){for(var C=0,E=I.length;C<E;C++){var B=I[C];if(H>B[0]&&G<B[1]){D=true;break}}}if(!D){return F}}return -1};for(var w=0,x=y.length;w<x;w++){var l=m[y[w]],o=l[0],u=l[1],f=l[2],r=l[3],g=Math.floor(u*p),k=Math.ceil(f*p),v=this.measureText(r).width,j;if(r!==undefined&&this.include_label){v+=(d+a);if(g-v>=0){g-=v;j="left"}else{k+=v;j="right"}}var t=q(g,k);if(t>=0){if(h[t]===undefined){h[t]=[]}h[t].push([g,k]);s[o]=t;n=Math.max(n,t)}else{}}return n+1}})};var painters_module=function(j,w){var t=j("class").extend;var o=function(H,z,F,y,E,C){if(C===undefined){C=4}var B=y-z;var A=E-F;var D=Math.floor(Math.sqrt(B*B+A*A)/C);var I=B/D;var G=A/D;var x;for(x=0;x<D;x++,z+=I,F+=G){if(x%2!==0){continue}H.fillRect(z,F,C,1)}};var p=function(A,z,x,D){var C=z-D/2,B=z+D/2,E=x-Math.sqrt(D*3/2);A.beginPath();A.moveTo(C,E);A.lineTo(B,E);A.lineTo(z,x);A.lineTo(C,E);A.strokeStyle=this.fillStyle;A.fill();A.stroke();A.closePath()};var m=function(z,B,x,y,A){this.data=z;this.view_start=B;this.view_end=x;this.prefs=t({},this.default_prefs,y);this.mode=A};m.prototype.default_prefs={};var u=function(z,B,x,y,A){m.call(this,z,B,x,y,A)};u.prototype.default_prefs={show_counts:false};u.prototype.draw=function(M,z,L){var E=this.view_start,O=this.view_end-this.view_start,N=z/O;var J=this.data.data,I=this.data.delta,G=this.data.max,B=L;delta_x_px=Math.ceil(I*N);M.save();for(var C=0,D=J.length;C<D;C++){var H=Math.floor((J[C][0]-E)*N);var F=J[C][1];if(!F){continue}var K=F/G*L;if(F!==0&&K<1){K=1}M.fillStyle=this.prefs.block_color;M.fillRect(H,B-K,delta_x_px,K);var A=4;if(this.prefs.show_counts&&(M.measureText(F).width+A)<delta_x_px){M.fillStyle=this.prefs.label_color;M.textAlign="center";M.fillText(F,H+(delta_x_px/2),10)}}M.restore()};var c=function(x,B,D,E,z){m.call(this,x,B,D,E,z);if(this.prefs.min_value===undefined){var F=Infinity;for(var y=0,A=this.data.length;y<A;y++){F=Math.min(F,this.data[y][1])}this.prefs.min_value=F}if(this.prefs.max_value===undefined){var C=-Infinity;for(var y=0,A=this.data.length;y<A;y++){C=Math.max(C,this.data[y][1])}this.prefs.max_value=C}};c.prototype.default_prefs={min_value:undefined,max_value:undefined,mode:"Histogram",color:"#000",overflow_color:"#F66"};c.prototype.draw=function(M,L,J){var E=false,G=this.prefs.min_value,C=this.prefs.max_value,I=C-G,x=J,z=this.view_start,K=this.view_end-this.view_start,A=L/K,H=this.mode,S=this.data;M.save();var T=Math.round(J+G/I*J);if(H!=="Intensity"){M.fillStyle="#aaa";M.fillRect(0,T,L,1)}M.beginPath();var Q,D,B;if(S.length>1){B=Math.ceil((S[1][0]-S[0][0])*A)}else{B=10}for(var N=0,O=S.length;N<O;N++){M.fillStyle=this.prefs.color;Q=Math.round((S[N][0]-z)*A);D=S[N][1];var P=false,F=false;if(D===null){if(E&&H==="Filled"){M.lineTo(Q,x)}E=false;continue}if(D<G){F=true;D=G}else{if(D>C){P=true;D=C}}if(H==="Histogram"){D=Math.round(D/I*x);M.fillRect(Q,T,B,-D)}else{if(H==="Intensity"){D=255-Math.floor((D-G)/I*255);M.fillStyle="rgb("+D+","+D+","+D+")";M.fillRect(Q,0,B,x)}else{D=Math.round(x-(D-G)/I*x);if(E){M.lineTo(Q,D)}else{E=true;if(H==="Filled"){M.moveTo(Q,x);M.lineTo(Q,D)}else{M.moveTo(Q,D)}}}}M.fillStyle=this.prefs.overflow_color;if(P||F){var R;if(H==="Histogram"||H==="Intensity"){R=B}else{Q-=2;R=4}if(P){M.fillRect(Q,0,R,3)}if(F){M.fillRect(Q,x-3,R,3)}}M.fillStyle=this.prefs.color}if(H==="Filled"){if(E){M.lineTo(Q,T);M.lineTo(0,T)}M.fill()}else{M.stroke()}M.restore()};var n=function(z,B,x,y,A){m.call(this,z,B,x,y,A)};n.prototype.default_prefs={block_color:"#FFF",connector_color:"#FFF"};t(n.prototype,{get_required_height:function(y){var x=y_scale=this.get_row_height(),z=this.mode;if(z==="no_detail"||z==="Squish"||z==="Pack"){x=y*y_scale}return x+Math.max(Math.round(y_scale/2),5)},draw:function(J,A,I,F){var D=this.data,G=this.view_start,K=this.view_end;J.save();J.fillStyle=this.prefs.block_color;J.textAlign="right";var N=this.view_end-this.view_start,M=A/N,z=this.get_row_height();for(var C=0,E=D.length;C<E;C++){var L=D[C],B=L[0],x=L[1],y=L[2],H=(F&&F[B]!==undefined?F[B]:null);if((x<K&&y>G)&&(this.mode=="Dense"||H!==null)){this.draw_element(J,this.mode,L,H,G,K,M,z,A)}}J.restore()}});var d=10,h=3,l=5,v=10,f=1,r=3,e=3,a=9,k=2,g="#ccc";var q=function(z,B,x,y,A){n.call(this,z,B,x,y,A)};t(q.prototype,n.prototype,{get_row_height:function(){var y=this.mode,x;if(y==="Dense"){x=d}else{if(y==="no_detail"){x=h}else{if(y==="Squish"){x=l}else{x=v}}}return x},draw_element:function(J,C,R,E,L,ab,af,ag,x){var O=R[0],ad=R[1],V=R[2],M=R[3],W=Math.floor(Math.max(0,(ad-L)*af)),K=Math.ceil(Math.min(x,Math.max(0,(V-L)*af))),U=(C==="Dense"?0:(0+E))*ag,I,Z,N=null,ah=null,A=this.prefs.block_color,Y=this.prefs.label_color;if(C=="Dense"){E=1}if(C==="no_detail"){J.fillStyle=A;J.fillRect(W,U+5,K-W,f)}else{var H=R[4],T=R[5],X=R[6],B=R[7];if(T&&X){N=Math.floor(Math.max(0,(T-L)*af));ah=Math.ceil(Math.min(x,Math.max(0,(X-L)*af)))}var ae,P;if(C==="Squish"||C==="Dense"){ae=1;P=e}else{ae=5;P=a}if(!B){if(R.strand){if(R.strand==="+"){J.fillStyle=J.canvas.manager.get_pattern("right_strand_inv")}else{if(R.strand==="-"){J.fillStyle=J.canvas.manager.get_pattern("left_strand_inv")}}}else{J.fillStyle=A}J.fillRect(W,U,K-W,P)}else{var G,Q;if(C==="Squish"||C==="Dense"){J.fillStyle=g;G=U+Math.floor(e/2)+1;Q=1}else{if(H){var G=U;var Q=P;if(H==="+"){J.fillStyle=J.canvas.manager.get_pattern("right_strand")}else{if(H==="-"){J.fillStyle=J.canvas.manager.get_pattern("left_strand")}}}else{J.fillStyle=g;G+=(e/2)+1;Q=1}}J.fillRect(W,G,K-W,Q);for(var ac=0,z=B.length;ac<z;ac++){var D=B[ac],y=Math.floor(Math.max(0,(D[0]-L)*af)),S=Math.ceil(Math.min(x,Math.max((D[1]-L)*af)));if(y>S){continue}J.fillStyle=A;J.fillRect(y,U+(P-ae)/2+1,S-y,ae);if(N!==undefined&&X>T&&!(y>ah||S<N)){var aa=Math.max(y,N),F=Math.min(S,ah);J.fillRect(aa,U+1,F-aa,P);if(B.length==1&&C=="Pack"){if(H==="+"){J.fillStyle=J.canvas.manager.get_pattern("right_strand_inv")}else{if(H==="-"){J.fillStyle=J.canvas.manager.get_pattern("left_strand_inv")}}if(aa+14<F){aa+=2;F-=2}J.fillRect(aa,U+1,F-aa,P)}}}}if(C==="Pack"&&ad>L){J.fillStyle=Y;if(L===0&&W-J.measureText(M).width<0){J.textAlign="left";J.fillText(M,K+k,U+8)}else{J.textAlign="right";J.fillText(M,W-k,U+8)}J.fillStyle=A}}}});var b=function(z,B,x,y,A){n.call(this,z,B,x,y,A)};t(b.prototype,n.prototype,{draw_element:function(Q,L,F,B,T,z,I,R,O){var F=data[i],H=F[0],P=F[1],A=F[2],K=F[3],D=Math.floor(Math.max(0,(P-T)*I)),G=Math.ceil(Math.min(O,Math.max(0,(A-T)*I))),C=(L==="Dense"?0:(0+B))*R,x,U,y=null,J=null;if(no_label){Q.fillStyle=block_color;Q.fillRect(D+left_offset,C+5,G-D,1)}else{var S=F[4],N=F[5],E=F[6];x=9;U=1;Q.fillRect(D+left_offset,C,G-D,x);if(L!=="Dense"&&K!==undefined&&P>T){Q.fillStyle=label_color;if(T===0&&D-Q.measureText(K).width<0){Q.textAlign="left";Q.fillText(K,G+2+left_offset,C+8)}else{Q.textAlign="right";Q.fillText(K,D-2+left_offset,C+8)}Q.fillStyle=block_color}var M=S+" / "+N;if(P>T&&Q.measureText(M).width<(G-D)){Q.fillStyle="white";Q.textAlign="center";Q.fillText(M,left_offset+D+(G-D)/2,C+8);Q.fillStyle=block_color}}}});var s=function(A,C,x,z,B,y){n.call(this,A,C,x,z,B);this.ref_seq=y};s.prototype.default_prefs=t({},n.prototype.default_prefs,{show_insertions:false});t(s.prototype,n.prototype,{get_row_height:function(){var x,y=this.mode;if(y==="Dense"){x=d}else{if(y==="Squish"){x=l}else{x=v;if(this.prefs.show_insertions){x*=2}}}return x},draw_read:function(T,O,K,Y,z,S,H,E,D){T.textAlign="center";var R=this,y=[Y,z],N=0,U=0,Q=0;ref_seq=this.ref_seq,char_width_px=T.canvas.manager.char_width_px;var ad=[];if((O==="Pack"||this.mode==="Auto")&&E!==undefined&&K>char_width_px){Q=Math.round(K/2)}if(!H){H=[[0,E.length]]}for(var L=0,W=H.length;L<W;L++){var I=H[L],A="MIDNSHP=X"[I[0]],M=I[1];if(A==="H"||A==="S"){N-=M}var F=S+N,ac=Math.floor(Math.max(0,(F-Y)*K)),G=Math.floor(Math.max(0,(F+M-Y)*K));if(ac===G){G+=1}switch(A){case"H":break;case"S":case"M":case"=":if(is_overlap([F,F+M],y)){var P=E.slice(U,U+M);if(Q>0){T.fillStyle=this.prefs.block_color;T.fillRect(ac-Q,D+1,G-ac,9);T.fillStyle=g;for(var aa=0,x=P.length;aa<x;aa++){if(this.prefs.show_differences&&ref_seq){var J=ref_seq[F-Y+aa];if(!J||J.toLowerCase()===P[aa].toLowerCase()){continue}}if(F+aa>=Y&&F+aa<=z){var ab=Math.floor(Math.max(0,(F+aa-Y)*K));T.fillText(P[aa],ab,D+9)}}}else{T.fillStyle=this.prefs.block_color;T.fillRect(ac,D+4,G-ac,e)}}U+=M;N+=M;break;case"N":T.fillStyle=g;T.fillRect(ac-Q,D+5,G-ac,1);N+=M;break;case"D":T.fillStyle="red";T.fillRect(ac-Q,D+4,G-ac,3);N+=M;break;case"P":break;case"I":var X=ac-Q;if(is_overlap([F,F+M],y)){var P=E.slice(U,U+M);if(this.prefs.show_insertions){var C=ac-(G-ac)/2;if((O==="Pack"||this.mode==="Auto")&&E!==undefined&&K>char_width_px){T.fillStyle="yellow";T.fillRect(C-Q,D-9,G-ac,9);ad[ad.length]={type:"triangle",data:[X,D+4,5]};T.fillStyle=g;switch(seq_tile_overlap){case (OVERLAP_START):P=P.slice(Y-F);break;case (OVERLAP_END):P=P.slice(0,F-z);break;case (CONTAINED_BY):break;case (CONTAINS):P=P.slice(Y-F,F-z);break}for(var aa=0,x=P.length;aa<x;aa++){var ab=Math.floor(Math.max(0,(F+aa-Y)*K));T.fillText(P[aa],ab-(G-ac)/2,D)}}else{T.fillStyle="yellow";T.fillRect(C,D+(this.mode!=="Dense"?2:5),G-ac,(O!=="Dense"?e:r))}}else{if((O==="Pack"||this.mode==="Auto")&&E!==undefined&&K>char_width_px){ad[ad.length]={type:"text",data:[P.length,X,D+9]}}else{}}}U+=M;break;case"X":U+=M;break}}T.fillStyle="yellow";var Z,B,ae;for(var V=0;V<ad.length;V++){Z=ad[V];B=Z.type;ae=Z.data;if(B==="text"){T.save();T.font="bold "+T.font;T.fillText(ae[0],ae[1],ae[2]);T.restore()}else{if(B=="triangle"){p(T,ae[0],ae[1],ae[2])}}}},draw_element:function(Q,L,D,A,T,y,H,R,O){var G=D[0],P=D[1],z=D[2],I=D[3],C=Math.floor(Math.max(0,(P-T)*H)),E=Math.ceil(Math.min(O,Math.max(0,(z-T)*H))),B=(L==="Dense"?0:(0+A))*R,U=this.prefs.block_color,F=this.prefs.label_color,N=0;if((L==="Pack"||this.mode==="Auto")&&H>Q.canvas.manager.char_width_px){var N=Math.round(H/2)}Q.fillStyle=U;if(D[5] instanceof Array){var M=Math.floor(Math.max(0,(D[4][0]-T)*H)),K=Math.ceil(Math.min(O,Math.max(0,(D[4][1]-T)*H))),J=Math.floor(Math.max(0,(D[5][0]-T)*H)),x=Math.ceil(Math.min(O,Math.max(0,(D[5][1]-T)*H)));if(D[4][1]>=T&&D[4][0]<=y&&D[4][2]){this.draw_read(Q,L,H,T,y,D[4][0],D[4][2],D[4][3],B)}if(D[5][1]>=T&&D[5][0]<=y&&D[5][2]){this.draw_read(Q,L,H,T,y,D[5][0],D[5][2],D[5][3],B)}if(J>K){Q.fillStyle=g;o(Q,K-N,B+5,J-N,B+5)}}else{Q.fillStyle=U;this.draw_read(Q,L,H,T,y,P,D[4],D[5],B)}if(L==="Pack"&&P>T){Q.fillStyle=this.prefs.label_color;var S=1;if(S===0&&C-Q.measureText(I).width<0){Q.textAlign="left";Q.fillText(I,E+k-N,B+8)}else{Q.textAlign="right";Q.fillText(I,C-k-N,B+8)}Q.fillStyle=U}}});w.SummaryTreePainter=u;w.LinePainter=c;w.LinkedFeaturePainter=q;w.ReadPainter=s;w.VariantPainter=b};(function(d){var c={};var b=function(e){return c[e]};var a=function(f,g){var e={};g(b,e);c[f]=e};a("class",class_module);a("slotting",slotting_module);a("painters",painters_module);a("trackster",trackster_module);for(key in c.trackster){d[key]=c.trackster[key]}})(window);
\ No newline at end of file
--- a/static/scripts/trackster.js Thu May 19 10:07:53 2011 -0400
+++ b/static/scripts/trackster.js Thu May 19 13:47:52 2011 -0400
@@ -977,7 +977,8 @@
// Create and add track.
// TODO: add support for other kinds of tool data tracks.
if (current_track.track_type === 'FeatureTrack') {
- new_track = new ToolDataFeatureTrack(track_name, view, current_track.hda_ldda, undefined, {}, {}, current_track);
+ new_track = new ToolDataFeatureTrack(track_name, view, current_track.hda_ldda, undefined, {}, {}, current_track);
+ new_track.change_mode(current_track.mode);
}
this.track.add_track(new_track);
new_track.content_div.text("Starting job.");
@@ -1704,19 +1705,11 @@
track.mode = init_mode;
track.mode_div.text(init_mode);
- var change_mode = function(name) {
- track.mode_div.text(name);
- // TODO: is it necessary to store the mode in two places (.mode and track_config)?
- track.mode = name;
- track.track_config.values['mode'] = name;
- track.tile_cache.clear();
- track.draw();
- };
var mode_mapping = {};
for (var i = 0, len = track.display_modes.length; i < len; i++) {
var mode = track.display_modes[i];
mode_mapping[mode] = function(mode) {
- return function() { change_mode(mode); };
+ return function() { track.change_mode(mode); };
}(mode);
}
make_popupmenu(track.mode_div, mode_mapping);
@@ -1747,6 +1740,18 @@
};
extend(TiledTrack.prototype, Track.prototype, {
/**
+ * Change track's mode.
+ */
+ change_mode: function(name) {
+ var track = this;
+ track.mode_div.text(name);
+ // TODO: is it necessary to store the mode in two places (.mode and track_config)?
+ track.mode = name;
+ track.track_config.values['mode'] = name;
+ track.tile_cache.clear();
+ track.draw();
+ },
+ /**
* Make popup menu for track name.
*/
make_name_popup_menu: function() {
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

19 May '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/8c11dd28a3cf/
changeset: r5585:8c11dd28a3cf
user: natefoo
date: 2011-05-19 16:07:53
summary: Add Picard and fastqc tools to Main
affected #: 1 file (836 bytes)
--- a/tool_conf.xml.main Wed May 18 16:52:38 2011 -0400
+++ b/tool_conf.xml.main Thu May 19 10:07:53 2011 -0400
@@ -351,6 +351,8 @@
<tool file="fastx_toolkit/fastx_renamer.xml" /><tool file="fastx_toolkit/fastx_reverse_complement.xml" /><tool file="fastx_toolkit/fastx_trimmer.xml" />
+ <label text="FASTQ QC" id="fastq_qc" />
+ <tool file="rgenetics/rgFastQC.xml" /></section><section name="NGS: Mapping" id="ngs_mapping"><label text="Illumina" id="illumina"/>
@@ -394,6 +396,21 @@
<label text="Filtering" id="filtering" /><tool file="ngs_rna/filter_transcripts_via_tracking.xml" /></section>
+ <section name="NGS: Picard (beta)" id="picard_beta">
+ <label text="QC/Metrics for sam/bam" id="qcsambam"/>
+ <tool file="picard/picard_BamIndexStats.xml" />
+ <tool file="picard/rgPicardASMetrics.xml" />
+ <tool file="picard/rgPicardGCBiasMetrics.xml" />
+ <tool file="picard/rgPicardLibComplexity.xml" />
+ <tool file="picard/rgPicardInsertSize.xml" />
+ <tool file="picard/rgPicardHsMetrics.xml" />
+ <label text="bam/sam Cleaning" id="picard-clean" />
+ <tool file="picard/picard_AddOrReplaceReadGroups.xml" />
+ <tool file="picard/picard_ReorderSam.xml" />
+ <tool file="picard/picard_ReplaceSamHeader.xml" />
+ <tool file="picard/rgPicardFixMate.xml" />
+ <tool file="picard/rgPicardMarkDups.xml" />
+ </section><label text="RGENETICS" id="rgenetics" /><section name="SNP/WGA: Data; Filters" id="rgdat"><label text="Data: Import and upload" id="rgimport" />
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new changesets in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/13d9db4d4503/
changeset: r5583:13d9db4d4503
user: jgoecks
date: 2011-05-18 22:52:14
summary: Remove obsolete test values for Cufflinks and Cuffdiff tests.
affected #: 2 files (121 bytes)
--- a/tools/ngs_rna/cuffdiff_wrapper.xml Wed May 18 16:48:02 2011 -0400
+++ b/tools/ngs_rna/cuffdiff_wrapper.xml Wed May 18 16:52:14 2011 -0400
@@ -158,7 +158,6 @@
<param name="aligned_reads2" value="cuffdiff_in2.sam" ftype="sam" /><!-- Defaults. --><param name="fdr" value="0.05" />
- <param name="min_mapqual" value="0" ftype="sam" /><param name="min_alignment_count" value="0" ftype="sam" /><param name="do_bias_correction" value="No" /><param name="do_normalization" value="No" />
--- a/tools/ngs_rna/cufflinks_wrapper.xml Wed May 18 16:48:02 2011 -0400
+++ b/tools/ngs_rna/cufflinks_wrapper.xml Wed May 18 16:52:14 2011 -0400
@@ -109,7 +109,6 @@
<param name="max_intron_len" value="300000"/><param name="min_isoform_fraction" value="0.05"/><param name="pre_mrna_fraction" value="0.05"/>
- <param name="min_map_quality" value="0"/><param name="use_ref" value="No"/><param name="do_normalization" value="No" /><param name="do_bias_correction" value="No"/>
http://bitbucket.org/galaxy/galaxy-central/changeset/5e72e101e839/
changeset: r5584:5e72e101e839
user: jgoecks
date: 2011-05-18 22:52:38
summary: Merge.
affected #: 11 files (1.8 KB)
--- a/tools/picard/picard_AddOrReplaceReadGroups.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/picard_AddOrReplaceReadGroups.xml Wed May 18 16:52:38 2011 -0400
@@ -102,23 +102,22 @@
**Picard documentation**
-This is a Galaxy interface for the external package Picard-tools_ tool AddOrReplaceReadGroups_. Picard-tools is supported through the SAMTools_ project.
+This is a Galaxy wrapper for AddOrReplaceReadGroups, a part of the external package Picard-tools_.
- .. _AddOrReplaceReadGroups: http://picard.sourceforge.net/command-line-overview.shtml#AddOrReplaceReadG…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-Either a sam file or a bam file must be supplied. If a bam file is used, it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
+**Inputs, outputs, and parameters**
-**Outputs**
+Either a sam file or a bam file must be supplied. If a bam file is used, it must
+be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
-The output file is either bam (the default) or sam, according to user selection, and contains the same information as the input file except for the appropraite additional (or modified) read group tags. Bam is recommended since it is smaller.
-
-**AddOrReplaceReadGroups parameters**
+The output file is either bam (the default) or sam, according to user selection,
+and contains the same information as the input file except for the appropraite
+additional (or modified) read group tags. Bam is recommended since it is smaller.
From the Picard documentation.
@@ -139,7 +138,17 @@
RGCN=String Read Group sequencing center name; Default value: null (empty)
RGDS=String Read Group description Default value: null (empty)
-One parameter that Picard's AddOrReplaceReadGroups offers that is automatically set by Galaxy is the SORT_ORDER, which is set to coordinate.
+One parameter that Picard's AddOrReplaceReadGroups offers that is automatically
+set by Galaxy is the SORT_ORDER, which is set to coordinate.
+
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
</help>
--- a/tools/picard/picard_BamIndexStats.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/picard_BamIndexStats.xml Wed May 18 16:52:38 2011 -0400
@@ -39,27 +39,35 @@
**Purpose**
-Generate Bam Index Stats for a provided bam file
+Generate Bam Index Stats for a provided bam file.
**Picard documentation**
-This is a Galaxy wrapper for BamIndexStats_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for BamIndexStats, a part of the external package Picard-tools_.
- .. _BamIndexStats: http://picard.sourceforge.net/command-line-overview.shtml#BamIndexStats
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-The only input is the bam file you wish to obtain statistics for, which is required. Note that it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
+**Inputs and outputs**
-**Outputs**
+The only input is the bam file you wish to obtain statistics for, which is required.
+Note that it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
This tool outputs an HTML file that contains links to the actual metrics results, as well
as a log file with info on the exact command run.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
------
**Example**
--- a/tools/picard/picard_ReorderSam.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/picard_ReorderSam.xml Wed May 18 16:52:38 2011 -0400
@@ -106,29 +106,49 @@
**Purpose**
-Reorder Sam to match contig ordering in a particular reference file. Note that this is not the same as sorting as done by the SortSam tool, which sorts by either coordinate values or query name. The ordering in ReorderSam is based on exact name matching of contigs. Reads that are mapped to a contig that is not in the new reference file are not included in the output.
+Reorder Sam to match contig ordering in a particular reference file. Note that this is
+not the same as sorting as done by the SortSam tool, which sorts by either coordinate
+values or query name. The ordering in ReorderSam is based on exact name matching of
+contigs. Reads that are mapped to a contig that is not in the new reference file are
+not included in the output.
**Picard documentation**
-This is a Galaxy interface for Picard-tools_ tool ReorderSam_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for ReorderSam, a part of the external package Picard-tools_.
- .. _ReorderSam: http://picard.sourceforge.net/command-line-overview.shtml#ReorderSam
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-For the file that needs to be reordered, either a sam file or a bam file must be supplied. If a bam file is used, it must be coordinate-sorted. A reference file is also required, so either a fasta file should be supplied or a built-in reference can be selected.
+**Inputs, outputs, and parameters**
-**Outputs**
+For the file that needs to be reordered, either a sam file or a bam file must be supplied.
+If a bam file is used, it must be coordinate-sorted. A reference file is also required,
+so either a fasta file should be supplied or a built-in reference can be selected.
-The output contains the same reads as the input file but the reads have been rearranged so they appear in the same order as the provided reference file. The tool will output either bam (the default) or sam, according to user selection. Bam is recommended since it is smaller.
+The output contains the same reads as the input file but the reads have been rearranged so
+they appear in the same order as the provided reference file. The tool will output either
+bam (the default) or sam, according to user selection. Bam is recommended since it is smaller.
-**ReorderSam parameters**
+The only extra parameters that can be set are flags for allowing incomplete dict concordance
+and allowing contig length discordance. If incomplete dict concordance is allowed, only a
+partial overlap of the bam contigs with the new reference sequence contigs is required. By
+default it is off, requiring a corresponding contig in the new reference for each read contig.
+If contig length discordance is allowed, contig names that are the same between a read and the
+new reference contig are allowed even if they have different lengths. This is usually not a
+good idea, unless you know exactly what you're doing. It's off by default.
-The only extra parameters that can be set are flags for allowing incomplete dict concordance and allowing contig length discordance. If incomplete dict concordance is allowed, only a partial overlap of the bam contigs with the new reference sequence contigs is required. By default it is off, requiring a corresponding contig in the new reference for each read contig. If contig length discordance is allowed, contig names that are the same between a read and the new reference contig are allowed even if they have different lengths. This is usually not a good idea, unless you know exactly what you're doing. It's off by default.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
</help></tool>
--- a/tools/picard/picard_ReplaceSamHeader.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/picard_ReplaceSamHeader.xml Wed May 18 16:52:38 2011 -0400
@@ -61,28 +61,42 @@
**Purpose**
-Replace Sam Header with the header from another sam file. The tool does not do any significant validation, so it's up to the user to make sure that the elements in the header are relevant and that the new header has all the required things.
+Replace Sam Header with the header from another sam file. The tool does not do any
+significant validation, so it's up to the user to make sure that the elements in
+the header are relevant and that the new header has all the required things.
-Replace the SAMFileHeader in a SAM file with the given header. Validation is minimal. It is up to the user to ensure that all the elements referred to in the SAMRecords are present in the new header. Sort order of the two input files must be the same.
+Replace the SAMFileHeader in a SAM file with the given header. Validation is
+minimal. It is up to the user to ensure that all the elements referred to in the
+SAMRecords are present in the new header. Sort order of the two input files must
+be the same.
**Picard documentation**
-This is a Galaxy interface to the external package Picard-tools_ tool ReplaceSamHeader_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for ReplaceSamHeader, a part of the external package Picard-tools_.
- .. _ReplaceSamHeader: http://picard.sourceforge.net/command-line-overview.shtml#ReplaceSamHeader
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-Either a sam file or a bam file is required as the file whose header will be replaced. The header file is also required and can also be either sam or bam (it does not have to be the same type as the other file). In both cases, if a bam file is used, it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
+**Inputs and outputs**
-**Outputs**
+Either a sam file or a bam file is required as the file whose header will be replaced.
+The header file is also required and can also be either sam or bam (it does not have
+to be the same type as the other file). In both cases, if a bam file is used, it must
+be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
The tool will output either bam (the default) or sam. Bam is recommended since it is smaller.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
</help>
--- a/tools/picard/rgPicardASMetrics.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/rgPicardASMetrics.xml Wed May 18 16:52:38 2011 -0400
@@ -76,6 +76,19 @@
</tests><help>
+.. class:: infomark
+
+**Summary**
+
+This Galaxy tool uses Picard to report high-level measures of alignment based on a provided sam or bam file.
+
+**Picard documentation**
+
+This is a Galaxy wrapper for CollectAlignmentSummaryMetrics, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
+-----
.. class:: infomark
@@ -88,23 +101,6 @@
- **Bisulphite data** see Picard documentation http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
- **Maximum acceptable insertion length** See Picard documentation at http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
-
------
-
-.. class:: infomark
-
-**Summary**
-
-This Galaxy tool uses Picard to report measures of alignment.
-
-**Picard documentation**
-
-This is a Galaxy wrapper for CollectAlignmentSummaryMetrics_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _CollectAlignmentSummaryMetrics: http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-----
.. class:: infomark
@@ -113,10 +109,6 @@
The Picard documentation (reformatted for Galaxy) says:
-**Collect Alignment Summary Metrics**
-
-Reads a SAM or BAM file and writes a file containing summary alignment metrics.
-
.. csv-table:: ASMDoc
:header-rows: 1
@@ -130,13 +122,7 @@
"IS_BISULFITE_SEQUENCED=Boolean","Whether the SAM or BAM file consists of bisulfite sequenced reads. Default value: false. "
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created."
-
-AlignmentSummaryMetrics
-
-High level metrics about the alignment of reads within a SAM file, produced by the CollectAlignmentSummaryMetrics program and usually stored in a file
-with the extension ".alignment_summary_metrics".
-
-Output Column Definitions
+The output produced by the tool has the following columns:
#. CATEGORY: One of either UNPAIRED (for a fragment run), FIRST_OF_PAIR when metrics are for only the first read in a paired run, SECOND_OF_PAIR when the metrics are for only the second read in a paired run or PAIR when the metrics are aggregeted for both first and second reads in a pair.
#. TOTAL_READS: The total number of reads including all PF and non-PF reads. When CATEGORY equals PAIR this value will be 2x the number of clusters.
@@ -158,6 +144,15 @@
#. PCT_CHIMERAS: The percentage of reads that map outside of a maximum insert size (usually 100kb) or that have the two ends mapping to different chromosomes.
#. PCT_ADAPTER: The percentage of PF reads that are unaligned and match to a known adapter sequence right from the start of the read.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
-----
.. class:: infomark
@@ -168,9 +163,6 @@
Note that last parameter - your life will be far easier if you use it.
-Unfortunately some packages seem perfectly capable of producing sam and bam files that Picard will be picky about otherwise.
-There is a clean sam tool - but only filters what it ignores. The lenient flag allows reads to be discarded if they're empty or don't map.
-This seems an awful strategy but unfortunately may be needed to run an analysis using badly behaved external packages.
</help></tool>
--- a/tools/picard/rgPicardFixMate.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/rgPicardFixMate.xml Wed May 18 16:52:38 2011 -0400
@@ -50,6 +50,12 @@
Ensure that all mate-pair information is in sync between each read and it's mate pair.
+**Picard documentation**
+
+This is a Galaxy wrapper for FixMateInformation, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
.. class:: warningmark
**Useful for paired data only**
@@ -59,20 +65,6 @@
the data you choose are valid (paired end) sam or bam data - unless you trust this
tool not to harm your data.
-**Picard documentation**
-
-This is a Galaxy wrapper for FixMateInformation_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _FixMateInformation: http://picard.sourceforge.net/command-line-overview.shtml#FixMateInformation
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-
-**Why you might want to use this tool**
-
-This tool provides a Galaxy interface to one of the Picard tools.
-If you need to repair broken paired read sam/bam files, the Picard tool may help.
-
-----
.. class:: infomark
@@ -100,6 +92,16 @@
"SORT_ORDER=SortOrder","Optional sort order if the OUTPUT file should be sorted differently than the INPUT file. Default value: null. Possible values: {unsorted, queryname, coordinate}"
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false"
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
+
</help></tool>
--- a/tools/picard/rgPicardGCBiasMetrics.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/rgPicardGCBiasMetrics.xml Wed May 18 16:52:38 2011 -0400
@@ -74,6 +74,20 @@
.. class:: infomark
+**Summary**
+
+This Galaxy tool uses Picard to report detailed metrics about reads that fall within windows of a certain GC bin on the reference genome.
+
+**Picard documentation**
+
+This is a Galaxy wrapper for CollectGcBiasMetrics, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
+-----
+
+.. class:: infomark
+
**Syntax**
- **Input** is sam/bam format aligned short read data in your current history
@@ -86,23 +100,6 @@
.. class:: infomark
-**Summary**
-
-This Galaxy tool uses Picard to report measures of GC bias.
-
-**Picard documentation**
-
-This is a Galaxy wrapper for CollectGcBiasMetrics_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _CollectGcBiasMetrics: http://picard.sourceforge.net/command-line-overview.shtml#CollectGcBiasMetr…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-
------
-
-.. class:: infomark
-
**Inputs, outputs, and parameters**
The Picard documentation (reformatted for Galaxy) says:
@@ -120,11 +117,7 @@
"MINIMUM_GENOME_FRACTION=Double","For summary metrics, exclude GC windows that include less than this fraction of the genome. Default value: 1.0E-5."
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false."
-GcBiasDetailMetrics
-
- Class that holds detailed metrics about reads that fall within windows of a certain GC bin on the reference genome.
-
-Output Column Definitions
+The output produced by the tool has the following columns:
#. GC: The G+C content of the reference sequence represented by this bin. Values are from 0% to 100%
#. WINDOWS: The number of windows on the reference genome that have this G+C content.
@@ -133,6 +126,15 @@
#. NORMALIZED_COVERAGE: The ration of "coverage" in this GC bin vs. the mean coverage of all GC bins. A number of 1 represents mean coverage, a number less than one represents lower than mean coverage (e.g. 0.5 means half as much coverage as average) while a number greater than one represents higher than mean coverage (e.g. 3.1 means this GC bin has 3.1 times more reads per window than average).
#. ERROR_BAR_WIDTH: The radius of error bars in this bin based on the number of observations made. For example if the normalized coverage is 0.75 and the error bar width is 0.1 then the error bars would be drawn from 0.65 to 0.85.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
-----
.. class:: infomark
@@ -143,13 +145,5 @@
MINIMUM_GENOME_FRACTION=0.00001 INPUT=test.bam OUTPUT=picardASMetrics.txt OUTPUT=test.txt CHART_OUTPUT=test.pdf
WINDOW_SIZE=100 VALIDATION_STRINGENCY=LENIENT
-Note that last parameter - your life will be far easier if you use it.
-Unfortunately some packages seem perfectly capable of producing sam and bam
-files that Picard will be picky about otherwise.
-There is a clean sam tool - but only filters what it ignores. The lenient
-flag allows reads to be discarded if they're empty or don't map.
-This seems an awful strategy but unfortunately may be needed to run an analysis
-using badly behaved external packages.
-
</help></tool>
--- a/tools/picard/rgPicardHsMetrics.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/rgPicardHsMetrics.xml Wed May 18 16:52:38 2011 -0400
@@ -114,22 +114,23 @@
#. HS_PENALTY_20X: The "hybrid selection penalty" incurred to get 80% of target bases to 20X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 20X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 20 * HS_PENALTY_20X.
#. HS_PENALTY_30X: The "hybrid selection penalty" incurred to get 80% of target bases to 10X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 30X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 30 * HS_PENALTY_30X.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
-----
.. class:: infomark
-
-*Typical tool invocation without Galaxy is on a command line - eg:*
+**Typical tool invocation without Galaxy is on a command line - eg:**
java -jar /share/shared/galaxy/tool-data/shared/jars/CalculateHsMetrics.jar BAIT_INTERVALS=test.pic TARGET_INTERVALS=test.pic INPUT=test.bam
OUTPUT=picardHsMetrics.txt VALIDATION_STRINGENCY=LENIENT
-Note that last parameter - your life will be far easier if you use it as some of the external packages that
-Galaxy relies upon are capable of producing sam/bam
-files that Picard will refuse to parse.
-
-The lenient flag means reads are discarded if empty or off the end of the map - or whatever. Suggestions for
-improvement are welcome.
-
</help></tool>
--- a/tools/picard/rgPicardInsertSize.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/rgPicardInsertSize.xml Wed May 18 16:52:38 2011 -0400
@@ -44,20 +44,18 @@
Reads a SAM or BAM file and describes the distribution
of insert size (excluding duplicates) with metrics and a histogram plot.
+**Picard documentation**
+
+This is a Galaxy wrapper for CollectInsertSizeMetrics, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
.. class:: warningmark
**Useful for paired data only**
This tool works for paired data only and can be expected to fail for single end data.
-**Picard documentation**
-
-This is a Galaxy wrapper for CollectInsertSizeMetrics_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _CollectInsertSizeMetrics: http://picard.sourceforge.net/command-line-overview.shtml#CollectInsertSize…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-----
.. class:: infomark
@@ -79,5 +77,14 @@
"STOP_AFTER=Integer","Stop after processing N reads, mainly for debugging. Default value: 0."
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false."
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
</help></tool>
--- a/tools/picard/rgPicardLibComplexity.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/rgPicardLibComplexity.xml Wed May 18 16:52:38 2011 -0400
@@ -72,26 +72,9 @@
**Picard documentation**
-This is a Galaxy wrapper for EstimateLibraryComplexity_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for EstimateLibraryComplexity, a part of the external package Picard-tools_.
- .. _EstimateLibraryComplexity: http://picard.sourceforge.net/command-line-overview.shtml#EstimateLibraryCo…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-
-**Why you might want to use this tool**
-
-This tool provides a Galaxy interface to one of the Picard tools.
-If you need to estimate library complexity from sequences, the Picard tool may help.
-
-
-**Note on the Regular Expression**
-
-(from the Picard docs)
-This tool requires a valid regular expression to parse out the read names in the incoming SAM or BAM file.
-These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size.
-The regular expression should contain three capture groups for the three variables, in order.
-Default value: [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
-----
@@ -114,6 +97,26 @@
"OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer","The maximum offset between two duplicte clusters in order to consider them optical duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels) unless using later versions of the Illumina pipeline that multiply pixel values by 10, in which case 50-100 is more normal. Default value: 100"
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false. This option can be set to 'null' to clear the default value. "
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
+.. class:: infomark
+
+**Note on the Regular Expression**
+
+(from the Picard docs)
+This tool requires a valid regular expression to parse out the read names in the incoming SAM or BAM file.
+These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size.
+The regular expression should contain three capture groups for the three variables, in order.
+Default value: [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
+
+
</help></tool>
--- a/tools/picard/rgPicardMarkDups.xml Wed May 18 16:52:14 2011 -0400
+++ b/tools/picard/rgPicardMarkDups.xml Wed May 18 16:52:38 2011 -0400
@@ -72,11 +72,13 @@
**Picard documentation**
-This is a Galaxy interface to the external package Picard-tools_ tool MarkDuplicates, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for MarkDuplicates, a part of the external package Picard-tools_.
- .. _MarkDuplicates: http://picard.sourceforge.net/command-line-overview.shtml#MarkDuplicates
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
+-----
+
+.. class:: infomark
**Inputs, outputs, and parameters**
@@ -96,6 +98,17 @@
"READ_NAME_REGEX=String","Regular expression that can be used to parse read names in the incoming SAM file. Read names are parsed to extract three variables: tile/region, x coordinate and y coordinate. "
"OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer","The maximum offset between two duplicte clusters in order to consider them optical duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels) unless using later versions of the Illumina pipeline that multiply pixel values by 10, in which case 50-100 is more normal. Default value: 100"
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
+.. class:: infomark
+
**Note on the Regular Expression**
(from the Picard docs)
@@ -109,12 +122,6 @@
remove duplicates option is selected. In some cases you may want to do this, but please only do
this if you really understand what you are doing.
-**Why you might want to use this tool**
-
- This tool provides a Galaxy interface to one of the Picard tools.
- If you need to estimate library complexity from sequences, the Picard tool may help.
-
-
</help></tool>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new changesets in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/0268c14594e0/
changeset: r5581:0268c14594e0
user: kellyv
date: 2011-05-18 22:50:37
summary: Further tweaks to Picard help text
affected #: 11 files (1.8 KB)
--- a/tools/picard/picard_AddOrReplaceReadGroups.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/picard_AddOrReplaceReadGroups.xml Wed May 18 16:50:37 2011 -0400
@@ -102,23 +102,22 @@
**Picard documentation**
-This is a Galaxy interface for the external package Picard-tools_ tool AddOrReplaceReadGroups_. Picard-tools is supported through the SAMTools_ project.
+This is a Galaxy wrapper for AddOrReplaceReadGroups, a part of the external package Picard-tools_.
- .. _AddOrReplaceReadGroups: http://picard.sourceforge.net/command-line-overview.shtml#AddOrReplaceReadG…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-Either a sam file or a bam file must be supplied. If a bam file is used, it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
+**Inputs, outputs, and parameters**
-**Outputs**
+Either a sam file or a bam file must be supplied. If a bam file is used, it must
+be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
-The output file is either bam (the default) or sam, according to user selection, and contains the same information as the input file except for the appropraite additional (or modified) read group tags. Bam is recommended since it is smaller.
-
-**AddOrReplaceReadGroups parameters**
+The output file is either bam (the default) or sam, according to user selection,
+and contains the same information as the input file except for the appropraite
+additional (or modified) read group tags. Bam is recommended since it is smaller.
From the Picard documentation.
@@ -139,7 +138,17 @@
RGCN=String Read Group sequencing center name; Default value: null (empty)
RGDS=String Read Group description Default value: null (empty)
-One parameter that Picard's AddOrReplaceReadGroups offers that is automatically set by Galaxy is the SORT_ORDER, which is set to coordinate.
+One parameter that Picard's AddOrReplaceReadGroups offers that is automatically
+set by Galaxy is the SORT_ORDER, which is set to coordinate.
+
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
</help>
--- a/tools/picard/picard_BamIndexStats.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/picard_BamIndexStats.xml Wed May 18 16:50:37 2011 -0400
@@ -39,27 +39,35 @@
**Purpose**
-Generate Bam Index Stats for a provided bam file
+Generate Bam Index Stats for a provided bam file.
**Picard documentation**
-This is a Galaxy wrapper for BamIndexStats_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for BamIndexStats, a part of the external package Picard-tools_.
- .. _BamIndexStats: http://picard.sourceforge.net/command-line-overview.shtml#BamIndexStats
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-The only input is the bam file you wish to obtain statistics for, which is required. Note that it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
+**Inputs and outputs**
-**Outputs**
+The only input is the bam file you wish to obtain statistics for, which is required.
+Note that it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
This tool outputs an HTML file that contains links to the actual metrics results, as well
as a log file with info on the exact command run.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
------
**Example**
--- a/tools/picard/picard_ReorderSam.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/picard_ReorderSam.xml Wed May 18 16:50:37 2011 -0400
@@ -106,29 +106,49 @@
**Purpose**
-Reorder Sam to match contig ordering in a particular reference file. Note that this is not the same as sorting as done by the SortSam tool, which sorts by either coordinate values or query name. The ordering in ReorderSam is based on exact name matching of contigs. Reads that are mapped to a contig that is not in the new reference file are not included in the output.
+Reorder Sam to match contig ordering in a particular reference file. Note that this is
+not the same as sorting as done by the SortSam tool, which sorts by either coordinate
+values or query name. The ordering in ReorderSam is based on exact name matching of
+contigs. Reads that are mapped to a contig that is not in the new reference file are
+not included in the output.
**Picard documentation**
-This is a Galaxy interface for Picard-tools_ tool ReorderSam_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for ReorderSam, a part of the external package Picard-tools_.
- .. _ReorderSam: http://picard.sourceforge.net/command-line-overview.shtml#ReorderSam
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-For the file that needs to be reordered, either a sam file or a bam file must be supplied. If a bam file is used, it must be coordinate-sorted. A reference file is also required, so either a fasta file should be supplied or a built-in reference can be selected.
+**Inputs, outputs, and parameters**
-**Outputs**
+For the file that needs to be reordered, either a sam file or a bam file must be supplied.
+If a bam file is used, it must be coordinate-sorted. A reference file is also required,
+so either a fasta file should be supplied or a built-in reference can be selected.
-The output contains the same reads as the input file but the reads have been rearranged so they appear in the same order as the provided reference file. The tool will output either bam (the default) or sam, according to user selection. Bam is recommended since it is smaller.
+The output contains the same reads as the input file but the reads have been rearranged so
+they appear in the same order as the provided reference file. The tool will output either
+bam (the default) or sam, according to user selection. Bam is recommended since it is smaller.
-**ReorderSam parameters**
+The only extra parameters that can be set are flags for allowing incomplete dict concordance
+and allowing contig length discordance. If incomplete dict concordance is allowed, only a
+partial overlap of the bam contigs with the new reference sequence contigs is required. By
+default it is off, requiring a corresponding contig in the new reference for each read contig.
+If contig length discordance is allowed, contig names that are the same between a read and the
+new reference contig are allowed even if they have different lengths. This is usually not a
+good idea, unless you know exactly what you're doing. It's off by default.
-The only extra parameters that can be set are flags for allowing incomplete dict concordance and allowing contig length discordance. If incomplete dict concordance is allowed, only a partial overlap of the bam contigs with the new reference sequence contigs is required. By default it is off, requiring a corresponding contig in the new reference for each read contig. If contig length discordance is allowed, contig names that are the same between a read and the new reference contig are allowed even if they have different lengths. This is usually not a good idea, unless you know exactly what you're doing. It's off by default.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
</help></tool>
--- a/tools/picard/picard_ReplaceSamHeader.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/picard_ReplaceSamHeader.xml Wed May 18 16:50:37 2011 -0400
@@ -61,28 +61,42 @@
**Purpose**
-Replace Sam Header with the header from another sam file. The tool does not do any significant validation, so it's up to the user to make sure that the elements in the header are relevant and that the new header has all the required things.
+Replace Sam Header with the header from another sam file. The tool does not do any
+significant validation, so it's up to the user to make sure that the elements in
+the header are relevant and that the new header has all the required things.
-Replace the SAMFileHeader in a SAM file with the given header. Validation is minimal. It is up to the user to ensure that all the elements referred to in the SAMRecords are present in the new header. Sort order of the two input files must be the same.
+Replace the SAMFileHeader in a SAM file with the given header. Validation is
+minimal. It is up to the user to ensure that all the elements referred to in the
+SAMRecords are present in the new header. Sort order of the two input files must
+be the same.
**Picard documentation**
-This is a Galaxy interface to the external package Picard-tools_ tool ReplaceSamHeader_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for ReplaceSamHeader, a part of the external package Picard-tools_.
- .. _ReplaceSamHeader: http://picard.sourceforge.net/command-line-overview.shtml#ReplaceSamHeader
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
------
-**Inputs**
+.. class:: infomark
-Either a sam file or a bam file is required as the file whose header will be replaced. The header file is also required and can also be either sam or bam (it does not have to be the same type as the other file). In both cases, if a bam file is used, it must be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
+**Inputs and outputs**
-**Outputs**
+Either a sam file or a bam file is required as the file whose header will be replaced.
+The header file is also required and can also be either sam or bam (it does not have
+to be the same type as the other file). In both cases, if a bam file is used, it must
+be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
The tool will output either bam (the default) or sam. Bam is recommended since it is smaller.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
</help>
--- a/tools/picard/rgPicardASMetrics.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/rgPicardASMetrics.xml Wed May 18 16:50:37 2011 -0400
@@ -76,6 +76,19 @@
</tests><help>
+.. class:: infomark
+
+**Summary**
+
+This Galaxy tool uses Picard to report high-level measures of alignment based on a provided sam or bam file.
+
+**Picard documentation**
+
+This is a Galaxy wrapper for CollectAlignmentSummaryMetrics, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
+-----
.. class:: infomark
@@ -88,23 +101,6 @@
- **Bisulphite data** see Picard documentation http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
- **Maximum acceptable insertion length** See Picard documentation at http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
-
------
-
-.. class:: infomark
-
-**Summary**
-
-This Galaxy tool uses Picard to report measures of alignment.
-
-**Picard documentation**
-
-This is a Galaxy wrapper for CollectAlignmentSummaryMetrics_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _CollectAlignmentSummaryMetrics: http://picard.sourceforge.net/command-line-overview.shtml#CollectAlignmentS…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-----
.. class:: infomark
@@ -113,10 +109,6 @@
The Picard documentation (reformatted for Galaxy) says:
-**Collect Alignment Summary Metrics**
-
-Reads a SAM or BAM file and writes a file containing summary alignment metrics.
-
.. csv-table:: ASMDoc
:header-rows: 1
@@ -130,13 +122,7 @@
"IS_BISULFITE_SEQUENCED=Boolean","Whether the SAM or BAM file consists of bisulfite sequenced reads. Default value: false. "
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created."
-
-AlignmentSummaryMetrics
-
-High level metrics about the alignment of reads within a SAM file, produced by the CollectAlignmentSummaryMetrics program and usually stored in a file
-with the extension ".alignment_summary_metrics".
-
-Output Column Definitions
+The output produced by the tool has the following columns:
#. CATEGORY: One of either UNPAIRED (for a fragment run), FIRST_OF_PAIR when metrics are for only the first read in a paired run, SECOND_OF_PAIR when the metrics are for only the second read in a paired run or PAIR when the metrics are aggregeted for both first and second reads in a pair.
#. TOTAL_READS: The total number of reads including all PF and non-PF reads. When CATEGORY equals PAIR this value will be 2x the number of clusters.
@@ -158,6 +144,15 @@
#. PCT_CHIMERAS: The percentage of reads that map outside of a maximum insert size (usually 100kb) or that have the two ends mapping to different chromosomes.
#. PCT_ADAPTER: The percentage of PF reads that are unaligned and match to a known adapter sequence right from the start of the read.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
-----
.. class:: infomark
@@ -168,9 +163,6 @@
Note that last parameter - your life will be far easier if you use it.
-Unfortunately some packages seem perfectly capable of producing sam and bam files that Picard will be picky about otherwise.
-There is a clean sam tool - but only filters what it ignores. The lenient flag allows reads to be discarded if they're empty or don't map.
-This seems an awful strategy but unfortunately may be needed to run an analysis using badly behaved external packages.
</help></tool>
--- a/tools/picard/rgPicardFixMate.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/rgPicardFixMate.xml Wed May 18 16:50:37 2011 -0400
@@ -50,6 +50,12 @@
Ensure that all mate-pair information is in sync between each read and it's mate pair.
+**Picard documentation**
+
+This is a Galaxy wrapper for FixMateInformation, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
.. class:: warningmark
**Useful for paired data only**
@@ -59,20 +65,6 @@
the data you choose are valid (paired end) sam or bam data - unless you trust this
tool not to harm your data.
-**Picard documentation**
-
-This is a Galaxy wrapper for FixMateInformation_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _FixMateInformation: http://picard.sourceforge.net/command-line-overview.shtml#FixMateInformation
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-
-**Why you might want to use this tool**
-
-This tool provides a Galaxy interface to one of the Picard tools.
-If you need to repair broken paired read sam/bam files, the Picard tool may help.
-
-----
.. class:: infomark
@@ -100,6 +92,16 @@
"SORT_ORDER=SortOrder","Optional sort order if the OUTPUT file should be sorted differently than the INPUT file. Default value: null. Possible values: {unsorted, queryname, coordinate}"
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false"
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
+
</help></tool>
--- a/tools/picard/rgPicardGCBiasMetrics.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/rgPicardGCBiasMetrics.xml Wed May 18 16:50:37 2011 -0400
@@ -74,6 +74,20 @@
.. class:: infomark
+**Summary**
+
+This Galaxy tool uses Picard to report detailed metrics about reads that fall within windows of a certain GC bin on the reference genome.
+
+**Picard documentation**
+
+This is a Galaxy wrapper for CollectGcBiasMetrics, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
+-----
+
+.. class:: infomark
+
**Syntax**
- **Input** is sam/bam format aligned short read data in your current history
@@ -86,23 +100,6 @@
.. class:: infomark
-**Summary**
-
-This Galaxy tool uses Picard to report measures of GC bias.
-
-**Picard documentation**
-
-This is a Galaxy wrapper for CollectGcBiasMetrics_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _CollectGcBiasMetrics: http://picard.sourceforge.net/command-line-overview.shtml#CollectGcBiasMetr…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-
------
-
-.. class:: infomark
-
**Inputs, outputs, and parameters**
The Picard documentation (reformatted for Galaxy) says:
@@ -120,11 +117,7 @@
"MINIMUM_GENOME_FRACTION=Double","For summary metrics, exclude GC windows that include less than this fraction of the genome. Default value: 1.0E-5."
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false."
-GcBiasDetailMetrics
-
- Class that holds detailed metrics about reads that fall within windows of a certain GC bin on the reference genome.
-
-Output Column Definitions
+The output produced by the tool has the following columns:
#. GC: The G+C content of the reference sequence represented by this bin. Values are from 0% to 100%
#. WINDOWS: The number of windows on the reference genome that have this G+C content.
@@ -133,6 +126,15 @@
#. NORMALIZED_COVERAGE: The ration of "coverage" in this GC bin vs. the mean coverage of all GC bins. A number of 1 represents mean coverage, a number less than one represents lower than mean coverage (e.g. 0.5 means half as much coverage as average) while a number greater than one represents higher than mean coverage (e.g. 3.1 means this GC bin has 3.1 times more reads per window than average).
#. ERROR_BAR_WIDTH: The radius of error bars in this bin based on the number of observations made. For example if the normalized coverage is 0.75 and the error bar width is 0.1 then the error bars would be drawn from 0.65 to 0.85.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
-----
.. class:: infomark
@@ -143,13 +145,5 @@
MINIMUM_GENOME_FRACTION=0.00001 INPUT=test.bam OUTPUT=picardASMetrics.txt OUTPUT=test.txt CHART_OUTPUT=test.pdf
WINDOW_SIZE=100 VALIDATION_STRINGENCY=LENIENT
-Note that last parameter - your life will be far easier if you use it.
-Unfortunately some packages seem perfectly capable of producing sam and bam
-files that Picard will be picky about otherwise.
-There is a clean sam tool - but only filters what it ignores. The lenient
-flag allows reads to be discarded if they're empty or don't map.
-This seems an awful strategy but unfortunately may be needed to run an analysis
-using badly behaved external packages.
-
</help></tool>
--- a/tools/picard/rgPicardHsMetrics.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/rgPicardHsMetrics.xml Wed May 18 16:50:37 2011 -0400
@@ -114,22 +114,23 @@
#. HS_PENALTY_20X: The "hybrid selection penalty" incurred to get 80% of target bases to 20X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 20X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 20 * HS_PENALTY_20X.
#. HS_PENALTY_30X: The "hybrid selection penalty" incurred to get 80% of target bases to 10X. This metric should be interpreted as: if I have a design with 10 megabases of target, and want to get 30X coverage I need to sequence until PF_ALIGNED_BASES = 10^6 * 30 * HS_PENALTY_30X.
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
-----
.. class:: infomark
-
-*Typical tool invocation without Galaxy is on a command line - eg:*
+**Typical tool invocation without Galaxy is on a command line - eg:**
java -jar /share/shared/galaxy/tool-data/shared/jars/CalculateHsMetrics.jar BAIT_INTERVALS=test.pic TARGET_INTERVALS=test.pic INPUT=test.bam
OUTPUT=picardHsMetrics.txt VALIDATION_STRINGENCY=LENIENT
-Note that last parameter - your life will be far easier if you use it as some of the external packages that
-Galaxy relies upon are capable of producing sam/bam
-files that Picard will refuse to parse.
-
-The lenient flag means reads are discarded if empty or off the end of the map - or whatever. Suggestions for
-improvement are welcome.
-
</help></tool>
--- a/tools/picard/rgPicardInsertSize.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/rgPicardInsertSize.xml Wed May 18 16:50:37 2011 -0400
@@ -44,20 +44,18 @@
Reads a SAM or BAM file and describes the distribution
of insert size (excluding duplicates) with metrics and a histogram plot.
+**Picard documentation**
+
+This is a Galaxy wrapper for CollectInsertSizeMetrics, a part of the external package Picard-tools_.
+
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
.. class:: warningmark
**Useful for paired data only**
This tool works for paired data only and can be expected to fail for single end data.
-**Picard documentation**
-
-This is a Galaxy wrapper for CollectInsertSizeMetrics_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
-
- .. _CollectInsertSizeMetrics: http://picard.sourceforge.net/command-line-overview.shtml#CollectInsertSize…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-----
.. class:: infomark
@@ -79,5 +77,14 @@
"STOP_AFTER=Integer","Stop after processing N reads, mainly for debugging. Default value: 0."
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false."
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
</help></tool>
--- a/tools/picard/rgPicardLibComplexity.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/rgPicardLibComplexity.xml Wed May 18 16:50:37 2011 -0400
@@ -72,26 +72,9 @@
**Picard documentation**
-This is a Galaxy wrapper for EstimateLibraryComplexity_, a part of the external package Picard-tools_, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for EstimateLibraryComplexity, a part of the external package Picard-tools_.
- .. _EstimateLibraryComplexity: http://picard.sourceforge.net/command-line-overview.shtml#EstimateLibraryCo…
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
-
-
-**Why you might want to use this tool**
-
-This tool provides a Galaxy interface to one of the Picard tools.
-If you need to estimate library complexity from sequences, the Picard tool may help.
-
-
-**Note on the Regular Expression**
-
-(from the Picard docs)
-This tool requires a valid regular expression to parse out the read names in the incoming SAM or BAM file.
-These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size.
-The regular expression should contain three capture groups for the three variables, in order.
-Default value: [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
-----
@@ -114,6 +97,26 @@
"OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer","The maximum offset between two duplicte clusters in order to consider them optical duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels) unless using later versions of the Illumina pipeline that multiply pixel values by 10, in which case 50-100 is more normal. Default value: 100"
"CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false. This option can be set to 'null' to clear the default value. "
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
+.. class:: infomark
+
+**Note on the Regular Expression**
+
+(from the Picard docs)
+This tool requires a valid regular expression to parse out the read names in the incoming SAM or BAM file.
+These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size.
+The regular expression should contain three capture groups for the three variables, in order.
+Default value: [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
+
+
</help></tool>
--- a/tools/picard/rgPicardMarkDups.xml Tue May 17 21:31:34 2011 -0400
+++ b/tools/picard/rgPicardMarkDups.xml Wed May 18 16:50:37 2011 -0400
@@ -72,11 +72,13 @@
**Picard documentation**
-This is a Galaxy interface to the external package Picard-tools_ tool MarkDuplicates, which is supported by the SAMTools_ project.
+This is a Galaxy wrapper for MarkDuplicates, a part of the external package Picard-tools_.
- .. _MarkDuplicates: http://picard.sourceforge.net/command-line-overview.shtml#MarkDuplicates
- .. _Picard-tools: http://picard.sourceforge.net/index.shtml
- .. _SAMTools: http://samtools.sourceforge.net/
+ .. _Picard-tools: http://www.google.com/search?q=picard+samtools
+
+-----
+
+.. class:: infomark
**Inputs, outputs, and parameters**
@@ -96,6 +98,17 @@
"READ_NAME_REGEX=String","Regular expression that can be used to parse read names in the incoming SAM file. Read names are parsed to extract three variables: tile/region, x coordinate and y coordinate. "
"OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer","The maximum offset between two duplicte clusters in order to consider them optical duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels) unless using later versions of the Illumina pipeline that multiply pixel values by 10, in which case 50-100 is more normal. Default value: 100"
+.. class:: warningmark
+
+**Warning on Sam quality**
+
+Unfortunately some packages seem perfectly capable of producing sam and bam files
+that Picard will be picky about otherwise. Galaxy deals with this by using the lenient
+flag, which allows reads to be discarded if they're empty or don't map. This appears
+to be the only way to deal with sam that cannot be parsed.
+
+.. class:: infomark
+
**Note on the Regular Expression**
(from the Picard docs)
@@ -109,12 +122,6 @@
remove duplicates option is selected. In some cases you may want to do this, but please only do
this if you really understand what you are doing.
-**Why you might want to use this tool**
-
- This tool provides a Galaxy interface to one of the Picard tools.
- If you need to estimate library complexity from sequences, the Picard tool may help.
-
-
</help></tool>
http://bitbucket.org/galaxy/galaxy-central/changeset/e1266905ed7b/
changeset: r5582:e1266905ed7b
user: kellyv
date: 2011-05-18 22:51:51
summary: merge
affected #: 3 files (1.3 KB)
--- a/lib/galaxy/model/mapping.py Wed May 18 16:50:37 2011 -0400
+++ b/lib/galaxy/model/mapping.py Wed May 18 16:51:51 2011 -0400
@@ -1469,7 +1469,12 @@
latest_workflow=relation( Workflow, post_update=True,
primaryjoin=( StoredWorkflow.table.c.latest_workflow_id == Workflow.table.c.id ),
lazy=False ),
- tags=relation( StoredWorkflowTagAssociation, order_by=StoredWorkflowTagAssociation.table.c.id, backref="stored_workflows" ),
+ tags=relation( StoredWorkflowTagAssociation, order_by=StoredWorkflowTagAssociation.table.c.id, backref="stored_workflows" ),
+ owner_tags=relation( StoredWorkflowTagAssociation,
+ primaryjoin=and_( StoredWorkflow.table.c.id == StoredWorkflowTagAssociation.table.c.stored_workflow_id,
+ StoredWorkflow.table.c.user_id == StoredWorkflowTagAssociation.table.c.user_id ),
+ foreign_keys=[StoredWorkflowTagAssociation.table.c.user_id],
+ order_by=StoredWorkflowTagAssociation.table.c.id ),
annotations=relation( StoredWorkflowAnnotationAssociation, order_by=StoredWorkflowAnnotationAssociation.table.c.id, backref="stored_workflows" ),
ratings=relation( StoredWorkflowRatingAssociation, order_by=StoredWorkflowRatingAssociation.table.c.id, backref="stored_workflows" ) )
)
--- a/lib/galaxy/web/controllers/workflow.py Wed May 18 16:50:37 2011 -0400
+++ b/lib/galaxy/web/controllers/workflow.py Wed May 18 16:51:51 2011 -0400
@@ -586,6 +586,7 @@
@web.expose
@web.require_login( "use Galaxy workflows" )
def clone( self, trans, id ):
+ # Get workflow to clone.
stored = self.get_stored_workflow( trans, id, check_ownership=False )
user = trans.get_user()
if stored.user == user:
@@ -595,9 +596,24 @@
.filter_by( user=user, stored_workflow=stored ).count() == 0:
error( "Workflow is not owned by or shared with current user" )
owner = False
+
+ # Clone.
new_stored = model.StoredWorkflow()
new_stored.name = "Clone of '%s'" % stored.name
new_stored.latest_workflow = stored.latest_workflow
+ # Clone annotation.
+ annotation_obj = self.get_item_annotation_obj( trans.sa_session, stored.user, stored )
+ if annotation_obj:
+ self.add_item_annotation( trans.sa_session, trans.get_user(), new_stored, annotation_obj.annotation )
+ # Clone tags.
+ for swta in stored.owner_tags:
+ new_swta = model.StoredWorkflowTagAssociation()
+ new_swta.tag = swta.tag
+ new_swta.user = trans.user
+ new_swta.user_tname = swta.user_tname
+ new_swta.user_value = swta.user_value
+ new_swta.value = swta.value
+ new_stored.tags.append( new_swta )
if not owner:
new_stored.name += " shared by '%s'" % stored.user.email
new_stored.user = user
--- a/templates/tagging_common.mako Wed May 18 16:50:37 2011 -0400
+++ b/templates/tagging_common.mako Wed May 18 16:51:51 2011 -0400
@@ -126,7 +126,7 @@
tagged_item_id = str( trans.security.encode_id ( tagged_item.id ) )
elt_id = int ( floor ( random()*maxint ) )
- # Get list of user's item tags. TODO: this could be moved to a database query for speed purposes.
+ # Get list of user's item tags. TODO: implement owner_tags for all taggable objects and use here.
item_tags = [ tag for tag in tagged_item.tags if ( tag.user == user ) ]
%>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0