Mercurial > repos > jtilman > flexbar
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 |
rev | line source |
---|---|
1 | 1 #!/usr/bin/env perl |
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 | 5 |
6 use warnings; | |
7 use strict; | |
8 | |
11 | 9 my ($outFile, $id, $folder, $format) = @ARGV[($#ARGV - 3) .. $#ARGV]; |
10 | |
11 my $call = join " ", @ARGV[0..($#ARGV - 4)]; | |
1 | 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 | 14 |
15 | |
13
346a2b0979ea
Adjusted tool definition and wrapper to Flexbar 2.31 release.
jtilman
parents:
12
diff
changeset
|
16 foreach(<FlexbarTargetFile*>){ |
1 | 17 |
10 | 18 my $fileType; |
19 | |
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 | 23 $fileType = 'tabular' if $fileType eq 'lengthdist'; |
24 | |
11 | 25 my $file = $_; |
26 | |
10 | 27 s/_//g; |
28 | |
29 my $name = "primary_". $id ."_". $_ ."_visible_". $fileType; | |
30 | |
11 | 31 rename $file, $name; |
10 | 32 rename $name, $folder; |
1 | 33 } |
34 |