Mercurial > repos > jtilman > flexbar
annotate flexbar.pl @ 12:4cbf6c6d2f2b
Fixed issue where adapter removal can not be performed and further minor issues.
author | jtilman |
---|---|
date | Thu, 17 Jan 2013 18:09:44 +0100 |
parents | 52c5e53aff28 |
children | 346a2b0979ea |
rev | line source |
---|---|
1 | 1 #!/usr/bin/env perl |
2 | |
3 # Author: Johannes T. Roehr | |
4 | |
5 use warnings; | |
6 use strict; | |
7 | |
8 | |
11 | 9 my ($outFile, $id, $folder, $format) = @ARGV[($#ARGV - 3) .. $#ARGV]; |
10 | |
11 my $call = join " ", @ARGV[0..($#ARGV - 4)]; | |
1 | 12 |
10 | 13 system $call .' --target reads > '. $outFile and exit 1; |
1 | 14 |
15 | |
10 | 16 foreach(<reads*>){ |
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$/; |
10 | 22 $fileType = 'tabular' if $fileType eq 'lengthdist'; |
23 | |
11 | 24 my $file = $_; |
25 | |
10 | 26 s/_//g; |
27 | |
28 my $name = "primary_". $id ."_". $_ ."_visible_". $fileType; | |
29 | |
11 | 30 rename $file, $name; |
10 | 31 rename $name, $folder; |
1 | 32 } |
33 |