Mercurial > repos > jtilman > flexbar
annotate flexbar.pl @ 17:952389252467
Uploaded
author | jtilman |
---|---|
date | Fri, 22 Feb 2013 05:31:55 -0500 |
parents | 346a2b0979ea |
children |
rev | line source |
---|---|
1 | 1 #!/usr/bin/env perl |
2 | |
17 | 3 # Flexbar wrapper for Galaxy tool definition, version 2.32 |
13
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 |