comparison flexbar.pl @ 19:621fa3daa2a1

Updated tool definition for Flexbar 2.33 release
author jtilman
date Mon, 18 Mar 2013 18:18:28 +0100
parents
children d62311a7bac6
comparison
equal deleted inserted replaced
18:702ac01fbef8 19:621fa3daa2a1
1 #!/usr/bin/env perl
2
3 # Flexbar wrapper for Galaxy tool definition, version 2.33
4 # Author: Johannes Roehr
5
6 use warnings;
7 use strict;
8
9 my ($outFile, $id, $folder, $format) = @ARGV[($#ARGV - 3) .. $#ARGV];
10
11 my $call = join " ", @ARGV[0..($#ARGV - 4)];
12
13 system $call .' --target FlexbarTargetFile > '. $outFile and exit 1;
14
15
16 foreach(<FlexbarTargetFile*>){
17
18 my $fileType;
19
20 $fileType = $1 if /\.(\w+)$/;
21 $fileType = $format if /\.\w*fast\w$/;
22 $fileType = 'fasta' if /\.fasta$/;
23 $fileType = 'tabular' if $fileType eq 'lengthdist';
24
25 my $file = $_;
26
27 s/_//g;
28
29 my $name = "primary_". $id ."_". $_ ."_visible_". $fileType;
30
31 rename $file, $name;
32 rename $name, $folder;
33 }
34