From 57fe2ba4b0fc7523b4656d73d1aced2efa5fcf91 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Wed, 28 May 2008 19:26:42 +0000 Subject: [PATCH] Cleaned up lav_to_bed a bit, added functional test. Removed old, unused tools from the ~/tools/filter directory. --- test-data/scatterplot_in1.tabular | 10 ++++ tools/filters/BedLike2Text.pl | 26 --------- tools/filters/BedLike2Text.xml | 18 ------ tools/filters/Interval2BedLike.pl | 39 ------------- tools/filters/Interval2BedLike.xml | 41 ------------- tools/filters/Text2BedLike.pl | 39 ------------- tools/filters/Text2BedLike.xml | 92 ------------------------------ tools/filters/aggTrack.pl | 54 ------------------ tools/filters/aggTrack.xml | 16 ------ tools/filters/lav_to_bed.py | 29 +++++----- tools/filters/lav_to_bed.xml | 38 ++++++------ tools/filters/lav_to_bed_code.py | 6 +- tools/filters/random_lines.py | 28 --------- tools/filters/random_lines.xml | 15 ----- tools/filters/srg2wig.pl | 65 --------------------- tools/filters/srg2wig.xml | 34 ----------- universe_wsgi.ini.sample | 2 +- 17 files changed, 45 insertions(+), 507 deletions(-) create mode 100644 test-data/scatterplot_in1.tabular delete mode 100644 tools/filters/BedLike2Text.pl delete mode 100644 tools/filters/BedLike2Text.xml delete mode 100644 tools/filters/Interval2BedLike.pl delete mode 100644 tools/filters/Interval2BedLike.xml delete mode 100644 tools/filters/Text2BedLike.pl delete mode 100644 tools/filters/Text2BedLike.xml delete mode 100644 tools/filters/aggTrack.pl delete mode 100644 tools/filters/aggTrack.xml delete mode 100644 tools/filters/random_lines.py delete mode 100644 tools/filters/random_lines.xml delete mode 100644 tools/filters/srg2wig.pl delete mode 100644 tools/filters/srg2wig.xml diff --git a/test-data/scatterplot_in1.tabular b/test-data/scatterplot_in1.tabular new file mode 100644 index 00000000000..c1e73a28a26 --- /dev/null +++ b/test-data/scatterplot_in1.tabular @@ -0,0 +1,10 @@ +1 68 4.1 +2 71 4.6 +3 62 3.8 +4 75 4.4 +5 58 3.2 +6 60 3.1 +7 67 3.8 +8 68 4.1 +9 71 4.3 +10 69 3.7 diff --git a/tools/filters/BedLike2Text.pl b/tools/filters/BedLike2Text.pl deleted file mode 100644 index 5afd301f92c..00000000000 --- a/tools/filters/BedLike2Text.pl +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/perl -w - -use strict; -use warnings; - -# Unpacks name field generated by Text2BedLike.pl -# BedLike2Text.pl [input BedLike file] [output file] - -my $bedLike = 0; -my $command = "cut -f 4 $ARGV[0] | sed s/^BedLike\\|// | tr \" \" \"\t\" > $ARGV[1]"; -die "Not enough arguments" unless @ARGV == 2; - -# Check that the file is BedLike: - -open (TEST, "head -n 2 $ARGV[0] |") or die "Cannot run head:$!\n"; -while () { - $bedLike = 1 if ([split "\|"]->[3] =~ /^BedLike/); -} -close TEST; - -if ($bedLike == 1) { - system($command); -} else { - die "Not a BedLike file. Check you query choice\n"; -} - diff --git a/tools/filters/BedLike2Text.xml b/tools/filters/BedLike2Text.xml deleted file mode 100644 index 13f93325b24..00000000000 --- a/tools/filters/BedLike2Text.xml +++ /dev/null @@ -1,18 +0,0 @@ - - restores a file generated with Text2BedLike tool to its original form - BedLike2Text.pl $input $out_file1 - - - - - - - - - -Expands the 4th field of a BED-like file generated with **Text2BedLike** to restore the original formatting - -See documentation for *Text2bedLike* for more information - - - \ No newline at end of file diff --git a/tools/filters/Interval2BedLike.pl b/tools/filters/Interval2BedLike.pl deleted file mode 100644 index cd5cc91f07b..00000000000 --- a/tools/filters/Interval2BedLike.pl +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/perl -w - -use strict; -use warnings; -use Carp; - -# Converts tab delimited file into BedLike format -# Interval2BedLike [chrom col] [start col] [end col] [strand col] [inupt file] [output file] - -my @fields = (); - -die "Check arguments\n" unless @ARGV == 6; - -open (IN, "<$ARGV[4]") or die "Cannot open $ARGV[4]:$!"; -open (OUT, ">$ARGV[5]") or die "Cannot create $ARGV[5]:$!"; -while () { - die "This tool can only be used on a tab delimited file. If you think your file is delimited with space, comma, or some other non TAB character -> use Convert Characters tool (Edit Text Queries->Convert Characters) to change it to TAB\n" if !m/\t/; - if (!m/^\#/) { - s/\|/:/g; - chop; - @fields = split /\t/; - - for my $line ( 0 .. @fields-1 ) { - $fields[$line] =~ s/^\s+//g; - $fields[$line] =~ s/\s+$//g; - } - - $fields[$ARGV[0]-1] =~ s/^/chr/ if $fields[$ARGV[0]-1] !~ m/^chr/; - print OUT "$fields[$ARGV[0]-1]\t$fields[$ARGV[1]-1]\t$fields[$ARGV[2]-1]\tBedLike|" . join("|", @fields) . "\t0"; - if ($ARGV[3] == 100) { - print OUT "\n"; - } else { - print OUT "\t$fields[$ARGV[3]-1]\n"; - } - } -} - -close IN; -close OUT; diff --git a/tools/filters/Interval2BedLike.xml b/tools/filters/Interval2BedLike.xml deleted file mode 100644 index 8631c7b53fb..00000000000 --- a/tools/filters/Interval2BedLike.xml +++ /dev/null @@ -1,41 +0,0 @@ - - creates a Bed query for displaying at UCSC - Interval2BedLike.pl $input_chromCol $input_startCol $input_endCol $input_strandCol $input $out_file1 - - - - - - - - -**Interval2Bed** can be used convert Interval query into Bed query for dislaying at UCSC Genome Browser - ------ - -**Example** - -You want to convert the following data into BED:: - - 2 - 478789 477812 TEF1/YPR080W - 1 - 73302 72328 CDC19/YAL038W - 4 + 1347867 1348565 SSN2/YDR443C - 7 - 373310 372735 RCS1/YGL071W - -Running Text2Bed will generate:: - - chr2 478789 477812 BedLike|2|-|478789|477812|TEF1/YPR080W 0 - - chr1 73302 72328 BedLike|1|-|73302|72328|CDC19/YAL038W 0 - - chr4 1347867 1348565 BedLike|4|+|1347867|1348565|SSN2/YDR443C 0 + - chr7 373310 372735 BedLike|4|+|1347867|1348565|SSN2/YDR443C 0 - - -The BED like data above contain all necessary BED fields: *chromosome*, *start*, *end*, *name*, *score* and *strand*. - -Note that all original information is preserved and packed within *name* field (column 4). - -.. class:: infomark - -**TIP:** To restore original data use **BedLike2Text** tool in *Convert Formats->BedLike2text* - - - \ No newline at end of file diff --git a/tools/filters/Text2BedLike.pl b/tools/filters/Text2BedLike.pl deleted file mode 100644 index d3db8d974a4..00000000000 --- a/tools/filters/Text2BedLike.pl +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/perl -w - -use strict; -use warnings; -use Carp; - -# Converts tab delimited file into BedLike format -# Text2BedLike [chrom col] [start col] [end col] [strand col] [inupt file] [output file] - -my @fields = (); - -die "Not enough arguments" unless @ARGV == 6; - -open (IN, "<$ARGV[4]") or die "Cannot open $ARGV[4]:$!"; -open (OUT, ">$ARGV[5]") or die "Cannot create $ARGV[5]:$!"; -while () { - die "This tool can only be used on a tab delimited file. If you think your file is delimited with space, comma, or some other non TAB character -> use Convert Characters tool (Edit Text Queries->Convert Characters) to change it to TAB\n" if !m/\t/; - if (!m/^\#/) { - s/\|/:/g; - chop; - @fields = split /\t/; - - for my $line ( 0 .. @fields-1 ) { - $fields[$line] =~ s/^\s+//g; - $fields[$line] =~ s/\s+$//g; - } - - $fields[$ARGV[0]-1] =~ s/^/chr/ if $fields[$ARGV[0]-1] !~ m/^chr/; - print OUT "$fields[$ARGV[0]-1]\t$fields[$ARGV[1]-1]\t$fields[$ARGV[2]-1]\tBedLike|" . join("|", @fields) . "\t0"; - if ($ARGV[3] == 100) { - print OUT "\n"; - } else { - print OUT "\t$fields[$ARGV[3]-1]\n"; - } - } -} - -close IN; -close OUT; diff --git a/tools/filters/Text2BedLike.xml b/tools/filters/Text2BedLike.xml deleted file mode 100644 index b0f46ac0386..00000000000 --- a/tools/filters/Text2BedLike.xml +++ /dev/null @@ -1,92 +0,0 @@ - - creates a Bed-like file from a tab delimited file - Text2BedLike.pl $chr $start $end $strand $input $out_file1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -BED files are required to **Perform Interval Operations** and **Fetch Sequences and Alignments** - -**Text2BedLike** provides a quick way of generating BED files from non BED tab delimited data - ------ - -**Example** - -You want to convert the following data into BED:: - - 2 - 478789 477812 TEF1/YPR080W - 1 - 73302 72328 CDC19/YAL038W - 4 + 1347867 1348565 SSN2/YDR443C - 7 - 373310 372735 RCS1/YGL071W - -Running Text2Bed will generate:: - - chr2 478789 477812 BedLike|2|-|478789|477812|TEF1/YPR080W 0 - - chr1 73302 72328 BedLike|1|-|73302|72328|CDC19/YAL038W 0 - - chr4 1347867 1348565 BedLike|4|+|1347867|1348565|SSN2/YDR443C 0 + - chr7 373310 372735 BedLike|4|+|1347867|1348565|SSN2/YDR443C 0 - - -The BED like data above contain all necessary BED fields: *chromosome*, *start*, *end*, *name*, *score* and *strand*. - -Note that all original information is preserved and packed within *name* field (column 4). - -.. class:: infomark - -**TIP:** To restore original data use **BedLike2Text** tool in *Convert Formats->BedLike2text* - - - \ No newline at end of file diff --git a/tools/filters/aggTrack.pl b/tools/filters/aggTrack.pl deleted file mode 100644 index cbfc3d81ddc..00000000000 --- a/tools/filters/aggTrack.pl +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/bin/perl -w - -use strict; -use warnings; -use File::Temp "tempfile"; - -#aggTrack.pl name input output -#creates three custom tracks for wiggles generated by aggregate datapooints tool -#representing mean, minimum, and maximum values -#input format must look like this: -#chr2L 16296021 16296221 0.738439981826 0.00999999977648 1.46687996387 -#chr2L 16298881 16299188 0.795374994166 0.00999999977648 1.58074998856 -#where last three columns are mean, minimum, and maximum values -# - -my ($f_mean, $fn_mean) = tempfile(); -my ($f_min, $fn_min) = tempfile(); -my ($f_max, $fn_max) = tempfile(); -my ($fh_mean, $fhn_mean) = tempfile(); -my ($fh_min, $fhn_min) = tempfile(); -my ($fh_max, $fhn_max) = tempfile(); -my @trackColors = ("0,70,255", "0,130,0", "255,0,0"); -my @trackPriority = (10,20,30); - -#Find min and max values - - -die "Not enough agruments\n" unless @ARGV == 3; - -my $min = 1000000; -my $max = 0; - -open (IN, "<$ARGV[1]") or die "Cannot open $ARGV[1]:$!\n"; -while () { - chop; - my @tmp = split /\t/; - if ($tmp[@tmp-2] ne "nan") { $min = $tmp[@tmp-2] if ($min > $tmp[@tmp-2]) } - if ($tmp[@tmp-1] ne "nan") { $max = $tmp[@tmp-1] if ($max < $tmp[@tmp-1]) } - print $f_mean (join("\t", @tmp[0..@tmp-4]) . "\t" . $tmp[@tmp-3] . "\n") unless ($tmp[@tmp-3] eq "nan"); - print $f_min (join("\t", @tmp[0..@tmp-4]) . "\t" . $tmp[@tmp-2] . "\n") unless ($tmp[@tmp-2] eq "nan"); - print $f_max (join("\t", @tmp[0..@tmp-4]) . "\t" . $tmp[@tmp-1] . "\n") unless ($tmp[@tmp-1] eq "nan"); -} -$min = sprintf("%.3f", $min); -$max = sprintf("%.3f", $max); -close IN; - -print $fh_mean "track type=wiggle_0 name=\"$ARGV[0]_mean\" description=\"mean\" visibility=full color=$trackColors[0] altColor=$trackColors[0] priority=$trackPriority[0] autoScale=off viewLimits=$min:$max\n"; -print $fh_min "track type=wiggle_0 name=\"$ARGV[0]_min\" description=\"minimum\" visibility=full color=$trackColors[1] altColor=$trackColors[1] priority=$trackPriority[1] autoScale=off viewLimits=$min:$max\n"; -print $fh_max "track type=wiggle_0 name=\"$ARGV[0]_max\" description=\"maximum\" visibility=full color=$trackColors[2] altColor=$trackColors[2] priority=$trackPriority[2] autoScale=off viewLimits=$min:$max\n"; - -my $catStatus = system("cat $fhn_mean $fn_mean $fhn_min $fn_min $fhn_max $fn_max > $ARGV[2]"); -die "aggTrack exited abnormally: $?" unless $catStatus == 0; - -`rm -f $fhn_mean $fn_mean $fhn_min $fn_min $fhn_max $fn_max`; diff --git a/tools/filters/aggTrack.xml b/tools/filters/aggTrack.xml deleted file mode 100644 index 139dc1196c3..00000000000 --- a/tools/filters/aggTrack.xml +++ /dev/null @@ -1,16 +0,0 @@ - - format aggregate scors as wig track - aggTrack.pl "$desc" $input $out_file1 - - - - - - - - - -Takes output of "aggregate datapoints" tool and creates a UCSC formatted wig track - - - diff --git a/tools/filters/lav_to_bed.py b/tools/filters/lav_to_bed.py index 3ffd7953eb7..6b1e067884d 100644 --- a/tools/filters/lav_to_bed.py +++ b/tools/filters/lav_to_bed.py @@ -1,6 +1,5 @@ #!/usr/bin/env python #Reads a LAV file and writes two BED files. - import sys from galaxy import eggs import pkg_resources @@ -9,35 +8,37 @@ import bx.align.lav assert sys.version_info[:2] >= ( 2, 4 ) -def main(): +def stop_err( msg ): + sys.stderr.write( msg ) + sys.exit() +def main(): try: lav_file = open(sys.argv[1],'r') bed_file1 = open(sys.argv[2],'w') bed_file2 = open(sys.argv[3],'w') - except: - print >>sys.stderr,"Error with provided arguments" - print >>sys.stderr,"Usage: python %s input_lav output_bed1 output_bed2" % sys.argv[0] - sys.exit(0) + except Exception, e: + stop_err( str( e ) ) - lavsRead = bedsWritten = 0 + lavsRead = 0 + bedsWritten = 0 species = {} - for lavBlock in bx.align.lav.Reader(lav_file): + # TODO: this is really bad since everything is read into memory. Can we eliminate this tool? + for lavBlock in bx.align.lav.Reader( lav_file ): lavsRead += 1 - for c in lavBlock.components: - spec,chrom = bx.align.lav.src_split( c.src ) + spec, chrom = bx.align.lav.src_split( c.src ) if bedsWritten < 1: - if len(species)==0: + if len( species )==0: species[spec]=bed_file1 - elif len(species)==1: + elif len( species )==1: species[spec]=bed_file2 else: continue #this is a pairwise alignment... if spec in species: - species[spec].write("%s\t%i\t%i\t%s\t%i\t%s\n" % (chrom,c.start,c.end,spec+"_"+str(bedsWritten),0,c.strand)) + species[spec].write( "%s\t%i\t%i\t%s_%s\t%i\t%s\n" % ( chrom, c.start, c.end, spec, str( bedsWritten ), 0, c.strand ) ) bedsWritten += 1 - + for spec,file in species.items(): print "#FILE\t%s\t%s" % (file.name, spec) diff --git a/tools/filters/lav_to_bed.xml b/tools/filters/lav_to_bed.xml index a3917efec80..1bbf4283339 100644 --- a/tools/filters/lav_to_bed.xml +++ b/tools/filters/lav_to_bed.xml @@ -1,35 +1,29 @@ -Converts a LAV formated file to BED format -lav_to_bed.py $lav_file $bed_file1 $bed_file2 - + Converts a LAV formated file to BED format + lav_to_bed.py $lav_file $bed_file1 $bed_file2 - - - + - + + + + + + + + **Syntax** This tool converts a LAV formated file to the BED format. -- **LAV format** LAV is an alignment format developed by Webb Miller's group. It is the primary output format for BLASTZ. +- **LAV format** LAV is an alignment format developed by Webb Miller's group at Penn State University. It is the primary output format for BLASTZ. -- **BED format** Browser Extensible Data format was designed at UCSC for displaying data tracks in the Genome Browser. It has three required fields and twelve additional optional ones:: - - The first three BED fields (required) are: - 1. chrom - The name of the chromosome (e.g. chr1, chrY_random). - 2. chromStart - The starting position in the chromosome. (The first base in a chromosome is numbered 0.) - 3. chromEnd - The ending position in the chromosome, plus 1 (i.e., a half-open interval). - - Additional (optional) fields are: - 4. name - The name of the BED line. - 5. score - A score between 0 and 1000. - 6. strand - Defines the strand - either '+' or '-'. +- **BED format** Browser Extensible Data format was designed at UCSC for displaying data tracks in the Genome Browser. ----- @@ -40,7 +34,7 @@ This tool converts a LAV formated file to the BED format. #:lav s { "/depot/data2/galaxy/hg16/seq/chr19.nib" 1 63811651 0 1 - "/depot/data2/galaxy/mm5/seq/chr11.nib-" 1 121648857 0 1 + "/depot/data2/galaxy/mm5/seq/chr11.nib" 1 121648857 0 1 } h { "> hg16.chr19" @@ -69,6 +63,6 @@ This tool converts a LAV formated file to the BED format. chr11 70568379 70568443 mm5_0 0 + chr11 70573975 70574054 mm5_1 0 + - - + + \ No newline at end of file diff --git a/tools/filters/lav_to_bed_code.py b/tools/filters/lav_to_bed_code.py index b3a9fe6cead..e90ab05faa1 100644 --- a/tools/filters/lav_to_bed_code.py +++ b/tools/filters/lav_to_bed_code.py @@ -7,12 +7,12 @@ def exec_after_process(app, inp_data, out_data, param_dict, tool, stdout, stderr fields = line.split("\t") filename_to_build[fields[1]]=fields[2].strip() else: - new_stdout = new_stdout + line + new_stdout = "%s%s" % ( new_stdout, line ) for name,data in out_data.items(): try: - data.info = new_stdout +"\n"+ stderr + data.info = "%s\n%s" % ( new_stdout, stderr ) data.dbkey = filename_to_build[data.file_name] - data.name = data.name + " ("+data.dbkey+")" + data.name = "%s (%s)" % ( data.name, data.dbkey ) data.flush() except: continue diff --git a/tools/filters/random_lines.py b/tools/filters/random_lines.py deleted file mode 100644 index b49ec59568d..00000000000 --- a/tools/filters/random_lines.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python - -""" -Sample some number of random lines from a file. Needs to passes over the -input (but that saves us memory). - -usage: %prog in_fname out_fname nlines -""" - -import random, sys - -in_fname, out_fname, lines = sys.argv[1:] -lines = int( lines ) - -# First pass, count lines in input -nlines = 0 -for line in open( in_fname ): - nlines += 1 - -# Sample -sample = random.sample( range( nlines ), nlines ) - -# Second pass, select sampled lines and print -out = open( out_fname, 'w' ) -for i, line in enumerate( open( in_fname ) ): - if i in sample: - print >> out, line, -out.close() \ No newline at end of file diff --git a/tools/filters/random_lines.xml b/tools/filters/random_lines.xml deleted file mode 100644 index 56dc2bc6866..00000000000 --- a/tools/filters/random_lines.xml +++ /dev/null @@ -1,15 +0,0 @@ - - from a file - random_lines.py $input $out_file1 $nlines - - - - - - - - -Select the specified number of lines randomly (without replacement) from a -file. - - \ No newline at end of file diff --git a/tools/filters/srg2wig.pl b/tools/filters/srg2wig.pl deleted file mode 100644 index ebc07f49841..00000000000 --- a/tools/filters/srg2wig.pl +++ /dev/null @@ -1,65 +0,0 @@ -#! /usr/bin/perl -w - -use strict; -use warnings; -use File::Temp "tempfile"; - -# converts srg file into wig file: -# -# if input looks like this: -# -#chr2 16447976 1.08385 -#chr2 16447977 0.01 -#chr4 16417846 1.26935 -#chr4 16418578 1.54405 -# -#the the output will look like that: -# -#variableStep chrom=chr2 -#16447976 1.08385 -#16447977 0.01 -#variableStep chrom=chr4 -#16417846 1.26935 -#16418578 1.54405 -# -#srg2wig.pl input_file output_file -# - -die "Not enouth arguments\n" unless @ARGV == 2; - -open(IN, "<$ARGV[0]") or die "Cannot open $ARGV[0]\n"; -my ($fh1, $fn1) = tempfile(); -my $i = 0; - -while () { - chop; - if (m/^(chr\w+)\t(\d+)\t([\d\.]+)$/) { - print $fh1 "$_\n"; - } else { - print STDERR "Line $i does not conform to srg format : $_. Skipping...\n"; - } - ++$i; -} -close (IN); -my ($fh2, $fn2) = tempfile(); -my $sortStatus = system("sort -f -n -k 1,2 $fn1 -o $fn2"); -die "srg2wig exited abnormally: $?" unless $sortStatus == 0; - -open (OUT, ">$ARGV[1]") or die "Cannot create file $ARGV[1]\n"; - -my @chr = (); - -while (<$fh2>) { - chop; - my @tmp = split /\t/; - print OUT "variableStep chrom=$tmp[0]\n" if $. == 1; - push (@chr, $tmp[0]); - if ($chr[@chr-1] ne $chr[@chr-2]) { - print OUT "variableStep chrom=$chr[@chr-1]\n"; - print OUT "$tmp[1]\t$tmp[2]\n"; - } else { - print OUT "$tmp[1]\t$tmp[2]\n"; - } -} -close OUT; -`rm -f $fn1 $fn2`; diff --git a/tools/filters/srg2wig.xml b/tools/filters/srg2wig.xml deleted file mode 100644 index 86c792ec911..00000000000 --- a/tools/filters/srg2wig.xml +++ /dev/null @@ -1,34 +0,0 @@ - - converter - srg2wig.pl $input $out_file1 - - - - - - - - - -**Syntax** - -This tool converts srg tables into variableStep wiggle tables. - -If your input looks like this:: - - chr2 16447976 1.08385 - chr2 16447977 0.01 - chr4 16417846 1.26935 - chr4 16418578 1.54405 - -it will be converted into this:: - - variableStep chrom=chr2 - 16447976 1.08385 - 16447977 0.01 - variableStep chrom=chr4 - 16417846 1.26935 - 16418578 1.54405 - - - diff --git a/universe_wsgi.ini.sample b/universe_wsgi.ini.sample index da60c1ac15b..da4b3ca31ba 100644 --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -184,7 +184,7 @@ html = galaxy.datatypes.images:Html,text/html interval = galaxy.datatypes.interval:Interval,display_in_upload jpg = galaxy.datatypes.images:Image,image/jpeg laj = galaxy.datatypes.images:Laj -lav = galaxy.datatypes.sequence:Lav +lav = galaxy.datatypes.sequence:Lav,display_in_upload maf = galaxy.datatypes.sequence:Maf,display_in_upload pdf = galaxy.datatypes.images:Image,application/pdf png = galaxy.datatypes.images:Image,image/png