annotate flexbar.pl @ 13:346a2b0979ea

Adjusted tool definition and wrapper to Flexbar 2.31 release.
author jtilman
date Thu, 17 Jan 2013 18:26:14 +0100
parents 4cbf6c6d2f2b
children 952389252467
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
1 #!/usr/bin/env perl
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
2
13
346a2b0979ea Adjusted tool definition and wrapper to Flexbar 2.31 release.
jtilman
parents: 12
diff changeset
3 # Flexbar wrapper for Galaxy tool definition, version 2.31
346a2b0979ea Adjusted tool definition and wrapper to Flexbar 2.31 release.
jtilman
parents: 12
diff changeset
4 # Author: Johannes Roehr
1
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
5
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
6 use warnings;
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
7 use strict;
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
8
11
52c5e53aff28 Revised perl wrapper.
jtilman
parents: 10
diff changeset
9 my ($outFile, $id, $folder, $format) = @ARGV[($#ARGV - 3) .. $#ARGV];
52c5e53aff28 Revised perl wrapper.
jtilman
parents: 10
diff changeset
10
52c5e53aff28 Revised perl wrapper.
jtilman
parents: 10
diff changeset
11 my $call = join " ", @ARGV[0..($#ARGV - 4)];
1
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
12
13
346a2b0979ea Adjusted tool definition and wrapper to Flexbar 2.31 release.
jtilman
parents: 12
diff changeset
13 system $call .' --target FlexbarTargetFile > '. $outFile and exit 1;
1
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
14
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
15
13
346a2b0979ea Adjusted tool definition and wrapper to Flexbar 2.31 release.
jtilman
parents: 12
diff changeset
16 foreach(<FlexbarTargetFile*>){
1
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
17
10
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
18 my $fileType;
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
19
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
20 $fileType = $1 if /\.(\w+)$/;
12
4cbf6c6d2f2b Fixed issue where adapter removal can not be performed and further minor issues.
jtilman
parents: 11
diff changeset
21 $fileType = $format if /\.\w*fast\w$/;
13
346a2b0979ea Adjusted tool definition and wrapper to Flexbar 2.31 release.
jtilman
parents: 12
diff changeset
22 $fileType = 'fasta' if /\.fasta$/;
10
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
23 $fileType = 'tabular' if $fileType eq 'lengthdist';
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
24
11
52c5e53aff28 Revised perl wrapper.
jtilman
parents: 10
diff changeset
25 my $file = $_;
52c5e53aff28 Revised perl wrapper.
jtilman
parents: 10
diff changeset
26
10
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
27 s/_//g;
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
28
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
29 my $name = "primary_". $id ."_". $_ ."_visible_". $fileType;
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
30
11
52c5e53aff28 Revised perl wrapper.
jtilman
parents: 10
diff changeset
31 rename $file, $name;
10
f0bdf862ba39 Simplified perl wrapper.
jtilman
parents: 1
diff changeset
32 rename $name, $folder;
1
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
33 }
a8399cb4972b Uploaded Flexbar perl tool wrapper file flexbar.pl
jtilman
parents:
diff changeset
34