From 134e7ea7d6f80dd9b02ab181d6f68776e1b60dbc Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Mon, 8 Sep 2008 16:00:49 -0400 Subject: [PATCH] Update GMAJ tool to allow the specifying of annotations in two styles. --- tools/visualization/GMAJ.xml | 106 ++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 40 deletions(-) diff --git a/tools/visualization/GMAJ.xml b/tools/visualization/GMAJ.xml index 1cbd9c9cce2..ab3f17366ec 100644 --- a/tools/visualization/GMAJ.xml +++ b/tools/visualization/GMAJ.xml @@ -1,21 +1,40 @@ - + Multiple Alignment Viewer GMAJ.py $out_file1 $maf_input $gmaj_file $filenames_file - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -81,52 +100,59 @@ nowarn = $nowarn #end if #set $seq_count = 0 -#for $spec_count, $annotation in $enumerate( $annotations ): -#if $maf_input.metadata.species_chromosomes and $annotation['species'].value in $maf_input.metadata.species_chromosomes and $maf_input.metadata.species_chromosomes[$annotation['species'].value]: -#set $seq_names = [ "%s.%s" % ( $annotation['species'].value, $chrom ) for $chrom in $maf_input.metadata.species_chromosomes[$annotation['species'].value]] -#else -#set $seq_names = [$annotation['species'].value] +#for $annotation_count, $annotation in $enumerate( $annotations ): +#if $annotation.annotation_style.style == "galaxy": +#if $maf_input.metadata.species_chromosomes and $annotation.annotation_style['species'].value in $maf_input.metadata.species_chromosomes and $maf_input.metadata.species_chromosomes[$annotation.annotation_style['species'].value]: +#set $seq_names = [ "%s.%s" % ( $annotation.annotation_style['species'].value, $chrom ) for $chrom in $maf_input.metadata.species_chromosomes[$annotation.annotation_style['species'].value]] +#set $aliases = [ " %s" % $chrom for $chrom in $maf_input.metadata.species_chromosomes[$annotation.annotation_style['species'].value]] +#else: +#set $seq_names = [$annotation.annotation_style['species']] +#set $aliases = [""] #end if -#for $seq_name in $seq_names: +#else: +#set $seq_names = [$annotation.annotation_style['seq_name']] +#set $aliases = [""] +#end if +#for $seq_name, $alias in $zip( $seq_names, $aliases ): seq ${seq_count}: seqname = $seq_name -#if $annotation['exons_file'].dataset: -exons = ${spec_count}.exons.${annotation['exons_file'].extension} +#if $annotation.annotation_style['exons_file'].dataset: +exons = ${annotation_count}.exons.${annotation.annotation_style['exons_file'].extension}$alias #end if -#if $annotation['repeats_file'].dataset: -repeats = ${spec_count}.repeats.${annotation['repeats_file'].extension} +#if $annotation.annotation_style['repeats_file'].dataset: +repeats = ${annotation_count}.repeats.${annotation.annotation_style['repeats_file'].extension}$alias #end if -#if $annotation['links_file'].dataset: -links = ${spec_count}.links.${annotation['links_file'].extension} +#if $annotation.annotation_style['links_file'].dataset: +links = ${annotation_count}.links.${annotation.annotation_style['links_file'].extension}$alias #end if -#if $annotation['underlays_file'].dataset: -underlays = ${spec_count}.underlays.${annotation['underlays_file'].extension} +#if $annotation.annotation_style['underlays_file'].dataset: +underlays = ${annotation_count}.underlays.${annotation.annotation_style['underlays_file'].extension}$alias #end if -#if $annotation['highlights_file'].dataset: -highlights = ${spec_count}.highlights.${annotation['highlights_file'].extension} +#if $annotation.annotation_style['highlights_file'].dataset: +highlights = ${annotation_count}.highlights.${annotation.annotation_style['highlights_file'].extension}$alias #end if -offset = $annotation['offset'] +offset = $annotation.annotation_style['offset'] #set $seq_count = $seq_count + 1 #end for #end for -#for $spec_count, $annotation in $enumerate( $annotations ): -#if $annotation['exons_file'].dataset: -$annotation['exons_file'] = ${spec_count}.exons.${annotation['exons_file'].extension} +#for $annotation_count, $annotation in $enumerate( $annotations ): +#if $annotation.annotation_style['exons_file'].dataset: +$annotation.annotation_style['exons_file'] = ${annotation_count}.exons.${annotation.annotation_style['exons_file'].extension} #end if -#if $annotation['repeats_file'].dataset: -$annotation['repeats_file'] = ${spec_count}.repeats.${annotation['repeats_file'].extension} +#if $annotation.annotation_style['repeats_file'].dataset: +$annotation.annotation_style['repeats_file'] = ${annotation_count}.repeats.${annotation.annotation_style['repeats_file'].extension} #end if -#if $annotation['links_file'].dataset: -$annotation['links_file'] = ${spec_count}.links.${annotation['links_file'].extension} +#if $annotation.annotation_style['links_file'].dataset: +$annotation.annotation_style['links_file'] = ${annotation_count}.links.${annotation.annotation_style['links_file'].extension} #end if -#if $annotation['underlays_file'].dataset: -$annotation['underlays_file'] = ${spec_count}.underlays.${annotation['underlays_file'].extension} +#if $annotation.annotation_style['underlays_file'].dataset: +$annotation.annotation_style['underlays_file'] = ${annotation_count}.underlays.${annotation.annotation_style['underlays_file'].extension} #end if -#if $annotation['highlights_file'].dataset: -$annotation['highlights_file'] = ${spec_count}.highlights.${annotation['highlights_file'].extension} +#if $annotation.annotation_style['highlights_file'].dataset: +$annotation.annotation_style['highlights_file'] = ${annotation_count}.highlights.${annotation.annotation_style['highlights_file'].extension} #end if #end for