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 | |
---|
6 | <!-- Define parameters by column from file, allow splitting on builds --> |
---|
7 | <dynamic_param name="site_id" value="0"/> |
---|
8 | <dynamic_param name="site_name" value="1"/> |
---|
9 | <dynamic_param name="site_link" value="2"/> |
---|
10 | <dynamic_param name="site_dbkeys" value="3" split="True" separator="," /> |
---|
11 | <dynamic_param name="site_organisms" value="4" split="True" separator="," /> |
---|
12 | |
---|
13 | <!-- Filter out some of the links based upon matching site_dbkeys to dataset dbkey --> |
---|
14 | <filter>${dataset.dbkey in $site_dbkeys}</filter> |
---|
15 | |
---|
16 | <!-- We define url and params as normal, but values defined in dynamic_param are available by specified name --> |
---|
17 | <url>${site_link}${site_organism}/Location/View?r=${position};contigviewbottom=url:${bed_file.qp}=normal</url> |
---|
18 | |
---|
19 | <param type="data" name="bed_file" url="galaxy_${DATASET_HASH}.bed" format="bedstrict"/> |
---|
20 | <param type="template" name="site_organism" strip="True" > |
---|
21 | $site_organisms[ $site_dbkeys.index( $bed_file.dbkey ) ] |
---|
22 | </param> |
---|
23 | <param type="template" name="position" strip="True" > |
---|
24 | #set chrom, start, end = $bed_file.datatype.get_estimated_display_viewport( $bed_file ) |
---|
25 | #if $chrom is not None: |
---|
26 | ##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 |
---|
27 | ##This is rather naive, it would be more ideal to have actual mappings |
---|
28 | #if $chrom == 'chrM': |
---|
29 | #set $chrom = 'MT' |
---|
30 | #end if |
---|
31 | #if $chrom.startswith( 'chr' ): |
---|
32 | #set $chrom = $chrom[3:] |
---|
33 | #end if |
---|
34 | ${chrom}:${int( start ) + 1}-${end} |
---|
35 | #else: |
---|
36 | ##default view is of '1' |
---|
37 | 1 |
---|
38 | #end if |
---|
39 | </param> |
---|
40 | </dynamic_links> |
---|
41 | |
---|
42 | <!-- Old Ensembl method of attaching user data via URL --> |
---|
43 | <!-- Load links from file: one line to one link --> |
---|
44 | <dynamic_links from_file="tool-data/shared/ensembl/ensembl_sites_data_URL.txt" skip_startswith="#" id="0" name="1"> |
---|
45 | |
---|
46 | <!-- Define parameters by column from file, allow splitting on builds --> |
---|
47 | <dynamic_param name="site_id" value="0"/> |
---|
48 | <dynamic_param name="site_name" value="1"/> |
---|
49 | <dynamic_param name="site_link" value="2"/> |
---|
50 | <dynamic_param name="site_dbkeys" value="3" split="True" separator="," /> |
---|
51 | <dynamic_param name="site_organisms" value="4" split="True" separator="," /> |
---|
52 | |
---|
53 | <!-- Filter out some of the links based upon matching site_dbkeys to dataset dbkey --> |
---|
54 | <filter>${dataset.dbkey in $site_dbkeys}</filter> |
---|
55 | |
---|
56 | <!-- We define url and params as normal, but values defined in dynamic_param are available by specified name --> |
---|
57 | <url>${site_link}${site_organism}/contigview?data_URL=${bed_file.qp}${position}</url> |
---|
58 | |
---|
59 | <param type="data" name="bed_file" url="galaxy_${DATASET_HASH}.bed" format="bedstrict"/> |
---|
60 | <param type="template" name="site_organism" strip="True" > |
---|
61 | $site_organisms[ $site_dbkeys.index( $bed_file.dbkey ) ] |
---|
62 | </param> |
---|
63 | <param type="template" name="position" strip="True" > |
---|
64 | #set chrom, start, end = $bed_file.datatype.get_estimated_display_viewport( $bed_file ) |
---|
65 | #if $chrom is not None: |
---|
66 | ##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 |
---|
67 | ##This is rather naive, it would be more ideal to have actual mappings |
---|
68 | #if $chrom == 'chrM': |
---|
69 | #set $chrom = 'MT' |
---|
70 | #end if |
---|
71 | #if $chrom.startswith( 'chr' ): |
---|
72 | #set $chrom = $chrom[3:] |
---|
73 | #end if |
---|
74 | &chr=${chrom}&start=${int( start ) + 1}&end=${end} |
---|
75 | #end if |
---|
76 | </param> |
---|
77 | </dynamic_links> |
---|
78 | |
---|
79 | </display> |
---|