Created
April 26, 2011 13:06
-
-
Save idot/942223 to your computer and use it in GitHub Desktop.
Display files from galaxy in IGB (needs copy of synonyms.txt)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<display id="igb_bed" version="1.0.0" name="display in "> | |
<link id="igb_bed" name="IGB"> | |
<url>http://localhost:7085/UnibrowControl?version=${buildversion}&${position}&loadresidues=false&feature_url_0=${bed_file.url}&sym_name_0=${thenicename}&sym_method_0=${bed_file.url}&sym_bg_0=0xFFFFFF&graph_show_label_0=true&graph_show_axis_0=true&graph_minvis_0=0.0&graph_maxvis_0=100&graph_float_0=false&graph_style_0=Bar&query_url=${bed_file.url}&server_url=galaxy</url> | |
<param type="data" name="bed_file_for_name" viewable="False"/> | |
<param type="template" name="thenicename" viewable="False" strip="True"> | |
#import re | |
#set nm=$bed_file_for_name.name | |
${re.sub('\W',"_",nm)} | |
</param> | |
<param type="data" name="bed_file" url="${thenicename}_${DATASET_HASH}.bed" strip_https="True" /> | |
<param type="template" name="position" strip="True" > | |
#set line_count = 0 | |
#set chrom = None | |
#set start = float( 'inf' ) | |
#set end = 0 | |
#for $line in open( $bed_file.file_name ): | |
#if $line_count > 10: ##10 max lines to check for view port | |
#break | |
#end if | |
#if not $line.startswith( "#" ): | |
#set $fields = $line.split( "\t" ) | |
#try: | |
#if len( $fields ) >= max( $bed_file.metadata.startCol, $bed_file.metadata.endCol, $bed_file.metadata.chromCol ): | |
#if $chrom is None or $fields[ $bed_file.metadata.chromCol - 1 ] == $chrom: | |
#set chrom = $fields[ $bed_file.metadata.chromCol - 1 ] | |
#set start = min( $start, int( $fields[ $bed_file.metadata.startCol - 1 ] ) ) | |
#set end = max( $end, int( $fields[ $bed_file.metadata.endCol - 1 ] ) ) | |
#end if | |
#end if | |
#except: | |
#pass | |
#end try | |
#end if | |
#set line_count += 1 | |
#end for | |
#if $chrom is not None: | |
seqid=${chrom}&start=${start}&end=${end + 1} | |
#else: | |
seqid=chr1&start=10000&end=10100 | |
#end if | |
</param> | |
<param type="template" name="buildversion" strip="True" > | |
#set igbkey = "unknown" | |
#set dbkey=$bed_file.dbkey | |
#for $line in open('display_applications/igb/synonyms.txt', 'r') | |
#set $fields = $line.split( "\t" ) | |
#for $field in $fields: | |
#if $field == dbkey: | |
#set igbkey = $fields[0] | |
#break | |
#end if | |
#end for | |
#end for | |
${igbkey} | |
</param> | |
</link> | |
</display> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Display files from galaxy in IGB
create folder igb in display_applications
copy a synonyms.txt file from the igb distribution there
copy xml files from this gist there
register xml files in datatypes_conf.xml
for data type bed (search for
<datatype extension="bed" type="galaxy.datatypes.interval:Bed" display_in_upload="true">
) and insertrestart galaxy and hope for the best
known problems:
there is a problem with the sym_method that has to be created differently. It currenlty prevents the name to be shown in a nice way in the graph (or track - I confuse the two).