/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

  1. <display id="gbrowse_interval_as_bed" version="1.0.0" name="display at GBrowse">
  2. <!-- Load links from file: one line to one link -->
  3. <dynamic_links from_file="tool-data/shared/gbrowse/gbrowse_build_sites.txt" skip_startswith="#" id="0" name="1">
  4. <!-- Define parameters by column from file, allow splitting on builds -->
  5. <dynamic_param name="site_id" value="0"/>
  6. <dynamic_param name="site_name" value="1"/>
  7. <dynamic_param name="site_link" value="2"/>
  8. <dynamic_param name="site_dbkeys" value="3" split="True" separator="," />
  9. <dynamic_param name="site_organisms" value="4" split="True" separator="," />
  10. <!-- Filter out some of the links based upon matching site_id to a Galaxy application configuration parameter and by dataset dbkey -->
  11. <filter>${site_id in $APP.config.gbrowse_display_sites}</filter>
  12. <filter>${dataset.dbkey in $site_dbkeys}</filter>
  13. <!-- We define url and params as normal, but values defined in dynamic_param are available by specified name -->
  14. <url>${site_link}${site_organism}/?${position}eurl=${bed_file.qp}</url>
  15. <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 -->
  16. <param type="template" name="site_organism" strip="True" >
  17. $site_organisms[ $site_dbkeys.index( $bed_file.dbkey ) ]
  18. </param>
  19. <param type="template" name="position" strip="True" >
  20. #set chrom, start, end = $bed_file.datatype.get_estimated_display_viewport( $bed_file )
  21. #if $chrom is not None:
  22. #if $chrom.startswith( 'chr' ):
  23. #set $chrom = $chrom[3:]
  24. #end if
  25. q=${chrom}:${start}..${end}&amp;
  26. #end if
  27. </param>
  28. </dynamic_links>
  29. </display>