galaxy-commits
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- 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
galaxy-dist commit 75a3e2a75cda: Add support for displaying BAM files at Ensembl
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User chapmanb
# Date 1286377408 14400
# Node ID 75a3e2a75cdaf8872ef3cafd745524dab2872962
# Parent a89b59ecb9e06778ee39f0b1b2aed38613c127b6
Add support for displaying BAM files at Ensembl
--- a/tool-data/shared/ensembl/ensembl_sites.txt
+++ b/tool-data/shared/ensembl/ensembl_sites.txt
@@ -2,3 +2,4 @@
#http://www.ensembl.org/info/docs/webcode/linking.html
ensembl_Current Current http://www.ensembl.org/ hg19,felCat3,galGal3,bosTau4,canFam2,loxAfr3,cavPor3,equCab2,anoCar1,oryLat2,mm9,monDom5,ponAbe2,susScr2,ornAna1,oryCun2,rn4,rheMac2,gasAcu1,tetNig2,xenTro2,taeGut1,danRer5,ci2,dm3,ce6,sacCer2 Homo_sapiens,Felis_catus,Gallus_gallus,Bos_taurus,Canis_familiaris,Loxodonta_africana,Cavia_porcellus,Equus_caballus,Anolis_carolinensis,Oryzias_latipes,Mus_musculus,Monodelphis_domestica,Pongo_pygmaeus,Sus_scrofa,Ornithorhynchus_anatinus,Oryctolagus_cuniculus,Rattus_norvegicus,Macaca_mulatta,Gasterosteus_aculeatus,Tetraodon_nigroviridis,Xenopus_tropicalis,Taeniopygia_guttata,Danio_rerio,Ciona_intestinalis,Drosophila_melanogaster,Caenorhabditis_elegans,Saccharomyces_cerevisiae
ensembl_May_2009 May 2009 http://may2009.archive.ensembl.org/ hg18 Homo_sapiens
+ensembl_plants Plants http://plants.ensembl.org/ araTha_tair9 Arabidopsis_thaliana
--- a/datatypes_conf.xml.sample
+++ b/datatypes_conf.xml.sample
@@ -8,6 +8,7 @@
<converter file="bam_to_bai.xml" target_datatype="bai"/><converter file="bam_to_summary_tree_converter.xml" target_datatype="summary_tree" depends_on="bai"/><display file="ucsc/bam.xml" />
+ <display file="ensembl/ensembl_bam.xml" /></datatype><datatype extension="bed" type="galaxy.datatypes.interval:Bed" display_in_upload="true"><converter file="bed_to_gff_converter.xml" target_datatype="gff"/>
--- /dev/null
+++ b/display_applications/ensembl/ensembl_bam.xml
@@ -0,0 +1,25 @@
+<display id="ensembl_bam" version="1.0.0" name="display at Ensembl">
+ <!-- Current Ensembl method of attaching user data via URL; archives older than ~November 2008 will use a different method -->
+ <!-- Load links from file: one line to one link -->
+ <dynamic_links from_file="tool-data/shared/ensembl/ensembl_sites.txt" skip_startswith="#" id="0" name="1">
+
+ <!-- Define parameters by column from file, allow splitting on builds -->
+ <dynamic_param name="site_id" value="0"/>
+ <dynamic_param name="site_name" value="1"/>
+ <dynamic_param name="site_link" value="2"/>
+ <dynamic_param name="site_dbkeys" value="3" split="True" separator="," />
+ <dynamic_param name="site_organisms" value="4" split="True" separator="," />
+
+ <!-- Filter out some of the links based upon matching site_dbkeys to dataset dbkey -->
+ <filter>${dataset.dbkey in $site_dbkeys}</filter>
+
+ <!-- We define url and params as normal, but values defined in dynamic_param are available by specified name -->
+ <url>${site_link}${site_organism}/Location/View?contigviewbottom=bam:${bam_file.qp}=normal</url>
+
+ <param type="data" name="bam_file" url="galaxy_${DATASET_HASH}.bam" strip_https="True" />
+ <param type="data" name="bai_file" url="galaxy_${DATASET_HASH}.bam.bai" metadata="bam_index" strip_https="True" />
+ <param type="template" name="site_organism" strip="True" >
+ $site_organisms[ $site_dbkeys.index( $bam_file.dbkey ) ]
+ </param>
+ </dynamic_links>
+</display>
1
0
galaxy-dist commit 28dd2c50c023: updates to DAVID, LPS, and formatHelp help text
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Richard Burhans <burhans(a)bx.psu.edu>
# Date 1286294376 14400
# Node ID 28dd2c50c02380ed9b3e47b9b598783a0ab03e2c
# Parent 7698203440dec7457f6fd273a36f30ed89e05821
updates to DAVID, LPS, and formatHelp help text
--- a/tools/human_genome_variation/linkToDavid.xml
+++ b/tools/human_genome_variation/linkToDavid.xml
@@ -72,7 +72,7 @@ The list is limited to 400 IDs.
**Dataset formats**
-The input dataset is tabular_ format. The output dataset is html_ format with
+The input dataset is in tabular_ format. The output dataset is html_ with
a link to the DAVID website as described below.
(`Dataset missing?`_)
--- a/static/formatHelp.html
+++ b/static/formatHelp.html
@@ -1,5 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd"><html>
-<head><title>Galaxy Data Formats</title>
+<head>
+<title>Galaxy Data Formats</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css">
+ hr { margin-top: 3ex; margin-bottom: 1ex; border: 1px inset }
+</style></head><body><h2>Galaxy Data Formats</h2>
@@ -18,16 +26,15 @@ data, or even the correct columns needed
by format at least makes the list to select from a bit shorter.
<p>
Some of the formats are defined hierarchically, going from very
-general ones like <a href="#tab">tabular</a> (which includes any text
+general ones like <a href="#tab">Tabular</a> (which includes any text
file with tab-separated columns), to more restrictive sub-formats
-like <a href="#interval">interval</a> (where three of the columns
+like <a href="#interval">Interval</a> (where three of the columns
must be the chromosome, start position, and end position), and on
-to even more specific ones such as <a href="#bed">BED</a> or
-<a href="#gff">GFF</a> that have additional requirements. So for
-example if a tool's required input format is tabular, then all of
-your history items whose format is recorded as tabular will be
-listed, along with those in all sub-formats that also qualify as
-tabular (interval, BED, GFF, etc.).
+to even more specific ones such as <a href="#bed">BED</a> that have
+additional requirements. So for example if a tool's required input
+format is Tabular, then all of your history items whose format is
+recorded as Tabular will be listed, along with those in all
+sub-formats that also qualify as Tabular (Interval, BED, GFF, etc.).
<p>
There are two usual methods for changing a dataset's format in
Galaxy: if the file contents are already in the required format but
@@ -37,7 +44,7 @@ manually by clicking on the pencil icon
history. Or, if the file contents really are in a different format,
Galaxy provides a number of format conversion tools (e.g. in the
Text Manipulation and Convert Formats categories). For instance,
-if the tool you want to run requires tabular but your columns are
+if the tool you want to run requires Tabular but your columns are
delimited by spaces or commas, you can use the "Convert delimiters
to TAB" tool under Text Manipulation to reformat your data. However
if your files are in a completely unsupported format, then you need
@@ -47,7 +54,7 @@ to convert them yourself before uploadin
<h3>Format Descriptions</h3><ul>
-<li><a href="#ab1">Ab1</a>
+<li><a href="#ab1">AB1</a><li><a href="#axt">AXT</a><li><a href="#bam">BAM</a><li><a href="#bed">BED</a>
@@ -55,19 +62,19 @@ to convert them yourself before uploadin
<li><a href="#binseq">Binseq.zip</a><li><a href="#fasta">FASTA</a><li><a href="#fastqsolexa">FastqSolexa</a>
-<li><a href="#fped">fped</a>
+<li><a href="#fped">FPED</a><li><a href="#gff">GFF</a><li><a href="#gff3">GFF3</a><li><a href="#gtf">GTF</a><li><a href="#html">HTML</a><li><a href="#interval">Interval</a><li><a href="#lav">LAV</a>
-<li><a href="#lped">lped</a>
+<li><a href="#lped">LPED</a><li><a href="#maf">MAF</a>
-<li><a href="#pbed">pbed</a>
+<li><a href="#pbed">PBED</a><li><a href="#psl">PSL</a>
-<li><a href="#scf">Scf</a>
-<li><a href="#sff">Sff</a>
+<li><a href="#scf">SCF</a>
+<li><a href="#sff">SFF</a><li><a href="#table">Table</a><li><a href="#tab">Tabular</a><li><a href="#txtseqzip">Txtseq.zip</a>
@@ -75,17 +82,23 @@ to convert them yourself before uploadin
<li><a href="#text">Other text type</a></ul><p>
+
+<div><a name="ab1"></a></div><hr>
+<strong>AB1</strong>
+<p>
+This is one of the ABIF family of binary sequence formats from
+Applied Biosystems Inc.
+<!-- Their PDF
+<a href="http://www.appliedbiosystems.com/support/software_community/ABIF_File_Forma…"
+>format specification</a> is unfortunately password-protected. -->
+Files should have a '<code>.ab1</code>' file extension. You must
+manually select this file format when uploading the file.
+<p>
-<strong>Ab1</strong>
-<a name="ab1"/>
-<p>
-A binary sequence file in 'ab1' format with a '.ab1' file extension.
-You must manually select this file format when uploading the file.
-<hr/>
-
+<div><a name="axt"></a></div>
+<hr><strong>AXT</strong>
-<a name="axt"/><p>
Used for pairwise alignment output from BLASTZ, after post-processing.
Each alignment block contains three lines: a summary line and two
@@ -94,44 +107,53 @@ The summary line contains chromosomal po
about the alignment, and consists of nine required fields.
<a href="http://main.genome-browser.bx.psu.edu/goldenPath/help/axt.html"
>More information</a>
+<!-- (not available on Main)
<dl><dt>Can be converted to:
<dd><ul>
-<li>FASTA<br/>
-Convert Formats→AXT to FASTA
-<li>LAV<br/>
-Convert Formats→AXT to LAV
+<li>FASTA<br>
+Convert Formats → AXT to FASTA
+<li>LAV<br>
+Convert Formats → AXT to LAV
</ul></dl>
-<hr/>
+-->
+<p>
+<div><a name="bam"></a></div>
+<hr><strong>BAM</strong>
-<a name="bam"/><p>
-A binary file compressed in the BGZF format with a '.bam' file
-extension.
-<a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format
-is the human readable text version of these files.
+A binary alignment file compressed in the BGZF format with a
+'<code>.bam</code>' file extension.
+<!-- You must manually select this file format when uploading the file. -->
+<a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a>
+is the human-readable text version of this format.
<dl><dt>Can be converted to:
<dd><ul>
-<li>pileup<br/>
-NGS: SAM Tools→Generate pileup<br/>
-<li>interval<br/>
-First you have to go to pileup as above then
-NGS: SAM Tools→Pileup-to-Interval
+<li>SAM<br>
+NGS: SAM Tools → BAM-to-SAM
+<li>Pileup<br>
+NGS: SAM Tools → Generate pileup
+<li>Interval<br>
+First convert to Pileup as above, then use
+NGS: SAM Tools → Pileup-to-Interval
</ul></dl>
-<hr/>
+<p>
+<div><a name="bed"></a></div>
+<hr><strong>BED</strong>
-<a name="bed"/><p><ul>
-<li> also qualifies as tabular
-<li> also qualifies as interval
+<li> also qualifies as Tabular
+<li> also qualifies as Interval
</ul>
This tab-separated format describes a genomic interval, but has
strict field specifications for use in genome browsers. BED files
can have from 3 to 12 columns, but the order of the columns matters,
and only the end ones can be omitted. Some groups of columns must
-be all present or all absent.
+be all present or all absent. As in Interval format (but unlike
+GFF and its relatives), the interval endpoints use a 0-based,
+half-open numbering system.
<a href="http://main.genome-browser.bx.psu.edu/goldenPath/help/hgTracksHelp.html#BED"
>Field specifications</a><p>
@@ -142,17 +164,18 @@ chr22 2000 6000 cloneB 900 - 2000 6000 0
</pre><dl><dt>Can be converted to:
<dd><ul>
-<li>GFF<br/>
-Convert Formats→BED-to-GFF
+<li>GFF<br>
+Convert Formats → BED-to-GFF
</ul></dl>
-<hr/>
+<p>
+<div><a name="bedgraph"></a></div>
+<hr><strong>BedGraph</strong>
-<a name="bedgraph"/><p><ul>
-<li> also qualifies as tabular
-<li> also qualifies as interval
+<li> also qualifies as Tabular
+<li> also qualifies as Interval
<li> also qualifies as BED
</ul><a href="http://main.genome-browser.bx.psu.edu/goldenPath/help/bedgraph.html"
@@ -160,26 +183,28 @@ Convert Formats→BED-to-GFF
that is displayed as a wiggle score in tracks. Unlike in Wiggle
format, the exact value of this score can be retrieved after being
loaded as a track.
-<hr/>
+<p>
+<div><a name="binseq"></a></div>
+<hr><strong>Binseq.zip</strong>
-<a name="binseq"/><p>
-A zipped archive consisting of binary sequence files in either
-'ab1' or 'scf' format. All files in this archive must have the same
-file extension which is one of '.ab1' or '.scf'. You must manually
-select this file format when uploading the file.
-<hr/>
+A zipped archive consisting of binary sequence files in either AB1
+or SCF format. All files in this archive must have the same file
+extension which is one of '<code>.ab1</code>' or '<code>.scf</code>'.
+You must manually select this file format when uploading the file.
+<p>
+<div><a name="fasta"></a></div>
+<hr><strong>FASTA</strong>
-<a name="fasta"/><p>
A sequence in
<a href="http://www.ncbi.nlm.nih.gov/blast/fasta.shtml">FASTA</a>
format consists of a single-line description, followed by lines of
sequence data. The first character of the description line is a
-greater-than (">") symbol. All lines should be shorter than 80
-characters.
+greater-than ('<code>></code>') symbol. All lines should be
+shorter than 80 characters.
<pre>
>sequence1
atgcgtttgcgtgc
@@ -190,16 +215,17 @@ tggcgcggtga
</pre><dl><dt>Can be converted to:
<dd><ul>
-<li>tabular<br/>
-Convert Formats→FASTA-to-Tabular
+<li>Tabular<br>
+Convert Formats → FASTA-to-Tabular
</ul></dl>
-<hr/>
+<p>
+<div><a name="fastqsolexa"></a></div>
+<hr><strong>FastqSolexa</strong>
-<a name="fastqsolexa"/><p><a href="http://maq.sourceforge.net/fastq.shtml">FastqSolexa</a>
-is the Illumina (Solexa) variant of the Fastq format, which stores
+is the Illumina (Solexa) variant of the FASTQ format, which stores
sequences and quality scores in a single file.
<pre>
@seq1
@@ -224,82 +250,97 @@ 40 15 40 17 6 36 40 40 40 25 40 9 35 33
</pre><dl><dt>Can be converted to:
<dd><ul>
-<li>FASTA<br/>
-Convert Formats→FASTQ to FASTA
+<li>FASTA<br>
+NGS: QC and manipulation → Generic FASTQ manipulation → FASTQ to FASTA
+<li>Tabular<br>
+NGS: QC and manipulation → Generic FASTQ manipulation → FASTQ to Tabular
</ul></dl>
-<hr/>
+<p>
-<strong>fped</strong>
-<a name="fped"/>
+<div><a name="fped"></a></div>
+<hr>
+<strong>FPED</strong><p>
Also known as the FBAT format, for use with the
<a href="http://biosun1.harvard.edu/~fbat/fbat.htm">FBAT</a> program.
It consists of a pedigree file and a phenotype file.
-<hr/>
+<p>
+<div><a name="gff"></a></div>
+<hr><strong>GFF</strong>
-<a name="gff"/><p><ul>
-<li> also qualifies as tabular
-<li> also qualifies as interval
+<li> also qualifies as Tabular
</ul>
GFF is a tab-separated format somewhat similar to BED, but it has
different columns and is more flexible. There are
<a href="http://main.genome-browser.bx.psu.edu/FAQ/FAQformat#format3"
>nine required fields</a>.
+Note that unlike Interval and BED, GFF and its relatives (GFF3, GTF)
+use 1-based inclusive coordinates to specify genomic intervals.
<dl><dt>Can be converted to:
<dd><ul>
-<li>BED<br/>
-Convert Formats→GFF-to-BED
+<li>BED<br>
+Convert Formats → GFF-to-BED
</ul></dl>
-<hr/>
+<p>
+<div><a name="gff3"></a></div>
+<hr><strong>GFF3</strong>
-<a name="gff3"/><p><ul>
-<li> also qualifies as tabular
-<li> also qualifies as interval
+<li> also qualifies as Tabular
</ul>
The <a href="http://www.sequenceontology.org/gff3.shtml">GFF3</a>
-format addresses the most common extensions to GFF, while preserving
-backward compatibility with previous formats.
-<hr/>
+format addresses the most common extensions to GFF, while attempting
+to preserve compatibility with previous formats.
+Note that unlike Interval and BED, GFF and its relatives (GFF3, GTF)
+use 1-based inclusive coordinates to specify genomic intervals.
+<p>
+<div><a name="gtf"></a></div>
+<hr><strong>GTF</strong>
-<a name="gtf"/><p><ul>
-<li> also qualifies as tabular
-<li> also qualifies as interval
+<li> also qualifies as Tabular
</ul><a href="http://main.genome-browser.bx.psu.edu/FAQ/FAQformat#format4"
->GTF</a> is a format for describing genes and other features
-associated with DNA, RNA, and protein sequences.
+>GTF</a> is a format for describing genes and other features associated
+with DNA, RNA, and protein sequences. It is a refinement to GFF that
+tightens the specification.
+Note that unlike Interval and BED, GFF and its relatives (GFF3, GTF)
+use 1-based inclusive coordinates to specify genomic intervals.
+<!-- (not available on Main)
<dl><dt>Can be converted to:
<dd><ul>
-<li>BedGraph<br/>
-Convert Formats→GTF-to-BEDGraph
+<li>BedGraph<br>
+Convert Formats → GTF-to-BEDGraph
</ul></dl>
-<hr/>
+-->
+<p>
+<div><a name="html"></a></div>
+<hr><strong>HTML</strong>
-<a name="html"/><p>
This format is an HTML web page. Click the eye icon next to the
dataset to view it in your browser.
-<hr/>
+<p>
+<div><a name="interval"></a></div>
+<hr><strong>Interval</strong>
-<a name="interval"><p><ul>
-<li> also qualifies as tabular
+<li> also qualifies as Tabular
</ul>
This Galaxy format represents genomic intervals. It is tab-separated,
but has the added requirement that three of the columns must be the
-chromosome name, start position, and end position. An optional
+chromosome name, start position, and end position, where the positions
+use a 0-based, half-open numbering system (see below). An optional
strand column can also be specified, and an initial header row can
be used to label the columns, which do not have to be in any special
order. Arbitrary additional columns can also be present.
@@ -317,7 +358,8 @@ Required fields:
</ul>
Optional:
<ul>
-<li>STRAND - Defines the strand, either '+' or '-'.
+<li>STRAND - Defines the strand, either '<code>+</code>' or
+'<code>-</code>'.
<li>Header row
</ul>
Example:
@@ -328,173 +370,202 @@ Example:
</pre><dl><dt>Can be converted to:
<dd><ul>
-<li>BED<br/>
+<li>BED<br>
The exact changes needed and tools to run will vary with what fields
-are in the interval file and what type of BED you are converting to.
-In general you will likely use Text Manipulation→Compute, Cut,
+are in the Interval file and what type of BED you are converting to.
+In general you will likely use Text Manipulation → Compute, Cut,
or Merge Columns.
</ul></dl>
-<hr/>
+<p>
+<div><a name="lav"></a></div>
+<hr><strong>LAV</strong>
-<a name="lav"/><p><a href="http://www.bx.psu.edu/miller_lab/dist/lav_format.html">LAV</a>
is the raw pairwise alignment format that is output by BLASTZ. The
first line begins with <code>#:lav</code>.
+<!-- (not available on Main)
<dl><dt>Can be converted to:
<dd><ul>
-<li>BED<br/>
-Convert Formats→LAV to BED
+<li>BED<br>
+Convert Formats → LAV to BED
</ul></dl>
-<hr/>
+-->
+<p>
-<strong>lped</strong>
-<a name="lped"/>
+<div><a name="lped"></a></div>
+<hr>
+<strong>LPED</strong><p>
-This is the linkage pedigree format, which consists of separate
-<code>map</code> and <code>ped</code> files. Together these files
-describe SNPs; the map file contains the position and an identifier
-for the SNP, while the pedigree file has the alleles.
-To upload this format into Galaxy, do not use auto-detect for the
-file format; instead select <code>lped</code>. You will then be
-given two sections for uploading files, one for the pedigree file
-and one for the map file. For more information, see
-<a href="http://www.broadinstitute.org/science/programs/medical-and-population-genet…">linkage pedigree</a>,
-<a href="http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#map">map</a>,
-and/or <a href="http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#ped">ped</a>.
+This is the linkage pedigree format, which consists of separate MAP and PED
+files. Together these files describe SNPs; the map file contains the position
+and an identifier for the SNP, while the pedigree file has the alleles. To
+upload this format into Galaxy, do not use Auto-detect for the file format;
+instead select <code>lped</code>. You will then be given two sections for
+uploading files, one for the pedigree file and one for the map file. For more
+information, see
+<a href="http://www.broadinstitute.org/science/programs/medical-and-population-genet…"
+>linkage pedigree</a>,
+<a href="http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#map">MAP</a>,
+and/or <a href="http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#ped">PED</a>.
<dl><dt>Can be converted to:
<dd><ul>
-<li>pbed<br/>Automatic
-<li>fped<br/>Automatic
+<li>PBED<br>Automatic
+<li>FPED<br>Automatic
</ul></dl>
-<hr/>
+<p>
+<div><a name="maf"></a></div>
+<hr><strong>MAF</strong>
-<a name="maf"/><p>
-Multiple alignment format that is output by TBA and Multiz. The
-first line begins with <code>##maf</code>. This word is followed by
-whitespace-separated "variable=value pairs". There should be no
-whitespace surrounding the "=".
<a href="http://main.genome-browser.bx.psu.edu/FAQ/FAQformat#format5"
->More information</a>
+>MAF</a> is the multi-sequence alignment format that is output by TBA
+and Multiz. The first line begins with '<code>##maf</code>'. This
+word is followed by whitespace-separated "variable<code>=</code>value"
+pairs. There should be no whitespace surrounding the '<code>=</code>'.
<dl><dt>Can be converted to:
<dd><ul>
-<li>BED<br/>
-Convert Formats→MAF to BED
-<li>interval<br/>
-Convert Formats→MAF to Interval
-<li>FASTA<br/>
-Convert Formats→MAF to FASTA
+<li>BED<br>
+Convert Formats → MAF to BED
+<li>Interval<br>
+Convert Formats → MAF to Interval
+<li>FASTA<br>
+Convert Formats → MAF to FASTA
</ul></dl>
-<hr/>
+<p>
-<strong>pbed</strong>
-<a name="pbed"/>
+<div><a name="pbed"></a></div>
+<hr>
+<strong>PBED</strong><p>
-This is the binary version of the lped file format.
+This is the binary version of the LPED format.
<dl><dt>Can be converted to:
<dd><ul>
-<li>lped<br/>Automatic
+<li>LPED<br>Automatic
</ul></dl>
-<hr/>
+<p>
+<div><a name="psl"></a></div>
+<hr><strong>PSL</strong>
-<a name="psl"/><p><a href="http://main.genome-browser.bx.psu.edu/FAQ/FAQformat#format2">PSL</a>
format is used for alignments returned by
<a href="http://genome.ucsc.edu/cgi-bin/hgBlat?command=start">BLAT</a>.
It does not include any sequence.
-<hr/>
+<p>
-<strong>Scf</strong>
-<a name="scf"/>
+<div><a name="scf"></a></div>
+<hr>
+<strong>SCF</strong><p>
-A binary sequence file in 'scf' format with a '.scf' file extension.
-You must manually select this file format when uploading the file.
+This is a binary sequence format originally designed for the Staden
+sequence handling software package. Files should have a
+'<code>.scf</code>' file extension. You must manually select this
+file format when uploading the file.
<a href="http://staden.sourceforge.net/manual/formats_unix_2.html"
>More information</a>
-<hr/>
+<p>
-<strong>Sff</strong>
-<a name="sff"/>
+<div><a name="sff"></a></div>
+<hr>
+<strong>SFF</strong><p>
-A binary file in 'Standard Flowgram Format' with a '.sff' file extension.
+This is a binary sequence format used by the Roche 454 GS FLX
+sequencing machine, and is documented on p. 528 of their
+<a href="http://sequence.otago.ac.nz/download/GS_FLX_Software_Manual.pdf"
+>software manual</a>. Files should have a '<code>.sff</code>' file
+extension.
+<!-- You must manually select this file format when uploading the file. --><dl><dt>Can be converted to:
<dd><ul>
-<li>FASTA<br/>
-Convert Formats→SFF converter
-<li>FASTQ<br/>
-Convert Formats→SFF converter
+<li>FASTA<br>
+Convert Formats → SFF converter
+<li>FASTQ<br>
+Convert Formats → SFF converter
</ul></dl>
-<hr/>
+<p>
+<div><a name="table"></a></div>
+<hr><strong>Table</strong>
-<a name="table"/><p>
Text data separated into columns by something other than tabs.
-<hr/>
+<p>
+<div><a name="tab"></a></div>
+<hr><strong>Tabular (tab-delimited)</strong>
-<a name="tab"/><p>
One or more columns of text data separated by tabs.
<dl><dt>Can be converted to:
<dd><ul>
-<li>FASTA<br/>
-Convert Formats→Tabular-to-FASTA<br/>
-The tabular file must have a title and sequence column.
-<li>interval<br/>
-If the tabular file has the chromosome, or is all on one chromosome,
-and has a position you can create an interval file (e.g. for SNPs).
-If it is all on one chromosome, use Text Manipulation→Add column
-to add a chromosome column. If the given position is 1-based, use
-Text Manipulation→Compute with the position column minus 1 to
-get the start, and use the original given column for the end.
-If the given position is 0-based, use it as the start, and compute
-that plus 1 to get the end.
+<li>FASTA<br>
+Convert Formats → Tabular-to-FASTA<br>
+The Tabular file must have a title and sequence column.
+<li>FASTQ<br>
+NGS: QC and manipulation → Generic FASTQ manipulation → Tabular to FASTQ
+<li>Interval<br>
+If the Tabular file has a chromosome column (or is all on one
+chromosome) and has a position column, you can create an Interval
+file (e.g. for SNPs). If it is all on one chromosome, use
+Text Manipulation → Add column to add a CHROM column.
+If the given position is 1-based, use
+Text Manipulation → Compute with the position column minus 1 to
+get the START, and use the original given column for the END.
+If the given position is 0-based, use it as the START, and compute
+that plus 1 to get the END.
</ul></dl>
-<hr/>
+<p>
+<div><a name="txtseqzip"></a></div>
+<hr><strong>Txtseq.zip</strong>
-<a name="txtseqzip"/><p>
A zipped archive consisting of flat text sequence files. All files
-in this archive must have the same file extension of '.txt'. You
-must manually select this file format when uploading the file.
-<hr/>
+in this archive must have the same file extension of
+'<code>.txt</code>'. You must manually select this file format when
+uploading the file.
+<p>
+<div><a name="wig"></a></div>
+<hr><strong>Wiggle custom track</strong>
-<a name="wig"/><p>
-The wiggle format is line-oriented. Wiggle data is preceded by a
-track definition line, which specifies the type of wiggle. There
-are three different types, for different uses.
+Wiggle tracks are typically used to display per-nucleotide scores
+in a genome browser. The Wiggle format for custom tracks is
+line-oriented, and the wiggle data is preceded by a track definition
+line that specifies which of three different types is being used.
<a href="http://main.genome-browser.bx.psu.edu/goldenPath/help/wiggle.html"
>More information</a><dl><dt>Can be converted to:
<dd><ul>
-<li>interval<br/>
-Convert Formats→Wiggle-to-Interval<br/>
-As a second step this could be converted to BED-3 or BED-4 by removing
-columns, using Text Manipulation→Cut columns from a table.
+<li>Interval<br>
+Get Genomic Scores → Wiggle-to-Interval
+<li>As a second step this could be converted to 3- or 4-column BED,
+by removing extra columns using
+Text Manipulation → Cut columns from a table.
</ul></dl>
-<hr/>
+<p>
+<div><a name="text"></a></div>
+<hr><strong>Other text type</strong>
-<a name="text"/><p>
Any text file.
<dl><dt>Can be converted to:
<dd><ul>
-<li>tabular<br/>
-If this has fields separated by spaces, commas, or some other
-delimiter it can be converted to tabular using
-Text Manipulation→Convert delimiters to TAB
+<li>Tabular<br>
+If the text has fields separated by spaces, commas, or some other
+delimiter, it can be converted to Tabular by using
+Text Manipulation → Convert delimiters to TAB.
</ul></dl>
+<p>
+
<!-- blank lines so internal links will jump farther to end -->
-<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
+<br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br></body></html>
--- a/tools/human_genome_variation/lps.xml
+++ b/tools/human_genome_variation/lps.xml
@@ -224,9 +224,9 @@ Let **x** be a row from your input datas
from the results file. To compute the probability that row **x** has
a label value of +1:
- Probability(row **x** has label value = +1) = 1 / [1 + exp{**x** \* **b**\[1..n-1\] + **b**\[n\]}]
+ Probability(row **x** has label value = +1) = 1 / [1 + exp{**x** \* **b**\[1..N-1\] + **b**\[N\]}]
-where **x** \* **b**\[1..n-1\] represents matrix multiplication.
+where **x** \* **b**\[1..N-1\] represents matrix multiplication.
The second output dataset, called the log file, is a text file which
contains additional data about the fitted L1-regularized logistic
1
0
galaxy-dist commit 51aaa9eac818: Updates to LPS tool help text.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Richard Burhans <burhans(a)bx.psu.edu>
# Date 1285871526 14400
# Node ID 51aaa9eac8182b25dbbffd1de902b78c916cb0f5
# Parent ddf70ed04c8b24f9095d4b16f6041907f7c6d428
Updates to LPS tool help text.
--- a/tools/human_genome_variation/lps.xml
+++ b/tools/human_genome_variation/lps.xml
@@ -120,7 +120,7 @@
<param name="c1" type="float" value="1e-3" help="Parameter defining the margin by which the first-order step is required to decrease before being taken."><validator type="in_range" message="0.0 < c1 < 1.0" min="0.0" max="1.0"/></param>
- <param name="maxIter" type="integer" value="10000" label="Maximum number of iterations"/>
+ <param name="maxIter" type="integer" value="10000" label="Maximum number of iterations" help="Terminate with error if we exceed this."/><param name="stopTol" type="float" value="1e-6" label="Stop tolerance" help="Convergence tolerance for target value of lambda."/><param name="intermediateTol" type="float" value="1e-4" label="Intermediate tolerance" help="Convergence tolerance for intermediate values of lambda."/><param name="finalOnly" type="select" format="integer" label="Final only">
@@ -132,8 +132,8 @@
</inputs><outputs>
- <data name="output_file" format="tabular"/>
- <data name="log_file" format="txt"/>
+ <data name="output_file" format="tabular" label="${tool.name} on ${on_string}: results"/>
+ <data name="log_file" format="txt" label="${tool.name} on ${on_string}: log"/></outputs><requirements>
@@ -188,28 +188,52 @@ There is a second output dataset (a log)
**What it does**
-The LASSO-Patternsearch algorithm efficiently identifies patterns of multiple
-dichotomous risk factors for outcomes of interest in demographic and genomic
-studies. It is designed for the case where there is a possibly very large
-number of candidate patterns but it is believed that only a relatively small
-number are important.
+The LASSO-Patternsearch algorithm fits your dataset to an L1-regularized
+logistic regression model. A benefit of using L1-regularization is
+that it typically yields a weight vector with relatively few non-zero
+coefficients.
-If the "risky" direction (with respect to the outcome of interest) is known
-for all or almost all variables, the results are readily interpretable.
-If the risky direction is coded correctly for all of the variables, the
-fitted model can be expected to be sparser than that for any other coding.
-However, if a small number of risky variables are coded in the "wrong" way,
-this usually can be detected.
+For example, say you have a dataset containing M rows (subjects)
+and N columns (attributes) where one of these N attributes is binary,
+indicating whether or not the subject has some property of interest P.
+In simple terms, LPS calculates a weight for each of the other attributes
+in your dataset. This weight indicates how "relevant" that attribute
+is for predicting whether or not a given subject has property P.
+The L1-regularization causes most of these weights to be equal to zero,
+which means LPS will find a "small" subset of the remaining N-1 attributes
+in your dataset that can be used to predict P.
-The input file is tabular with rows representing individuals and columns
-representing variables. There is one special column, the label column,
-containing +1 for cases, and -1 for controls. The other columns should be
-0 or 1, with 1 representing the expected riskier value for each variable.
-For instance with SNPs the column would have a 1 if the individual (row)
-has the risk allele, or a 0 otherwise. The output file has one line for each
-variable, or "feature" in the input file, with a single column containing the
-calculated score for that feature. The log file provides information about
-the input and the internal values obtained during the computation process.
+In other words, LPS can be used for feature selection.
+
+The input dataset is tabular, and must contain a label column which
+indicates whether or not a given row has property P. In the current
+version of this tool, P must be encoded using +1 and -1. The Lambda_fac
+parameter ranges from 0 to 1, and controls how sparse the weight
+vector will be. At the low end, when Lambda_fac = 0, there will be
+no regularization. At the high end, when Lambda_fac = 1, there will be
+"too much" regularization, and all of the weights will equal zero.
+
+The LPS tool creates two output datasets. The first, called the results
+file, is a tabular dataset containing one column of weights for each
+value of the regularization parameter lambda that was tried. The weight
+columns are in order from left to right by decreasing values of lambda.
+The first N-1 rows in each column are the weights for the N-1 attributes
+in your input dataset. The final row is a constant, the intercept.
+
+Let **x** be a row from your input dataset and let **b** be a column
+from the results file. To compute the probability that row **x** has
+a label value of +1:
+
+ Probability(row **x** has label value = +1) = 1 / [1 + exp{**x** \* **b**\[1..n-1\] + **b**\[n\]}]
+
+where **x** \* **b**\[1..n-1\] represents matrix multiplication.
+
+The second output dataset, called the log file, is a text file which
+contains additional data about the fitted L1-regularized logistic
+regression model. These data include the number of features, the
+computed value of lambda_max, the actual values of lambda used, the
+optimal values of the log-likelihood and regularized log-likelihood
+functions, the number of non-zeros, and the number of iterations.
Website: http://pages.cs.wisc.edu/~swright/LPS/
@@ -235,11 +259,16 @@ Website: http://pages.cs.wisc.edu/~swrig
- output log file::
- Data set has 100 vectors with 50 features
- calculateLambdaMax: n=50, m=100, m+=50, m-=50
- computed value of lambda_max: 5.0000e-01
- lambda=2.50e-02 solution has 10 nonzeros.
- It required 546 iterations
+ Data set has 100 vectors with 50 features.
+ calculateLambdaMax: n=50, m=100, m+=50, m-=50
+ computed value of lambda_max: 5.0000e-01
+
+ lambda=2.96e-02 solution:
+ optimal log-likelihood function value: 6.46e-01
+ optimal *regularized* log-likelihood function value: 6.79e-01
+ number of nonzeros at the optimum: 5
+ number of iterations required: 43
+ etc.
-----
--- a/test-data/lps_arrhythmia_log.txt
+++ b/test-data/lps_arrhythmia_log.txt
@@ -1,5 +1,4 @@
-Data set has 452 vectors with 279 features
-
+Data set has 452 vectors with 279 features.
Sampled 452 points out of 452
calculateLambdaMax: n=279, m=452, m+=245, m-=207
computed value of lambda_max: 1.8231e+02
@@ -52,36 +51,147 @@ iter 1, gpnorm=1.7618e-09, nonzero=
**** Initial point: nz=1, f= 0.689609056404, lambda= 5.469e+00
iter 1, gpnorm=1.7618e-09, nonzero= 1 ( 0.4%), function=6.896090564044e-01, alpha=3.2768e-01
Function evals = 2, Gradient evals = 1.0
-lambda=1.64e+02 solution has 1 nonzeros.
-It required 6 iterations
-lambda=1.17e+02 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.64e+02 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 6
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=8.31e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.17e+02 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=5.91e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=8.31e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=4.21e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=5.91e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=3.00e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=4.21e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=2.13e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=3.00e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=1.52e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=2.13e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=1.08e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.52e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=7.68e+00 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.08e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=5.47e+00 solution has 1 nonzeros.
-It required 1 iterations
+lambda=7.68e+00 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
+lambda=5.47e+00 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
+
1
0
galaxy-dist commit 8774252ac053: sample_tracking: migration script to modify the 'file_path' field type in 'sample_dataset' table to 'TEXT' so that it can support large file paths exceeding 255 characters
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1286199759 14400
# Node ID 8774252ac0531343953428a44a5a2b07e6fe514e
# Parent e32d77e1f47b1fc94b3e7511094e4b0d760f1e97
sample_tracking: migration script to modify the 'file_path' field type in 'sample_dataset' table to 'TEXT' so that it can support large file paths exceeding 255 characters
--- /dev/null
+++ b/lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py
@@ -0,0 +1,59 @@
+"""
+Migration script to modify the 'file_path' field type in 'sample_dataset' table
+to 'TEXT' so that it can support large file paths exceeding 255 characters
+"""
+
+from sqlalchemy import *
+from sqlalchemy.orm import *
+from migrate import *
+from migrate.changeset import *
+from sqlalchemy.exc import *
+
+from galaxy.model.custom_types import *
+from galaxy.util.json import from_json_string, to_json_string
+
+import datetime
+now = datetime.datetime.utcnow
+
+import logging
+log = logging.getLogger( __name__ )
+
+metadata = MetaData( migrate_engine )
+db_session = scoped_session( sessionmaker( bind=migrate_engine, autoflush=False, autocommit=True ) )
+
+
+def upgrade():
+ print __doc__
+ metadata.reflect()
+ try:
+ SampleDataset_table = Table( "sample_dataset", metadata, autoload=True )
+ except NoSuchTableError, e:
+ SampleDataset_table = None
+ log.debug( "Failed loading table 'sample_dataset'" )
+
+ if SampleDataset_table:
+ cmd = "SELECT id, file_path FROM sample_dataset"
+ result = db_session.execute( cmd )
+ filepath_dict = {}
+ for r in result:
+ id = int(r[0])
+ filepath_dict[id] = r[1]
+ # remove the 'file_path' column
+ try:
+ SampleDataset_table.c.file_path.drop()
+ except Exception, e:
+ log.debug( "Deleting column 'file_path' from the 'sample_dataset' table failed: %s" % ( str( e ) ) )
+ # create the column again
+ try:
+ col = Column( "file_path", TEXT )
+ col.create( SampleDataset_table )
+ assert col is SampleDataset_table.c.file_path
+ except Exception, e:
+ log.debug( "Creating column 'file_path' in the 'sample_dataset' table failed: %s" % ( str( e ) ) )
+
+ for id, file_path in filepath_dict.items():
+ cmd = "update sample_dataset set file_path='%s' where id=%i" % (file_path, id)
+ db_session.execute( cmd )
+
+def downgrade():
+ pass
--- a/lib/galaxy/model/mapping.py
+++ b/lib/galaxy/model/mapping.py
@@ -620,7 +620,7 @@ SampleDataset.table = Table('sample_data
Column( "update_time", DateTime, default=now, onupdate=now ),
Column( "sample_id", Integer, ForeignKey( "sample.id" ), index=True ),
Column( "name", TrimmedString( 255 ), nullable=False ),
- Column( "file_path", TrimmedString( 255 ), nullable=False ),
+ Column( "file_path", TEXT ),
Column( "status", TrimmedString( 255 ), nullable=False ),
Column( "error_msg", TEXT ),
Column( "size", TrimmedString( 255 ) ) )
1
0
galaxy-dist commit 06d6ce09e0f1: Fix for checking whether the current user can access a specified library item.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1286207081 14400
# Node ID 06d6ce09e0f152d38c632dae7ccba9337f25bab5
# Parent 8774252ac0531343953428a44a5a2b07e6fe514e
Fix for checking whether the current user can access a specified library item.
--- a/lib/galaxy/web/controllers/library_common.py
+++ b/lib/galaxy/web/controllers/library_common.py
@@ -2246,22 +2246,30 @@ class LibraryCommon( BaseController, Use
message=message,
status=status ) )
def _check_access( self, trans, cntrller, is_admin, item, current_user_roles, use_panels, library_id, show_deleted ):
+ can_access = True
if isinstance( item, trans.model.HistoryDatasetAssociation ):
- # Deny that the dataset exists if the user does not have the DATASET_ACCESS permission.
- if not item or \
- not ( trans.app.security_agent.can_access_dataset( current_user_roles, item.dataset ) and item.history.user==trans.user ):
- message = "Invalid history dataset id (%s) specified." % str( item.id )
- return trans.response.send_redirect( web.url_for( controller='library_common',
- action='browse_library',
- cntrller=cntrller,
- id=library_id,
- show_deleted=show_deleted,
- message=util.sanitize_text( message ),
- status='error' ) )
- # Deny that the item exists if the user does not have the LIBRARY_ACCESS permission on its parent library,
- # or if they are not able to access the item itself.
- if not item or ( not is_admin and not trans.app.security_agent.can_access_library_item( current_user_roles, item, trans.user ) ):
- message = "Invalid item id (%s) specified." % str( item.id )
+ # Make sure the user has the DATASET_ACCESS permission on the history_dataset_association.
+ if not item:
+ message = "Invalid history dataset (%s) specified." % str( item )
+ can_access = False
+ elif not trans.app.security_agent.can_access_dataset( current_user_roles, item.dataset ) and item.history.user==trans.user:
+ message = "You do not have permission to access the history dataset with id (%s)." % str( item.id )
+ can_access = False
+ else:
+ # Make sure the user has the LIBRARY_ACCESS permission on the library item.
+ if not item:
+ message = "Invalid library item (%s) specified." % str( item )
+ can_access = False
+ elif not ( is_admin or trans.app.security_agent.can_access_library_item( current_user_roles, item, trans.user ) ):
+ if isinstance( item, trans.model.Library ):
+ item_type = 'data library'
+ elif isinstance( item, trans.model.LibraryFolder ):
+ item_type = 'folder'
+ else:
+ item_type = '(unknown item type)'
+ message = "You do not have permission to access the %s with id (%s)." % ( item_type, str( item.id ) )
+ can_access = False
+ if not can_access:
if cntrller == 'api':
return 400, message
if isinstance( item, trans.model.Library ):
@@ -2282,7 +2290,7 @@ class LibraryCommon( BaseController, Use
def _check_add( self, trans, cntrller, is_admin, item, current_user_roles, use_panels, library_id, show_deleted ):
# Deny access if the user is not an admin and does not have the LIBRARY_ADD permission.
if not ( is_admin or trans.app.security_agent.can_add_library_item( current_user_roles, item ) ):
- message = "You are not authorized to add an item to '%s'." % item.name
+ message = "You are not authorized to add an item to (%s)." % item.name
# Redirect to the real parent library since we know we have access to it.
if cntrller == 'api':
return 403, message
@@ -2300,7 +2308,7 @@ class LibraryCommon( BaseController, Use
if not ( is_admin or \
( trans.app.security_agent.can_manage_library_item( current_user_roles, item ) and
trans.app.security_agent.can_manage_dataset( current_user_roles, library_dataset.library_dataset_dataset_association.dataset ) ) ):
- message = "You are not authorized to manage permissions on library dataset '%s'." % library_dataset.name
+ message = "You are not authorized to manage permissions on library dataset (%s)." % library_dataset.name
if cntrller == 'api':
return 403, message
return trans.response.send_redirect( web.url_for( controller='library_common',
@@ -2312,7 +2320,7 @@ class LibraryCommon( BaseController, Use
status='error' ) )
# Deny access if the user is not an admin and does not have the LIBRARY_MANAGE permission.
if not ( is_admin or trans.app.security_agent.can_manage_library_item( current_user_roles, item ) ):
- message = "You are not authorized to manage permissions on '%s'." % item.name
+ message = "You are not authorized to manage permissions on (%s)." % item.name
if cntrller == 'api':
return 403, message
return trans.response.send_redirect( web.url_for( controller='library_common',
@@ -2325,7 +2333,7 @@ class LibraryCommon( BaseController, Use
def _check_modify( self, trans, cntrller, is_admin, item, current_user_roles, use_panels, library_id, show_deleted ):
# Deny modification if the user is not an admin and does not have the LIBRARY_MODIFY permission.
if not ( is_admin or trans.app.security_agent.can_modify_library_item( current_user_roles, item ) ):
- message = "You are not authorized to modify '%s'." % item.name
+ message = "You are not authorized to modify (%s)." % item.name
if cntrller == 'api':
return 403, message
return trans.response.send_redirect( web.url_for( controller='library_common',
1
0
galaxy-dist commit 7b431b0dbc68: Fixed broken indentation.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Richard Burhans <burhans(a)bx.psu.edu>
# Date 1285872631 14400
# Node ID 7b431b0dbc687c1496ef5fba92dd443476d61d60
# Parent 51aaa9eac8182b25dbbffd1de902b78c916cb0f5
Fixed broken indentation.
--- a/test/base/twilltestcase.py
+++ b/test/base/twilltestcase.py
@@ -646,10 +646,10 @@ class TwillTestCase( unittest.TestCase )
s2 = os.path.getsize(local_name)
if abs(s1-s2) > int(delta):
raise Exception, 'Files %s=%db but %s=%db - compare (delta=%s) failed' % (temp_name,s1,local_name,s2,delta)
- else:
- raise Exception, 'Unimplemented Compare type: %s' % compare
- if extra_files:
- self.verify_extra_files_content( extra_files, elem.get( 'id' ) )
+ else:
+ raise Exception, 'Unimplemented Compare type: %s' % compare
+ if extra_files:
+ self.verify_extra_files_content( extra_files, elem.get( 'id' ) )
except AssertionError, err:
errmsg = 'History item %s different than expected, difference (using %s):\n' % ( hid, compare )
errmsg += str( err )
1
0
galaxy-dist commit e32d77e1f47b: Make links in split menubuttons take the link instead of popping up the menu options. Use new menubutton style in data libraries and sharing_base.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1286147560 14400
# Node ID e32d77e1f47b1fc94b3e7511094e4b0d760f1e97
# Parent ba6f40c5b3d3ee82aa6719f98f58d4285bcbd66d
Make links in split menubuttons take the link instead of popping up the menu options. Use new menubutton style in data libraries and sharing_base.
--- a/templates/sharing_base.mako
+++ b/templates/sharing_base.mako
@@ -241,8 +241,7 @@
<% user = association.user %><tr><td>
- ${user.email}
- <a id="user-${i}-popup" class="popup-arrow" style="display: none;">▼</a>
+ <div class="menubutton popup" id="user-${i}-popup">${user.email}</div></td><td><div popupmenu="user-${i}-popup">
--- a/static/scripts/packed/galaxy.base.js
+++ b/static/scripts/packed/galaxy.base.js
@@ -1,1 +1,1 @@
-function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).click(c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=
g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")==true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this
).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m==""||m=="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!=""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(n!==null&&n!==undefined){if($.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).
trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}funct
ion init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}retu
rn false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show
()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-url"),dataType:"html",error:function(){alert("Could not add this dataset to br
owser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
+function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).bind("click",c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));a.find("a").bind("click",function(b){b.stopPropagation();return true});make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}funct
ion naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")==true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).
val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m==""||m=="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!=""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(n!==null&&n!==undefined){if
($.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}}
)}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");i
f(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrappe
r"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-
url"),dataType:"html",error:function(){alert("Could not add this dataset to browser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
--- a/templates/library/common/browse_library.mako
+++ b/templates/library/common/browse_library.mako
@@ -50,7 +50,7 @@
<%def name="grid_javascripts()"><script type="text/javascript">
- $( document ).ready( function () {
+ $(function () {
$("#library-grid").each( function() {
// Recursively fill in children and descendents of each row
var process_row = function( q, parents ) {
@@ -70,7 +70,7 @@
// remembering folder states, we'll need something
// more sophisticated here.
var visible = false;
- $(q).find( "span.expandLink").click( function() {
+ var expand_fn = function() {
if ( visible ) {
descendents.hide();
descendents.removeClass( "expanded" );
@@ -81,7 +81,9 @@
q.addClass( "expanded" );
visible = true;
}
- });
+ };
+ $(q).find("span.expandLink").click(expand_fn);
+ $(q).find("span.expandLink a").click(expand_fn);
// Check/uncheck boxes in subfolders.
q.children( "td" ).children( "input[type=checkbox]" ).click( function() {
if ( $(this).is(":checked") ) {
@@ -103,6 +105,17 @@
});
});
});
+
+ // For view info links, use a modal popup
+ /*$(".view-info").live("click", function() {
+ $.get( $(this).attr("href"), function(info) {
+ show_modal("View Information", info, {
+ "Close": function() { hide_modal(); }
+ });
+ });
+ return false;
+ });*/
+
function checkForm() {
if ( $("select#action_on_datasets_select option:selected").text() == "delete" ) {
if ( confirm( "Click OK to delete these datasets?" ) ) {
@@ -198,55 +211,56 @@
%endif
id="libraryItem-${ldda.id}"><td style="padding-left: ${pad+20}px;">
+ <input style="float: left;" type="checkbox" name="ldda_ids" value="${trans.security.encode_id( ldda.id )}"
%if selected:
- <input type="checkbox" name="ldda_ids" value="${trans.security.encode_id( ldda.id )}" checked/>
- %else:
- <input type="checkbox" name="ldda_ids" value="${trans.security.encode_id( ldda.id )}"/>
+ checked="checked"
%endif
+ />
%if ldda.library_dataset.deleted:
<span class="libraryItem-error">
- %endif
- <a href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">${ldda.name[:50]}</a>
- %if ldda.library_dataset.deleted:
- </span>
- %endif
- %if not library.deleted:
- <a id="dataset-${ldda.id}-popup" class="popup-arrow" style="display: none;">▼</a>
- <div popupmenu="dataset-${ldda.id}-popup">
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
- <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
- %else:
- <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and not info_association:
- <a class="action-button" href="${h.url_for( controller='library_common', action='add_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Add template</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and info_association:
- <a class="action-button" href="${h.url_for( controller='library_common', action='edit_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit template</a>
- <a class="action-button" href="${h.url_for( controller='library_common', action='delete_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Delete template</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_manage:
- %if not trans.app.security_agent.dataset_is_public( ldda.dataset ):
- <a class="action-button" href="${h.url_for( controller='library_common', action='make_library_item_public', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_type='ldda', id=trans.security.encode_id( ldda.dataset.id ), use_panels=use_panels, show_deleted=show_deleted )}">Make public</a>
- %endif
- <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_permissions', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit permissions</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
- <a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), replace_id=trans.security.encode_id( library_dataset.id ), show_deleted=show_deleted )}">Upload a new version of this dataset</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and ldda.has_data:
- <a class="action-button" href="${h.url_for( controller='library_common', action='act_on_multiple_datasets', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), ldda_ids=trans.security.encode_id( ldda.id ), do_action='import_to_history', use_panels=use_panels, show_deleted=show_deleted )}">Import this dataset into your current history</a>
- <a class="action-button" href="${h.url_for( controller='library_common', action='download_dataset_from_folder', cntrller=cntrller, id=trans.security.encode_id( ldda.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels )}">Download this dataset</a>
- %endif
- %if can_modify:
- %if not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.deleted:
- <a class="action-button" confirm="Click OK to delete dataset '${ldda.name}'." href="${h.url_for( controller='library_common', action='delete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Delete this dataset</a>
- %elif not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.purged and ldda.library_dataset.deleted:
- <a class="action-button" href="${h.url_for( controller='library_common', action='undelete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Undelete this dataset</a>
- %endif
- %endif
- </div>
- %endif
+ %endif
+ <div style="float: left; margin-left: 1px;" class="menubutton split popup" id="dataset-${ldda.id}-popup">
+ <a class="view-info" href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">${ldda.name[:50]}</a>
+ </div>
+ %if ldda.library_dataset.deleted:
+ </span>
+ %endif
+ %if not library.deleted:
+ <div popupmenu="dataset-${ldda.id}-popup">
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
+ %else:
+ <a class="action-button" class="view-info" href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and not info_association:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='add_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Add template</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and info_association:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='edit_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit template</a>
+ <a class="action-button" href="${h.url_for( controller='library_common', action='delete_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Delete template</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_manage:
+ %if not trans.app.security_agent.dataset_is_public( ldda.dataset ):
+ <a class="action-button" href="${h.url_for( controller='library_common', action='make_library_item_public', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_type='ldda', id=trans.security.encode_id( ldda.dataset.id ), use_panels=use_panels, show_deleted=show_deleted )}">Make public</a>
+ %endif
+ <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_permissions', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit permissions</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), replace_id=trans.security.encode_id( library_dataset.id ), show_deleted=show_deleted )}">Upload a new version of this dataset</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and ldda.has_data:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='act_on_multiple_datasets', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), ldda_ids=trans.security.encode_id( ldda.id ), do_action='import_to_history', use_panels=use_panels, show_deleted=show_deleted )}">Import this dataset into your current history</a>
+ <a class="action-button" href="${h.url_for( controller='library_common', action='download_dataset_from_folder', cntrller=cntrller, id=trans.security.encode_id( ldda.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels )}">Download this dataset</a>
+ %endif
+ %if can_modify:
+ %if not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.deleted:
+ <a class="action-button" confirm="Click OK to delete dataset '${ldda.name}'." href="${h.url_for( controller='library_common', action='delete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Delete this dataset</a>
+ %elif not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.purged and ldda.library_dataset.deleted:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='undelete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Undelete this dataset</a>
+ %endif
+ %endif
+ </div>
+ %endif
</td><td id="libraryItemInfo">${render_library_item_info( ldda )}</td><td>${uploaded_by}</td>
@@ -266,12 +280,12 @@
if root_folder:
pad = folder_pad
- expander = "/static/images/silk/resultset_bottom.png"
- folder_img = "/static/images/silk/folder_page.png"
+ expander = h.url_for("/static/images/silk/resultset_bottom.png")
+ folder_img = h.url_for("/static/images/silk/folder_page.png")
else:
pad = folder_pad + 20
- expander = "/static/images/silk/resultset_next.png"
- folder_img = "/static/images/silk/folder.png"
+ expander = h.url_for("/static/images/silk/resultset_next.png")
+ folder_img = h.url_for("/static/images/silk/folder.png")
if created_ldda_ids:
created_ldda_ids = util.listify( created_ldda_ids )
if str( folder.id ) in hidden_folder_ids:
@@ -311,14 +325,16 @@
%if folder.deleted:
<span class="libraryItem-error">
%endif
- <span class="expandLink"><span class="rowIcon"></span><a style="margin-left: 5px;" href="javascript:void(0);">${folder.name}</a></span>
+ <span class="expandLink"><span class="rowIcon"></span>
+ <div style="float: left; margin-left: 2px;" class="menubutton split popup" id="folder_img-${folder.id}-popup">
+ <a href="javascript:void(0);">${folder.name}</a>
+ </div>
%if folder.deleted:
</span>
%endif
%if not branch_deleted( folder ):
%if not library.deleted:
- <a id="folder_img-${folder.id}-popup" class="popup-arrow" style="display: none;">▼</a><div popupmenu="folder_img-${folder.id}-popup">
%if not branch_deleted( folder ) and can_add:
<a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), use_panels=use_panels, show_deleted=show_deleted )}">Add datasets</a>
@@ -328,7 +344,7 @@
%if can_modify:
<a class="action-button" href="${h.url_for( controller='library_common', action='folder_info', cntrller=cntrller, id=trans.security.encode_id( folder.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
%else:
- <a class="action-button" href="${h.url_for( controller='library_common', action='folder_info', cntrller=cntrller, id=trans.security.encode_id( folder.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
+ <a class="action-button" class="view-info" href="${h.url_for( controller='library_common', action='folder_info', cntrller=cntrller, id=trans.security.encode_id( folder.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
%endif
%endif
%if not branch_deleted( folder ) and can_modify and not info_association:
--- a/static/june_2007_style/blue/library.css
+++ b/static/june_2007_style/blue/library.css
@@ -13,7 +13,7 @@ pre.peek{background:white;color:black;wi
pre.peek th{color:white;background:#023858;}
span.expandLink{padding-left:20px;display:inline-block;vertical-align:middle;background:url(../images/silk/resultset_next.png) no-repeat;}
.folderRow.expanded span.expandLink{background:url(../images/silk/resultset_bottom.png) no-repeat;}
-.folderRow span.rowIcon{width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png);}
+.folderRow span.rowIcon{float:left;width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png);}
.libraryItem-error{margin-right:2px;padding:0 2px 0 2px;border:1px solid #AA6666;background:#FFCCCC;}
.libraryItem-queued{margin-right:2px;padding:0 2px 0 2px;border:1px solid #888888;background:#EEEEEE;}
.libraryItem-running{margin-right:2px;padding:0 2px 0 2px;border:1px solid #AAAA66;background:#FFFFCC;}
--- a/static/scripts/galaxy.base.js
+++ b/static/scripts/galaxy.base.js
@@ -43,7 +43,7 @@ function attach_popupmenu( button_elemen
$("#popup-helper").unbind( "click.popupmenu" ).hide();
// $(document).unbind( "click.popupmenu" );
};
- var click = function( e ) {
+ var click_handler = function( e ) {
// var o = $(button_element).offset();
$("#popup-helper").bind( "click.popupmenu", clean ).show();
// $(document).bind( "click.popupmenu", clean );
@@ -62,7 +62,7 @@ function attach_popupmenu( button_elemen
} );
return false;
};
- $( button_element ).click( click );
+ $(button_element).bind("click", click_handler);
}
function make_popupmenu( button_element, options ) {
@@ -112,6 +112,10 @@ function make_popup_menus() {
};
});
var b = $( "#" + $(this).attr( 'popupmenu' ) );
+ b.find("a").bind("click", function(e) {
+ e.stopPropagation(); // Stop bubbling so clicking on the link goes through
+ return true;
+ });
make_popupmenu( b, options );
$(this).remove();
b.addClass( "popup" ).show();
--- a/static/june_2007_style/library.css.tmpl
+++ b/static/june_2007_style/library.css.tmpl
@@ -76,6 +76,7 @@ span.expandLink {
}
.folderRow span.rowIcon {
+ float: left;
width: 16px;
height: 16px;
display: inline-block;
--- a/templates/library/common/library_info.mako
+++ b/templates/library/common/library_info.mako
@@ -34,9 +34,10 @@
<div class="toolForm"><div class="toolFormTitle">
- <a href="${h.url_for( controller='library_common', action='browse_library', cntrller=cntrller, id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}"><b>${library.name[:50]}</b></a>
+ <div class="menubutton split popup" id="library-${library.id}-popup">
+ <a href="${h.url_for( controller='library_common', action='browse_library', cntrller=cntrller, id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">${library.name[:50]}</a>
+ </div>
%if can_add or can_modify or can_manage:
- <a id="library-${library.id}-popup" class="popup-arrow" style="display: none;">▼</a><div popupmenu="library-${library.id}-popup">
%if not library.deleted:
%if can_add and not library.info_association:
--- a/templates/library/common/ldda_info.mako
+++ b/templates/library/common/ldda_info.mako
@@ -46,9 +46,8 @@
<div class="toolForm"><div class="toolFormTitle">
- Information about ${ldda.name}
+ Information about <div class="menubutton popup" id="dataset-${ldda.id}-popup">${ldda.name}</div>
%if not library.deleted and not branch_deleted( ldda.library_dataset.folder ) and not ldda.library_dataset.deleted:
- <a id="dataset-${ldda.id}-popup" class="popup-arrow" style="display: none;">▼</a><div popupmenu="dataset-${ldda.id}-popup">
%if can_modify:
<a class="action-button" href="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
1
0
galaxy-dist commit 8f2e21b07986: Enable export history jobs to work when application option 'outputs_to_working_directory' is set to true. This will enable export history jobs to work on galaxy main and, more generally, when galaxy datasets are mounted read-only.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1286208862 14400
# Node ID 8f2e21b079864cb02b2c4e5bfc3343cbf867e259
# Parent 06d6ce09e0f152d38c632dae7ccba9337f25bab5
Enable export history jobs to work when application option 'outputs_to_working_directory' is set to true. This will enable export history jobs to work on galaxy main and, more generally, when galaxy datasets are mounted read-only.
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -321,6 +321,20 @@ class JobWrapper( object ):
inp_data = dict( [ ( da.name, da.dataset ) for da in job.input_datasets ] )
out_data = dict( [ ( da.name, da.dataset ) for da in job.output_datasets ] )
out_data.update( [ ( da.name, da.dataset ) for da in job.output_library_datasets ] )
+
+ # Set up output dataset association for export history jobs. Because job
+ # uses a Dataset rather than an HDA or LDA, it's necessary to set up a
+ # fake dataset association that provides the needed attributes for
+ # preparing a job.
+ class FakeDatasetAssociation ( object ):
+ def __init__( self, dataset=None ):
+ self.dataset = dataset
+ self.file_name = dataset.file_name
+ self.metadata = dict()
+ self.children = []
+ jeha = self.sa_session.query( model.JobExportHistoryArchive ).filter_by( job=job ).first()
+ if jeha:
+ out_data[ "output_file" ] = FakeDatasetAssociation( dataset=jeha.dataset )
# These can be passed on the command line if wanted as $userId $userEmail
if job.history and job.history.user: # check for anonymous user!
userId = '%d' % job.history.user.id
@@ -632,13 +646,21 @@ class JobWrapper( object ):
return self.false_path
job = self.sa_session.query( model.Job ).get( self.job_id )
+ # Job output datasets are combination of output datasets, library datasets, and jeha datasets.
+ jeha = self.sa_session.query( model.JobExportHistoryArchive ).filter_by( job=job ).first()
if self.app.config.outputs_to_working_directory:
self.output_paths = []
for name, data in [ ( da.name, da.dataset.dataset ) for da in job.output_datasets + job.output_library_datasets ]:
false_path = os.path.abspath( os.path.join( self.working_directory, "galaxy_dataset_%d.dat" % data.id ) )
self.output_paths.append( DatasetPath( data.id, data.file_name, false_path ) )
+ if jeha:
+ false_path = os.path.abspath( os.path.join( self.working_directory, "galaxy_dataset_%d.dat" % jeha.dataset.id ) )
+ self.output_paths.append( DatasetPath( jeha.dataset.id, jeha.dataset.file_name, false_path ) )
else:
self.output_paths = [ DatasetPath( da.dataset.dataset.id, da.dataset.file_name ) for da in job.output_datasets + job.output_library_datasets ]
+ if jeha:
+ self.output_paths.append( DatasetPath( jeha.dataset.id, jeha.dataset.file_name ) )
+
return self.output_paths
def get_output_file_id( self, file ):
--- a/lib/galaxy/tools/imp_exp/__init__.py
+++ b/lib/galaxy/tools/imp_exp/__init__.py
@@ -15,12 +15,15 @@ def load_history_imp_exp_tools( toolbox
<tool id="__EXPORT_HISTORY__" name="Export History" version="0.1" tool_type="export_history"><type class="ExportHistoryTool" module="galaxy.tools"/><action module="galaxy.tools.actions.history_imp_exp" class="ExportHistoryToolAction"/>
- <command>$__SET_EXPORT_HISTORY_COMMAND_LINE__</command>
+ <command>$__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__ $output_file</command><inputs><param name="__HISTORY_TO_EXPORT__" type="hidden"/><param name="compress" type="boolean"/>
- <param name="__SET_EXPORT_HISTORY_COMMAND_LINE__" type="hidden"/>
+ <param name="__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__" type="hidden"/></inputs>
+ <outputs>
+ <data format="gzip" name="output_file"/>
+ </outputs></tool>
"""
tmp_name = tempfile.NamedTemporaryFile()
@@ -40,7 +43,9 @@ class JobExportHistoryArchiveWrapper( ob
# jeha = job_export_history_archive for the job.
""" Perform setup for job to export a history into an archive. Method generates
attribute files for export, sets the corresponding attributes in the jeha
- object, and returns a command line for running the job. """
+ object, and returns a command line for running the job. The command line
+ includes the command, inputs, and options; it does not include the output
+ file because it must be set at runtime. """
#
# Helper methods/classes.
@@ -199,10 +204,9 @@ class JobExportHistoryArchiveWrapper( ob
options = ""
if jeha.compressed:
options = "-G"
- return "python %s %s %s %s %s %s" % (
+ return "python %s %s %s %s %s" % (
os.path.join( os.path.abspath( os.getcwd() ), "lib/galaxy/tools/imp_exp/export_history.py" ), \
- options, history_attrs_filename, datasets_attrs_filename, jobs_attrs_filename, \
- jeha.dataset.file_name )
+ options, history_attrs_filename, datasets_attrs_filename, jobs_attrs_filename )
def cleanup_after_job( self, db_session ):
""" Remove temporary directory and attribute files generated during setup for this job. """
--- a/lib/galaxy/tools/actions/history_imp_exp.py
+++ b/lib/galaxy/tools/actions/history_imp_exp.py
@@ -61,7 +61,7 @@ class ExportHistoryToolAction( ToolActio
# Set additional parameters.
incoming[ '__HISTORY_TO_EXPORT__' ] = history.id
- incoming[ '__SET_EXPORT_HISTORY_COMMAND_LINE__' ] = cmd_line
+ incoming[ '__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__' ] = cmd_line
for name, value in tool.params_to_strings( incoming, trans.app ).iteritems():
job.add_parameter( name, value )
1
0
galaxy-dist commit 4990d7b95b72: Bug fix for signature of lib.galaxy_utils.sequence.transform.?NA_reverse_complement method.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1285944317 14400
# Node ID 4990d7b95b7273ba7159bfb2db1931a4e74a980a
# Parent 7b431b0dbc687c1496ef5fba92dd443476d61d60
Bug fix for signature of lib.galaxy_utils.sequence.transform.?NA_reverse_complement method.
--- a/lib/galaxy_utils/sequence/transform.py
+++ b/lib/galaxy_utils/sequence/transform.py
@@ -19,10 +19,10 @@ def DNA_complement( sequence ):
def RNA_complement( sequence ):
return sequence.translate( RNA_COMPLEMENT )
#returns the reverse complement of the sequence
-def DNA_reverse_complement( self, sequence ):
+def DNA_reverse_complement( sequence ):
sequence = reverse( sequence )
return DNA_complement( sequence )
-def RNA_reverse_complement( self, sequence ):
+def RNA_reverse_complement( sequence ):
sequence = reverse( sequence )
return RNA_complement( sequence )
def to_DNA( sequence ):
1
0
galaxy-dist commit ba6f40c5b3d3: Refactored refresh_on_change javascript code to run in galaxy.base when the page is loaded. Fixed bug with autocomplete_select: when switching from a value within refresh_on_change_values to a value outside of it, the page did not refresh. Removed duplicate code from templates.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1285964434 14400
# Node ID ba6f40c5b3d3ee82aa6719f98f58d4285bcbd66d
# Parent 4990d7b95b7273ba7159bfb2db1931a4e74a980a
Refactored refresh_on_change javascript code to run in galaxy.base when the page is loaded. Fixed bug with autocomplete_select: when switching from a value within refresh_on_change_values to a value outside of it, the page did not refresh. Removed duplicate code from templates.
--- a/templates/requests/common/new_request.mako
+++ b/templates/requests/common/new_request.mako
@@ -5,31 +5,6 @@
${render_msg( message, status )}
%endif
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#new_request" ).submit();
- }
- });
-});
-</script>
-
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
--- a/templates/user/register.mako
+++ b/templates/user/register.mako
@@ -9,30 +9,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#registration" ).submit();
- }
- });
- });
- </script></%def><%
--- a/templates/library/common/folder_info.mako
+++ b/templates/library/common/folder_info.mako
@@ -4,30 +4,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def><%
--- a/static/scripts/packed/galaxy.base.js
+++ b/static/scripts/packed/galaxy.base.js
@@ -1,1 +1,1 @@
-function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).click(c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=
g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var e=$(this);var h=e.find("option").length;if((h<a)||(h>b)){return}if(e.attr("multiple")==true){return}if(e.hasClass("no-autocomplete")){return}var l=e.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",e.attr("name"));c.attr("id",e.attr("id"));c.click(function(){var m=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(m);$(this
).select()});var f=[];var i={};e.children("option").each(function(){var n=$(this).text();var m=$(this).attr("value");f.push(n);i[n]=m;i[m]=m;if(m==l){c.attr("value",n)}});if(l==""||l=="?"){c.attr("value","Click to Search or Select")}if(e.attr("name")=="dbkey"){f=f.sort(naturalSort)}var g={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(f,g);e.replaceWith(c);var k=function(){var n=c.attr("value");var m=i[n];if(m!==null&&m!==undefined){c.attr("value",m)}else{if(l!=""){c.attr("value",l)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(e.attr("refresh_on_change")=="true"){var d=e.attr("refresh_on_change_values");if(d!==undefined){d=d.split(",")}var j=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){refresh=false;if(d!==undefined){for(var m=0;m<d.length;m++){if(n==d[m]){refresh=true;break}}}else{refres
h=true}if(refresh){c.attr("value",n);c.parents("form").submit()}}};c.bind("result",j);c.keyup(function(m){if(m.keyCode===13){j()}});c.keydown(function(m){if(m.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();retur
n})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state"
,k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(t
his).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}function GalaxyAsync(a){this.url_dict={};this.log_action=(a===undefined?false:a)}GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-url"),dataType:"html",error:function(){alert("Could not add this dataset t
o browser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
+function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).click(c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=
g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")==true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this
).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m==""||m=="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!=""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(n!==null&&n!==undefined){if($.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).
trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}funct
ion init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}retu
rn false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show
()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-url"),dataType:"html",error:function(){alert("Could not add this dataset to br
owser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
--- a/templates/library/common/library_info.mako
+++ b/templates/library/common/library_info.mako
@@ -4,30 +4,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def><%
--- a/templates/tool_form.mako
+++ b/templates/tool_form.mako
@@ -13,43 +13,24 @@ from galaxy.util.expressions import Expr
${h.css( "base", "autocomplete_tagging" )}
${h.js( "jquery", "galaxy.base", "jquery.autocomplete" )}
<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
+$(function() {
+ $(window).bind("refresh_on_change", function() {
+ $(':file').each( function() {
+ var file = $(this);
+ var file_value = file.val();
+ if (file_value) {
+ // disable file input, since we don't want to upload the file on refresh
+ var file_name = $(this).attr("name");
+ file.attr( { name: 'replaced_file_input_' + file_name, disabled: true } );
+ // create a new hidden field which stores the filename and has the original name of the file input
+ var new_file_input = $('<input type="hidden" />');
+ new_file_input.attr( { "value": file_value, "name": file_name } );
+ file.after(new_file_input);
}
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( ':file' ).each( function() {
- var file_value = $( this )[0].value;
- if ( file_value ) {
- //disable file input, since we don't want to upload the file on refresh
- var file_name = $( this )[0].name;
- $( this )[0].name = 'replaced_file_input_' + file_name
- $( this )[0].disable = true;
- //create a new hidden field which stores the filename and has the original name of the file input
- var new_file_input = document.createElement( 'input' );
- new_file_input.type = 'hidden';
- new_file_input.value = file_value;
- new_file_input.name = file_name;
- document.getElementById( 'tool_form' ).appendChild( new_file_input );
- }
- } );
- $( "#tool_form" ).submit();
- }
- });
+ });
+ });
});
+
%if not add_frame.debug:
if( window.name != "galaxy_main" ) {
location.replace( '${h.url_for( controller='root', action='index', tool_id=tool.id )}' );
--- a/templates/requests/common/find.mako
+++ b/templates/requests/common/find.mako
@@ -5,31 +5,6 @@
${render_msg( message, status )}
%endif
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#find_request" ).submit();
- }
- });
-});
-</script>
-
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
--- a/static/scripts/galaxy.base.js
+++ b/static/scripts/galaxy.base.js
@@ -119,7 +119,7 @@ function make_popup_menus() {
}
// Alphanumeric/natural sort fn
-function naturalSort(a, b){
+function naturalSort(a, b) {
// setup temp-scope variables for comparison evauluation
var re = /(-?[0-9\.]+)/g,
x = a.toString().toLowerCase() || '',
@@ -249,45 +249,24 @@ function replace_big_select_inputs(min_l
$(document).bind("convert_dbkeys", function() { submit_hook(); } );
// If select is refresh on change, mirror this behavior.
- if (select_elt.attr('refresh_on_change') == 'true')
- {
+ if (select_elt.attr('refresh_on_change') == 'true') {
// Get refresh vals.
- var refresh_vals = select_elt.attr('refresh_on_change_values');
- if (refresh_vals !== undefined)
- refresh_vals = refresh_vals.split(",");
-
+ var ref_on_change_vals = select_elt.attr('refresh_on_change_values'),
+ last_selected_value = select_elt.attr("last_selected_value");
+ if (ref_on_change_vals !== undefined)
+ ref_on_change_vals = ref_on_change_vals.split(',');
+
// Function that attempts to refresh based on the value in the text element.
- var try_refresh_fn = function()
- {
- //
- // If value entered can be matched to value, do so and refresh by submitting parent form.
- //
-
+ var try_refresh_fn = function() {
// Get new value and see if it can be matched.
- var cur_value = text_input_elt.attr('value');
- var new_value = select_mapping[cur_value];
- if (new_value !== null && new_value !== undefined)
- {
- // Do refresh if new value is refresh value or if there are no refresh values.
- refresh = false;
- if (refresh_vals !== undefined)
- {
- for (var i= 0; i < refresh_vals.length; i++ )
- if (new_value == refresh_vals[i])
- {
- refresh = true;
- break;
- }
+ var new_value = select_mapping[text_input_elt.attr('value')];
+ if (new_value !== null && new_value !== undefined) {
+ if ($.inArray(new_value, ref_on_change_vals) === -1 && $.inArray(last_selected_value, ref_on_change_vals) === -1) {
+ return;
}
- else
- // Refresh for all values.
- refresh = true;
-
- if (refresh)
- {
- text_input_elt.attr('value', new_value);
- text_input_elt.parents('form').submit();
- }
+ text_input_elt.attr('value', new_value);
+ $(window).trigger("refresh_on_change");
+ text_input_elt.parents('form').submit();
}
};
@@ -295,15 +274,17 @@ function replace_big_select_inputs(min_l
// case a user may have manually entered a value that needs to be refreshed).
text_input_elt.bind("result", try_refresh_fn);
text_input_elt.keyup( function(e) {
- if ( e.keyCode === 13 ) // Return key
+ if (e.keyCode === 13) { // Return key
try_refresh_fn();
+ }
});
- // Disable return key so that it does not submit the form automatically. This is done because elememnt should behave like a
+ // Disable return key so that it does not submit the form automatically. This is done because element should behave like a
// select (enter = select), not text input (enter = submit form).
text_input_elt.keydown( function(e) {
- if ( e.keyCode === 13 ) // Return key
+ if (e.keyCode === 13) { // Return key
return false;
+ }
});
}
});
@@ -482,13 +463,13 @@ function commatize( number ) {
}
// Reset tool search to start state.
-function reset_tool_search( initValue )
-{
+function reset_tool_search( initValue ) {
// Function may be called in top frame or in tool_menu_frame;
// in either case, get the tool menu frame.
var tool_menu_frame = $("#galaxy_tools").contents();
- if (tool_menu_frame.length == 0)
+ if (tool_menu_frame.length == 0) {
tool_menu_frame = $(document);
+ }
// Remove classes that indicate searching is active.
$(this).removeClass("search_active");
@@ -499,18 +480,18 @@ function reset_tool_search( initValue )
tool_menu_frame.find(".toolTitle").show();
tool_menu_frame.find(".toolPanelLabel").show();
tool_menu_frame.find(".toolSectionWrapper").each( function() {
- if ($(this).attr('id') != 'recently_used_wrapper')
+ if ($(this).attr('id') != 'recently_used_wrapper') {
// Default action.
$(this).show();
- else if ($(this).hasClass("user_pref_visible"))
+ } else if ($(this).hasClass("user_pref_visible")) {
$(this).show();
+ }
});
tool_menu_frame.find("#search-no-results").hide();
// Reset search input.
tool_menu_frame.find("#search-spinner").hide();
- if (initValue)
- {
+ if (initValue) {
var search_input = tool_menu_frame.find("#tool-search-query");
search_input.val("search tools");
search_input.css("font-style", "italic");
@@ -518,20 +499,17 @@ function reset_tool_search( initValue )
}
// Create GalaxyAsync object.
-function GalaxyAsync(log_action)
-{
+var GalaxyAsync = function(log_action) {
this.url_dict = {};
this.log_action = (log_action === undefined ? false : log_action);
}
-GalaxyAsync.prototype.set_func_url = function( func_name, url )
-{
- this.url_dict[func_name] = url;
+GalaxyAsync.prototype.set_func_url = function( func_name, url ) {
+ this.url_dict[func_name] = url;
};
// Set user preference asynchronously.
-GalaxyAsync.prototype.set_user_pref = function( pref_name, pref_value )
-{
+GalaxyAsync.prototype.set_user_pref = function( pref_name, pref_value ) {
// Get URL.
var url = this.url_dict[arguments.callee];
if (url === undefined) { return false; }
@@ -544,8 +522,7 @@ GalaxyAsync.prototype.set_user_pref = fu
};
// Log user action asynchronously.
-GalaxyAsync.prototype.log_user_action = function( action, context, params )
-{
+GalaxyAsync.prototype.log_user_action = function( action, context, params ) {
if (!this.log_action) { return; }
// Get URL.
@@ -588,7 +565,24 @@ GalaxyAsync.prototype.log_user_action =
});
+
$(document).ready( function() {
+ $("select[refresh_on_change='true']").change( function() {
+ var select_field = $(this),
+ select_val = select_field.val(),
+ refresh = false,
+ ref_on_change_vals = select_field.attr("refresh_on_change_values");
+ if (ref_on_change_vals) {
+ ref_on_change_vals = ref_on_change_vals.split(',');
+ var last_selected_value = select_field.attr("last_selected_value");
+ if ($.inArray(select_val, ref_on_change_vals) === -1 && $.inArray(last_selected_value, ref_on_change_vals) === -1) {
+ return;
+ }
+ }
+ $(window).trigger("refresh_on_change");
+ select_field.get(0).form.submit();
+ });
+
// Links with confirmation
$( "a[confirm]" ).click( function() {
return confirm( $(this).attr("confirm") );
--- a/templates/requests/common/edit_request.mako
+++ b/templates/requests/common/edit_request.mako
@@ -5,31 +5,6 @@
${render_msg( message, status )}
%endif
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_request" ).submit();
- }
- });
-});
-</script>
-
<br/><br/><ul class="manage-table-actions">
--- a/templates/webapps/galaxy/user/info.mako
+++ b/templates/webapps/galaxy/user/info.mako
@@ -2,31 +2,6 @@
<%namespace file="/user/info.mako" import="render_user_info" /><%namespace file="/message.mako" import="render_msg" />
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#user_info" ).submit();
- }
- });
-});
-</script>
-
%if message:
${render_msg( message, status )}
%endif
--- a/templates/admin/forms/edit_form.mako
+++ b/templates/admin/forms/edit_form.mako
@@ -6,31 +6,6 @@
%endif
<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_form" ).submit();
- }
- });
-});
-</script>
-
-<script type="text/javascript">
$(document).ready(function(){
//hide the all of the element with class msg_body
$(".msg_body").hide();
--- a/templates/library/common/upload.mako
+++ b/templates/library/common/upload.mako
@@ -14,31 +14,6 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
-
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#upload_library_dataset" ).submit();
- }
- });
- });
- </script></%def><%def name="stylesheets()">
--- a/templates/library/common/ldda_edit_info.mako
+++ b/templates/library/common/ldda_edit_info.mako
@@ -6,30 +6,6 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def><%def name="stylesheets()">
--- a/templates/library/common/library_dataset_info.mako
+++ b/templates/library/common/library_dataset_info.mako
@@ -4,30 +4,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def>
%if library_dataset == library_dataset.library_dataset_dataset_association.library_dataset:
--- a/templates/requests/common/show_request.mako
+++ b/templates/requests/common/show_request.mako
@@ -19,29 +19,6 @@
<%def name="javascripts()">
${parent.javascripts()}
<script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#show_request" ).submit();
- }
- });
- });
-
function showContent(vThis)
{
// http://www.javascriptjunkie.com
--- a/templates/library/common/select_template.mako
+++ b/templates/library/common/select_template.mako
@@ -5,30 +5,6 @@
from galaxy.web.form_builder import CheckboxField
inheritable_check_box = CheckboxField( 'inheritable' )
%>
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#select_template" ).submit();
- }
- });
-});
-</script><br/><br/><ul class="manage-table-actions">
--- a/templates/library/common/ldda_info.mako
+++ b/templates/library/common/ldda_info.mako
@@ -25,30 +25,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def>
%if current_version:
1
0