annotate flexbar.pl @ 33:3b010ddcea2a draft

Uploaded
author jtilman
date Sun, 24 Jun 2018 12:25:51 -0400
parents c554e6d251fd
children
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
32
c554e6d251fd Uploaded
jtilman
parents: 29
diff changeset
3 # Flexbar wrapper for Galaxy tool definition, version 3.4
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
33
3b010ddcea2a Uploaded
jtilman
parents: 32
diff changeset
13 system $call .' --target FlexbarTargetFile --output-log '. $outFile and exit 1;
19
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