Mercurial > repos > konradpaszkiewicz > velvetoptimiser
annotate VelvetOptimiser-2.1.7_modified/VelvetOpt/gwrap.pm @ 0:50ae1360fbbe default tip
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
author | konradpaszkiewicz |
---|---|
date | Tue, 07 Jun 2011 18:07:56 -0400 |
parents | |
children |
rev | line source |
---|---|
0
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
1 # VelvetOpt::gwrap.pm |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
2 # |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
3 # Copyright 2008 Simon Gladman <simon.gladman@csiro.au> |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
4 # |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
5 # This program is free software; you can redistribute it and/or modify |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
6 # it under the terms of the GNU General Public License as published by |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
7 # the Free Software Foundation; either version 2 of the License, or |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
8 # (at your option) any later version. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
9 # |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
10 # This program is distributed in the hope that it will be useful, |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
13 # GNU General Public License for more details. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
14 # |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
15 # You should have received a copy of the GNU General Public License |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
16 # along with this program; if not, write to the Free Software |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
18 # MA 02110-1301, USA. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
19 # |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
20 package VelvetOpt::gwrap; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
21 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
22 =head1 NAME |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
23 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
24 VelvetOpt::gwrap.pm - Velvet graphing and assembly program wrapper module. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
25 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
26 =head1 AUTHOR |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
27 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
28 Simon Gladman, CSIRO, 2007, 2008. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
29 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
30 =head1 LICENSE |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
31 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
32 Copyright 2008 Simon Gladman <simon.gladman@csiro.au> |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
33 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
34 This program is free software; you can redistribute it and/or modify |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
35 it under the terms of the GNU General Public License as published by |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
36 the Free Software Foundation; either version 2 of the License, or |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
37 (at your option) any later version. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
38 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
39 This program is distributed in the hope that it will be useful, |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
40 but WITHOUT ANY WARRANTY; without even the implied warranty of |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
42 GNU General Public License for more details. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
43 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
44 You should have received a copy of the GNU General Public License |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
45 along with this program; if not, write to the Free Software |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
46 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
47 MA 02110-1301, USA. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
48 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
49 =head1 SYNOPSIS |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
50 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
51 use VelvetOpt::gwrap; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
52 use VelvetOpt::Assembly; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
53 my $object = VelvetOpt::Assembly->new( |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
54 timestamph => "23 November 2008 15:00:00", |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
55 ass_id => "1", |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
56 versiong => "0.7.19", |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
57 pstringg => "test", |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
58 ass_dir => "/home/gla048/Desktop/newVelvetOptimiser/test" |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
59 ); |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
60 my $worked = VelvetOpt::gwrap::objectVelvetg($object); |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
61 if($worked){ |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
62 print $object->toString(); |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
63 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
64 else { |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
65 die "Error in velvetg..\n" . $object->toString(); |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
66 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
67 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
68 =head1 DESCRIPTION |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
69 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
70 A wrapper module to run velvetg on VelvetAssembly objects or on velvetg |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
71 parameter strings. Also contains private methods to check velvetg |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
72 parameter strings, run velvetg and return results. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
73 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
74 =head2 Uses |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
75 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
76 =over 8 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
77 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
78 =item strict |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
79 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
80 =item warnings |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
81 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
82 =item Carp |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
83 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
84 =item VelvetOpt::Assembly |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
85 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
86 =item POSIX qw(strftime) |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
87 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
88 =back |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
89 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
90 =head2 Private Fields |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
91 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
92 =over 8 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
93 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
94 =item interested |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
95 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
96 STDERR printing debug message toggle. 1 for on, 0 for off. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
97 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
98 =back |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
99 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
100 =head2 Methods |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
101 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
102 =over 8 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
103 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
104 =item _runVelvetg |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
105 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
106 Private method which runs velvetg with the supplied velvetg parameter string and returns velvetg output messages as a string. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
107 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
108 =item _checkVGString |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
109 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
110 Private method which checks for a correctly formatted velvetg parameter string. Returns 1 or 0. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
111 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
112 =item objectVelvetg |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
113 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
114 Accepts a VelvetAssembly object, looks for the velvetg parameter string it contains, checks it, sends it to _runVelvetg, collects the results and stores them in the VelvetAssembly object. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
115 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
116 =item stringVelvetg |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
117 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
118 Accepts a velvetg parameter string, checks it, sends it to _runVelvetg and then collects and returns the velvetg output messages. |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
119 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
120 =back |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
121 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
122 =cut |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
123 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
124 use warnings; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
125 use strict; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
126 use Carp; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
127 use VelvetOpt::Assembly; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
128 use POSIX qw(strftime); |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
129 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
130 my $interested = 0; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
131 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
132 sub _runVelvetg { |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
133 my $cmdline = shift; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
134 my $output = ""; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
135 print STDERR "About to run velvetg!\n" if $interested; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
136 $output = `velvetg $cmdline`; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
137 $output .= "\nTimestamp: " . strftime("%b %e %Y %H:%M:%S", localtime) . "\n"; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
138 return $output; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
139 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
140 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
141 sub _checkVGString { |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
142 return 1; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
143 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
144 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
145 sub objectVelvetg { |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
146 my $va = shift; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
147 my $cmdline = $va->{pstringg}; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
148 if(_checkVGString($cmdline)){ |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
149 $va->{velvetgout} = _runVelvetg($cmdline); |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
150 my @t = split /\n/, $va->{velvetgout}; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
151 $t[$#t] =~ s/Timestamp:\s+//; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
152 $va->{timestampg} = $t[$#t]; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
153 return 1; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
154 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
155 else { |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
156 $va->{velvetgout} = "Formatting errors in velvetg parameter string."; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
157 return 0; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
158 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
159 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
160 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
161 sub stringVelvetg { |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
162 my $cmdline = shift; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
163 if(_checkVGString($cmdline)){ |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
164 return _runVelvetg($cmdline); |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
165 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
166 else { |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
167 return "Formatting errors in velvetg parameter string."; |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
168 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
169 } |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
170 |
50ae1360fbbe
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
171 1; |