annotate flexbar.pl @ 28:6536146320ef draft

Uploaded
author jtilman
date Mon, 02 May 2016 05:19:43 -0400
parents 2c6ab15e5964
children 9709dbd13ee3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
1 #!/usr/bin/env perl
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
2
28
6536146320ef Uploaded
jtilman
parents: 26
diff changeset
3 # Flexbar wrapper for Galaxy tool definition, version 2.7
19
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
4 # Author: Johannes Roehr
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
5
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
6 use warnings;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
7 use strict;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
8
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
9 my ($outFile, $id, $folder, $format) = @ARGV[($#ARGV - 3) .. $#ARGV];
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
10
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
11 my $call = join " ", @ARGV[0..($#ARGV - 4)];
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
12
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
13 system $call .' --target FlexbarTargetFile > '. $outFile and exit 1;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
14
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
15
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
16 foreach(<FlexbarTargetFile*>){
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
17
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
18 my $fileType;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
19
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
20 $fileType = $1 if /\.(\w+)$/;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
21 $fileType = $format if /\.\w*fast\w$/;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
22 $fileType = 'fasta' if /\.fasta$/;
22
12e4b3bb38c6 Adjusted tool definition to Flexbar release 2.4
jtilman
parents: 21
diff changeset
23 $fileType = 'tabular' if /\.lengthdist$/;
19
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
24
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
25 my $file = $_;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
26
22
12e4b3bb38c6 Adjusted tool definition to Flexbar release 2.4
jtilman
parents: 21
diff changeset
27 s/_/-/g;
19
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
28
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
29 my $name = "primary_". $id ."_". $_ ."_visible_". $fileType;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
30
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
31 rename $file, $name;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
32 rename $name, $folder;
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
33 }
621fa3daa2a1 Updated tool definition for Flexbar 2.33 release
jtilman
parents:
diff changeset
34