PageRenderTime 484ms CodeModel.GetById 469ms RepoModel.GetById 1ms app.codeStats 0ms

/display_applications/ensembl/ensembl_interval_as_bed.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 79 lines | 59 code | 10 blank | 10 comment | 0 complexity | fb740b9664a05acc1b666f0c37f9ffce MD5 | raw file
  1. <display id="ensembl_interval" version="1.0.0" name="display at Ensembl">
  2. <!-- Current Ensembl method of attaching user data via URL; archives older than ~November 2008 will use a different method -->
  3. <!-- Load links from file: one line to one link -->
  4. <dynamic_links from_file="tool-data/shared/ensembl/ensembl_sites.txt" skip_startswith="#" id="0" name="1">
  5. <!-- Define parameters by column from file, allow splitting on builds -->
  6. <dynamic_param name="site_id" value="0"/>
  7. <dynamic_param name="site_name" value="1"/>
  8. <dynamic_param name="site_link" value="2"/>
  9. <dynamic_param name="site_dbkeys" value="3" split="True" separator="," />
  10. <dynamic_param name="site_organisms" value="4" split="True" separator="," />
  11. <!-- Filter out some of the links based upon matching site_dbkeys to dataset dbkey -->
  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}/Location/View?r=${position};contigviewbottom=url:${bed_file.qp}=normal</url>
  15. <param type="data" name="bed_file" url="galaxy_${DATASET_HASH}.bed" format="bedstrict"/>
  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. ##The difference between chr1 and 1 is handled by Ensembl, except for the viewport, we need to provide e.g. '1' instead of 'chr1' here
  23. ##This is rather naive, it would be more ideal to have actual mappings
  24. #if $chrom == 'chrM':
  25. #set $chrom = 'MT'
  26. #end if
  27. #if $chrom.startswith( 'chr' ):
  28. #set $chrom = $chrom[3:]
  29. #end if
  30. ${chrom}:${int( start ) + 1}-${end}
  31. #else:
  32. ##default view is of '1'
  33. 1
  34. #end if
  35. </param>
  36. </dynamic_links>
  37. <!-- Old Ensembl method of attaching user data via URL -->
  38. <!-- Load links from file: one line to one link -->
  39. <dynamic_links from_file="tool-data/shared/ensembl/ensembl_sites_data_URL.txt" skip_startswith="#" id="0" name="1">
  40. <!-- Define parameters by column from file, allow splitting on builds -->
  41. <dynamic_param name="site_id" value="0"/>
  42. <dynamic_param name="site_name" value="1"/>
  43. <dynamic_param name="site_link" value="2"/>
  44. <dynamic_param name="site_dbkeys" value="3" split="True" separator="," />
  45. <dynamic_param name="site_organisms" value="4" split="True" separator="," />
  46. <!-- Filter out some of the links based upon matching site_dbkeys to dataset dbkey -->
  47. <filter>${dataset.dbkey in $site_dbkeys}</filter>
  48. <!-- We define url and params as normal, but values defined in dynamic_param are available by specified name -->
  49. <url>${site_link}${site_organism}/contigview?data_URL=${bed_file.qp}${position}</url>
  50. <param type="data" name="bed_file" url="galaxy_${DATASET_HASH}.bed" format="bedstrict"/>
  51. <param type="template" name="site_organism" strip="True" >
  52. $site_organisms[ $site_dbkeys.index( $bed_file.dbkey ) ]
  53. </param>
  54. <param type="template" name="position" strip="True" >
  55. #set chrom, start, end = $bed_file.datatype.get_estimated_display_viewport( $bed_file )
  56. #if $chrom is not None:
  57. ##The difference between chr1 and 1 is handled by Ensembl, except for the viewport, we need to provide e.g. '1' instead of 'chr1' here
  58. ##This is rather naive, it would be more ideal to have actual mappings
  59. #if $chrom == 'chrM':
  60. #set $chrom = 'MT'
  61. #end if
  62. #if $chrom.startswith( 'chr' ):
  63. #set $chrom = $chrom[3:]
  64. #end if
  65. &amp;chr=${chrom}&amp;start=${int( start ) + 1}&amp;end=${end}
  66. #end if
  67. </param>
  68. </dynamic_links>
  69. </display>