Mercurial > repos > konradpaszkiewicz > velvetoptimiser
annotate VelvetOptimiser-2.1.7_modified/VelvetOpt/Assembly.pm @ 0:7363fee7f20c 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 17:42:26 -0400 |
parents | |
children |
rev | line source |
---|---|
0
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
1 # VelvetOpt::Assembly.pm |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
2 # |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
3 # Copyright 2008,2009 Simon Gladman <simon.gladman@csiro.au> |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
4 # |
7363fee7f20c
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 |
7363fee7f20c
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 |
7363fee7f20c
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 |
7363fee7f20c
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. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
9 # |
7363fee7f20c
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, |
7363fee7f20c
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 |
7363fee7f20c
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 |
7363fee7f20c
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. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
14 # |
7363fee7f20c
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 |
7363fee7f20c
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 |
7363fee7f20c
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, |
7363fee7f20c
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. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
19 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
20 # Version 2.1.2 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
21 # |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
22 # Changes for 2.0.1 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
23 # *Bug fix in CalcAssemblyScore. Now returns 0 if there is no calculable score instead of crashing. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
24 # |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
25 # Changes for 2.1.0 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
26 # *Added 2 stage optimisation functions for optimising kmer size and cov_cutoff differently if required. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
27 # |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
28 # Changes for 2.1.1 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
29 # *Allowed for non-word characters in prefix names. (. - etc.) Still no spaces allowed in prefix name or any filenames. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
30 # |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
31 # Changes for 2.1.2 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
32 # *Now warns nicely of optimisation function returning undef or 0. Suggests you choose and alternative. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
33 # |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
34 # Changes for 2.1.3 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
35 # *Now prints the velvet calculated insert sizes and standard deviations in the Assembly summaries (both log files and screen). |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
36 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
37 package VelvetOpt::Assembly; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
38 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
39 =head1 NAME |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
40 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
41 VelvetOpt::Assembly.pm - Velvet assembly container class. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
42 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
43 =head1 AUTHOR |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
44 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
45 Simon Gladman, CSIRO, 2007, 2008. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
46 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
47 =head1 LICENSE |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
48 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
49 Copyright 2008, 2009 Simon Gladman <simon.gladman@csiro.au> |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
50 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
51 This program is free software; you can redistribute it and/or modify |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
52 it under the terms of the GNU General Public License as published by |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
53 the Free Software Foundation; either version 2 of the License, or |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
54 (at your option) any later version. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
55 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
56 This program is distributed in the hope that it will be useful, |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
57 but WITHOUT ANY WARRANTY; without even the implied warranty of |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
58 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
59 GNU General Public License for more details. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
60 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
61 You should have received a copy of the GNU General Public License |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
62 along with this program; if not, write to the Free Software |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
63 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
64 MA 02110-1301, USA. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
65 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
66 =head1 SYNOPSIS |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
67 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
68 use VelvetOpt::Assembly; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
69 my $object = VelvetOpt::Assembly->new( |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
70 timestamph => "23 November 2008 15:00:00", |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
71 ass_id => "1", |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
72 versionh => "0.7.04", |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
73 ass_dir => "/home/gla048/Desktop/newVelvetOptimiser/data_1" |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
74 ); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
75 print $object->toString(); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
76 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
77 =head1 DESCRIPTION |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
78 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
79 A container class to hold the results of a Velvet assembly. Includes timestamps, |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
80 version information, parameter strings and assembly output metrics. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
81 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
82 Version 1.1 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
83 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
84 =head2 Uses |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
85 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
86 =over 8 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
87 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
88 =item strict |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
89 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
90 =item warnings |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
91 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
92 =item Carp |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
93 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
94 =back |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
95 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
96 =head2 Fields |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
97 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
98 =over 8 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
99 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
100 =item assmscore |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
101 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
102 The assembly score metric for this object |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
103 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
104 =item timstamph |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
105 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
106 The timestamp of the start of the velveth run for this assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
107 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
108 =item timestampg |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
109 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
110 The date and time of the end of the velvetg run. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
111 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
112 =item ass_id |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
113 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
114 The assembly id number. Sequential for all the runs for this optimisation. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
115 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
116 =item versionh |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
117 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
118 The version number of velveth used in this assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
119 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
120 =item versiong |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
121 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
122 The version number of velvetg used in this assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
123 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
124 =item readfilename |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
125 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
126 The name of the file containing all the reads (or a qw of them if more than one...) |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
127 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
128 =item pstringh |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
129 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
130 The velveth parameter string used in this assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
131 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
132 =item pstringg |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
133 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
134 The velvetg parameter string used in this assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
135 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
136 =item ass_dir |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
137 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
138 The assembly directory path (full) |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
139 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
140 =item hashval |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
141 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
142 The hash value used for this assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
143 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
144 =item rmapfs |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
145 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
146 The roadmap file size |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
147 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
148 =item sequences |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
149 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
150 The total number of sequences in the input files |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
151 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
152 =item nconts |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
153 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
154 The number of contigs in the final assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
155 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
156 =item totalbp |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
157 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
158 The total number of bases in the contigs |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
159 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
160 =item n50 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
161 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
162 The n50 of the assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
163 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
164 =item maxlength |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
165 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
166 The length of the longest contig in the assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
167 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
168 =item maxcont |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
169 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
170 The size of the largest contig in the assembly |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
171 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
172 =item nconts1k |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
173 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
174 The number of contigs greater than 1k in size |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
175 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
176 =item totalbp1k |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
177 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
178 the sum of the length of contigs > 1k in size |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
179 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
180 =item velvethout |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
181 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
182 The velveth output |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
183 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
184 =item velvetgout |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
185 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
186 The velvetg output |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
187 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
188 =back |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
189 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
190 =head2 Methods |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
191 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
192 =over 8 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
193 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
194 =item new |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
195 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
196 Returns a new VelvetAssembly object. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
197 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
198 =item accessor methods |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
199 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
200 Accessor methods for all fields. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
201 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
202 =item calcAssemblyScore |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
203 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
204 Calculates the assembly score of the object (after velvetg has been run.) and stores it in self. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
205 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
206 =item getHashingDetails |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
207 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
208 Gets the details of the outputs from the velveth run and stores it in self. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
209 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
210 =item getAssemblyDetails |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
211 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
212 Gets the details of the outputs from the velvetg run and stores it in self. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
213 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
214 =item toString |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
215 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
216 Returns a string representation of the object's contents. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
217 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
218 =item toStringNoV |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
219 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
220 Returns a string representation of the object's contents without the velvet outputs which are large. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
221 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
222 =item opt_func_toString |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
223 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
224 Returns the usage of the optimisation function. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
225 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
226 =back |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
227 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
228 =cut |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
229 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
230 use strict; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
231 use lib "/usr/local/lib/perl5/site_perl/5.8.8"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
232 use Carp; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
233 use warnings; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
234 #use base "Storable"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
235 use Cwd; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
236 use Bio::SeqIO; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
237 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
238 my $interested = 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
239 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
240 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
241 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
242 #constructor |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
243 sub new { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
244 my $class = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
245 my $self = {@_}; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
246 bless ($self, $class); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
247 return $self; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
248 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
249 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
250 #optimisation function options... |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
251 my %f_opts; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
252 $f_opts{'ncon'}->{'intname'} = 'nconts'; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
253 $f_opts{'ncon'}->{'desc'} = "The total number of contigs"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
254 $f_opts{'n50'}->{'intname'} = 'n50'; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
255 $f_opts{'n50'}->{'desc'} = "The n50"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
256 $f_opts{'max'}->{'intname'} = 'maxlength'; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
257 $f_opts{'max'}->{'desc'} = "The length of the longest contig"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
258 $f_opts{'Lcon'}->{'intname'} = 'nconts1k'; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
259 $f_opts{'Lcon'}->{'desc'} = "The number of large contigs"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
260 $f_opts{'tbp'}->{'intname'} = 'totalbp'; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
261 $f_opts{'tbp'}->{'desc'} = "The total number of basepairs in contigs"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
262 $f_opts{'Lbp'}->{'intname'} = 'totalbp1k'; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
263 $f_opts{'Lbp'}->{'desc'} = "The total number of base pairs in large contigs"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
264 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
265 #accessor methods |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
266 sub assmscore{ $_[0]->{assmscore}=$_[1] if defined $_[1]; $_[0]->{assmscore}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
267 sub timestamph{ $_[0]->{timestamph}=$_[1] if defined $_[1]; $_[0]->{timestamph}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
268 sub timestampg{ $_[0]->{timestampg}=$_[1] if defined $_[1]; $_[0]->{timestampg}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
269 sub ass_id{ $_[0]->{ass_id}=$_[1] if defined $_[1]; $_[0]->{ass_id}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
270 sub versionh{ $_[0]->{versionh}=$_[1] if defined $_[1]; $_[0]->{versionh}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
271 sub versiong{ $_[0]->{versiong}=$_[1] if defined $_[1]; $_[0]->{versiong}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
272 sub readfilename{ $_[0]->{readfilename}=$_[1] if defined $_[1]; $_[0]->{readfilename}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
273 sub pstringh{ $_[0]->{pstringh}=$_[1] if defined $_[1]; $_[0]->{pstringh}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
274 sub pstringg{ $_[0]->{pstringg}=$_[1] if defined $_[1]; $_[0]->{pstringg}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
275 sub ass_dir{ $_[0]->{ass_dir}=$_[1] if defined $_[1]; $_[0]->{ass_dir}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
276 sub hashval{ $_[0]->{hashval}=$_[1] if defined $_[1]; $_[0]->{hashval}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
277 sub rmapfs{ $_[0]->{rmapfs}=$_[1] if defined $_[1]; $_[0]->{rmapfs}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
278 sub nconts{ $_[0]->{nconts}=$_[1] if defined $_[1]; $_[0]->{nconts}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
279 sub n50{ $_[0]->{n50}=$_[1] if defined $_[1]; $_[0]->{n50}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
280 sub maxlength{ $_[0]->{maxlength}=$_[1] if defined $_[1]; $_[0]->{maxlength}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
281 sub nconts1k{ $_[0]->{nconts1k}=$_[1] if defined $_[1]; $_[0]->{nconts1k}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
282 sub totalbp{ $_[0]->{totalbp}=$_[1] if defined $_[1]; $_[0]->{totalbp}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
283 sub totalbp1k{ $_[0]->{totalbp1k}=$_[1] if defined $_[1]; $_[0]->{totalbp1k}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
284 sub velvethout{ $_[0]->{velvethout}=$_[1] if defined $_[1]; $_[0]->{velvethout}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
285 sub velvetgout{ $_[0]->{velvetgout}=$_[1] if defined $_[1]; $_[0]->{velvetgout}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
286 sub sequences{ $_[0]->{sequences}=$_[1] if defined $_[1]; $_[0]->{sequences}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
287 sub assmfunc{ $_[0]->{assmfunc}=$_[1] if defined $_[1]; $_[0]->{assmfunc}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
288 sub assmfunc2{ $_[0]->{assmfunc2}=$_[1] if defined $_[1]; $_[0]->{assmfunc2}} |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
289 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
290 #assemblyScoreCalculator |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
291 sub calcAssemblyScore { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
292 use Safe; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
293 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
294 my $self = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
295 my $func = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
296 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
297 my $cpt = new Safe; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
298 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
299 #Basic variable IO and traversal |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
300 $cpt->permit(qw(null scalar const padany lineseq leaveeval rv2sv rv2hv helem hslice each values keys exists delete rv2cv)); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
301 #Comparators |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
302 $cpt->permit(qw(lt i_lt gt i_gt le i_le ge i_ge eq i_eq ne i_ne ncmp i_ncmp slt sgt sle sge seq sne scmp)); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
303 #Base math |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
304 $cpt->permit(qw(preinc i_preinc predec i_predec postinc i_postinc postdec i_postdec int hex oct abs pow multiply i_multiply divide i_divide modulo i_modulo add i_add subtract i_subtract)); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
305 #Binary math |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
306 $cpt->permit(qw(left_shift right_shift bit_and bit_xor bit_or negate i_negate not complement)); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
307 #Regex |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
308 $cpt->permit(qw(match split qr)); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
309 #Conditionals |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
310 $cpt->permit(qw(cond_expr flip flop andassign orassign and or xor)); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
311 #Advanced math |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
312 $cpt->permit(qw(atan2 sin cos exp log sqrt rand srand)); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
313 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
314 foreach my $key (keys %f_opts){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
315 print "\nkey: $key\tintname: ", $f_opts{$key}->{'intname'}, "\n" if $interested; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
316 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
317 $func =~ s/\b$key\b/$self->{$f_opts{$key}->{'intname'}}/g; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
318 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
319 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
320 my $r = $cpt->reval($func); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
321 warn $@ if $@; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
322 $self->{assmscore} = $r; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
323 unless($r =~ /^\d+/){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
324 warn "Optimisation function did not return a single float.\nOptimisation function was not evaluatable.\nOptfunc: $func"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
325 warn "Setting assembly score to 0\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
326 $self->{assmscore} = 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
327 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
328 if($r == 0){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
329 print STDERR "**********\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
330 print STDERR "Warning: Assembly score for assembly_id " . $self->{ass_id} . " is 0\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
331 print STDERR "You may want to consider choosing a different optimisation variable or function.\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
332 print STDERR "Current optimisation functions are ", $self->{assmfunc}, " for k value and ", $self->{assmfunc2}, " for cov_cutoff\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
333 print STDERR "**********\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
334 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
335 return 1; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
336 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
337 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
338 #getHashingDetails |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
339 sub getHashingDetails { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
340 my $self = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
341 unless(!$self->timestamph || !$self->pstringh){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
342 my $programPath = cwd; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
343 $self->pstringh =~ /^(\S+)\s+(\d+)\s+(.*)$/; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
344 $self->{ass_dir} = $programPath . "/" . $1; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
345 $self->{rmapfs} = -s $self->ass_dir . "/Roadmaps"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
346 $self->{hashval} = $2; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
347 $self->{readfilename} = $3; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
348 my @t = split /\n/, $self->velvethout; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
349 foreach(@t){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
350 if(/^(\d+).*total\.$/){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
351 $self->{sequences} = $1; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
352 last; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
353 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
354 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
355 return 1; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
356 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
357 return 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
358 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
359 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
360 #getAssemblyDetails |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
361 sub getAssemblyDetails { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
362 my $self = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
363 my $file = $self->ass_dir . "/contigs.fa"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
364 unless(!(-e $file)){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
365 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
366 my $all = &contigStats($file,1); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
367 my $large = &contigStats($file,1000); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
368 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
369 $self->{nconts} = defined $all->{numSeqs} ? $all->{numSeqs} : 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
370 $self->{n50} = defined $all->{n50} ? $all->{n50} : 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
371 $self->{maxlength} = defined $all->{maxLen} ? $all->{maxLen} : 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
372 $self->{nconts1k} = defined $large->{numSeqs} ? $large->{numSeqs} : 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
373 $self->{totalbp} = defined $all->{numBases} ? $all->{numBases} : 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
374 $self->{totalbp1k} = defined $large->{numBases} ? $large->{numBases} : 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
375 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
376 if($self->pstringg =~ m/cov_cutoff/){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
377 $self->calcAssemblyScore($self->{assmfunc2}); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
378 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
379 else { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
380 $self->calcAssemblyScore($self->{assmfunc}); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
381 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
382 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
383 return 1; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
384 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
385 return 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
386 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
387 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
388 #contigStats |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
389 #Original script fa-show.pl by Torsten Seemann (Monash University, Melbourne, Australia) |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
390 #Modified by Simon Gladman to suit. |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
391 sub contigStats { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
392 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
393 my $file = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
394 my $minsize = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
395 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
396 print "In contigStats with $file, $minsize\n" if $interested; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
397 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
398 my $numseq=0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
399 my $avglen=0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
400 my $minlen=1E9; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
401 my $maxlen=0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
402 my @len; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
403 my $toosmall=0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
404 my $nn=0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
405 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
406 my $in = Bio::SeqIO->new(-file => $file, -format => 'Fasta'); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
407 while(my $seq = $in->next_seq()){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
408 my $L = $seq->length; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
409 #check > minsize |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
410 if($L < $minsize){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
411 $toosmall ++; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
412 next; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
413 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
414 #count Ns |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
415 my $s = $seq->seq; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
416 my $n = $s =~ s/N/N/gi; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
417 $n ||= 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
418 $nn += $n; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
419 #count seqs and other stats |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
420 $numseq ++; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
421 $avglen += $L; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
422 $maxlen = $L if $L > $maxlen; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
423 $minlen = $L if $L < $minlen; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
424 push @len, $L; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
425 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
426 @len = sort { $a <=> $b } @len; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
427 my $cum = 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
428 my $n50 = 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
429 for my $i (0 .. $#len){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
430 $cum += $len[$i]; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
431 if($cum >= $avglen/2) { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
432 $n50 = $len[$i]; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
433 last; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
434 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
435 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
436 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
437 my %out; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
438 if($numseq > 0){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
439 $out{numSeqs} = $numseq; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
440 $out{numBases} = $avglen; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
441 $out{numOK} = ($avglen - $nn); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
442 $out{numNs} = $nn; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
443 $out{minLen} = $minlen; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
444 $out{avgLen} = $avglen/$numseq; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
445 $out{maxLen} = $maxlen; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
446 $out{n50} = $n50; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
447 $out{minsize} = $minsize; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
448 $out{numTooSmall} = $toosmall; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
449 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
450 else { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
451 $out{$numseq} = 0; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
452 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
453 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
454 print "Leaving contigstats!\n" if $interested; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
455 return (\%out); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
456 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
457 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
458 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
459 #toString method |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
460 sub toString { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
461 my $self = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
462 my $tmp = $self->toStringNoV(); |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
463 if(defined $self->velvethout){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
464 $tmp .= "Velveth Output:\n" . $self->velvethout() . "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
465 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
466 if(defined $self->velvetgout){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
467 $tmp .= "Velvetg Output:\n" . $self->velvetgout() . "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
468 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
469 $tmp .= "**********************************************************\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
470 return $tmp; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
471 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
472 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
473 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
474 #toStringNoV method |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
475 sub toStringNoV { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
476 my $self = shift; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
477 my $tmp = "********************************************************\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
478 if($self->ass_id()){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
479 $tmp .= "Assembly id: " . $self->ass_id(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
480 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
481 if($self->assmscore()){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
482 $tmp .= "Assembly score: " .$self->assmscore(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
483 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
484 if($self->timestamph()){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
485 $tmp .= "Velveth timestamp: " . $self->timestamph(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
486 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
487 if($self->timestampg()){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
488 $tmp .= "Velvetg timestamp: " . $self->timestampg(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
489 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
490 if(defined $self->versionh){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
491 $tmp .= "Velveth version: " . $self->versionh(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
492 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
493 if(defined $self->versiong){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
494 $tmp .= "Velvetg version: " . $self->versiong(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
495 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
496 if(defined $self->readfilename){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
497 $tmp .= "Readfile(s): " . $self->readfilename(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
498 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
499 if(defined $self->pstringh){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
500 $tmp .= "Velveth parameter string: " . $self->pstringh(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
501 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
502 if(defined $self->pstringg){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
503 $tmp .= "Velvetg parameter string: " . $self->pstringg(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
504 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
505 if(defined $self->ass_dir){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
506 $tmp .= "Assembly directory: " . $self->ass_dir(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
507 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
508 if(defined $self->hashval){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
509 $tmp .= "Velvet hash value: " . $self->hashval(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
510 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
511 if(defined $self->rmapfs){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
512 $tmp .= "Roadmap file size: " . $self->rmapfs(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
513 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
514 if(defined $self->sequences){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
515 $tmp .= "Total number of sequences: " . $self->sequences(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
516 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
517 if(defined $self->nconts){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
518 $tmp .= "Total number of contigs: " . $self->nconts(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
519 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
520 if(defined $self->n50){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
521 $tmp .= "n50: " . $self->n50(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
522 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
523 if(defined $self->maxlength){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
524 $tmp .= "length of longest contig: " . $self->maxlength(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
525 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
526 if(defined $self->totalbp){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
527 $tmp .= "Total bases in contigs: " . $self->totalbp(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
528 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
529 if(defined $self->nconts1k){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
530 $tmp .= "Number of contigs > 1k: " . $self->nconts1k(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
531 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
532 if(defined $self->totalbp1k){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
533 $tmp .= "Total bases in contigs > 1k: " . $self->totalbp1k(). "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
534 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
535 if($self->pstringh =~ /Pair/ && defined $self->pstringg && $self->pstringg =~ /-exp_cov/){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
536 $tmp .= "Paired Library insert stats:\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
537 my @x = split /\n/, $self->velvetgout; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
538 foreach(@x){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
539 chomp; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
540 if(/^Paired-end library \d+ has/){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
541 $tmp .= "$_\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
542 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
543 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
544 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
545 $tmp .= "**********************************************************\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
546 return $tmp; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
547 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
548 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
549 sub opt_func_toString { |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
550 my $out = "\nVelvet optimiser assembly optimisation function can be built from the following variables.\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
551 foreach my $key (sort keys %f_opts){ |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
552 $out .= "\t$key = " . $f_opts{$key}->{'desc'} . "\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
553 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
554 $out .= "Examples are:\n\t'Lbp' = Just the total basepairs in contigs longer than 1kb\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
555 $out .= "\t'n50*Lcon' = The n50 times the number of long contigs.\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
556 $out .= "\t'n50*Lcon/tbp+log(Lbp)' = The n50 times the number of long contigs divided\n\t\tby the total bases in all contigs plus the log of the number of bases\n\t\tin long contigs.\n"; |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
557 return $out |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
558 } |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
559 |
7363fee7f20c
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
konradpaszkiewicz
parents:
diff
changeset
|
560 1; |