/display_applications/gbrowse/gbrowse_interval_as_bed.xml
https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 32 lines · 25 code · 3 blank · 4 comment · 0 complexity · 1144db3bcc1aa777d0c2ef9b5eb54055 MD5 · raw file
- <display id="gbrowse_interval_as_bed" version="1.0.0" name="display at GBrowse">
- <!-- Load links from file: one line to one link -->
- <dynamic_links from_file="tool-data/shared/gbrowse/gbrowse_build_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_id to a Galaxy application configuration parameter and by dataset dbkey -->
- <filter>${site_id in $APP.config.gbrowse_display_sites}</filter>
- <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}/?${position}eurl=${bed_file.qp}</url>
- <param type="data" name="bed_file" url="galaxy_${DATASET_HASH}.bed" format="bedstrict"/> <!-- Galaxy allows BED files to contain non-standard fields beyond the first 3 columns, gbrowse does not(?): force use of converter which will make strict BED6+ file -->
- <param type="template" name="site_organism" strip="True" >
- $site_organisms[ $site_dbkeys.index( $bed_file.dbkey ) ]
- </param>
- <param type="template" name="position" strip="True" >
- #set chrom, start, end = $bed_file.datatype.get_estimated_display_viewport( $bed_file )
- #if $chrom is not None:
- #if $chrom.startswith( 'chr' ):
- #set $chrom = $chrom[3:]
- #end if
- q=${chrom}:${start}..${end}&
- #end if
- </param>
- </dynamic_links>
- </display>