Browse code

Adapted handling of signs of gap penalties; version number bumped to 0.99.7

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/msa@102560 bc3139a8-67e5-0310-9ffc-ced21a209358

Ulrich Bodenhofer authored on 16/04/2015 08:25:08
Showing4 changed files

... ...
@@ -1,8 +1,8 @@
1 1
 Package: msa
2 2
 Type: Package
3 3
 Title: Multiple Sequence Alignment
4
-Version: 0.99.6
5
-Date: 2015-04-15
4
+Version: 0.99.7
5
+Date: 2015-04-16
6 6
 Author: Enrico Bonatesta, Christoph Horejs-Kainrath, Ulrich Bodenhofer
7 7
 Maintainer: Ulrich Bodenhofer <bodenhofer@bioinf.jku.at>
8 8
 Description: This package provides a unified R/Bioconductor interface to the
... ...
@@ -17,18 +17,15 @@ URL: http://www.bioinf.jku.at/software/msa/
17 17
 License: GPL (>= 2)
18 18
 Copyright: See file inst/COPYRIGHT
19 19
 Depends: R (>= 3.1.0), methods, Biostrings (>= 2.30.0)
20
-Imports: Rcpp (>= 0.11.1), BiocGenerics, IRanges (>= 1.20.0),
21
-        S4Vectors, tools
20
+Imports: Rcpp (>= 0.11.1), BiocGenerics, IRanges (>= 1.20.0), S4Vectors,
21
+	 tools
22 22
 Suggests: Biobase, knitr
23 23
 LinkingTo: Rcpp
24 24
 SystemRequirements:
25 25
 VignetteBuilder: knitr
26 26
 LazyLoad: yes
27
-Collate: AllClasses.R AllGenerics.R params-methods.R version-methods.R
28
-        helperFunctions.R inputChecks.R convertRows.R msaPrettyPrint.R
29
-        print-methods.R show-methods.R msa.R msaMuscle.R msaClustalW.R
30
-        msaClustalOmega.R
31
-biocViews: MultipleSequenceAlignment, Alignment, MultipleComparison,
32
-        Sequencing
33
-NeedsCompilation: yes
34
-Packaged: 2015-04-15 13:16:43 UTC; bodenhof
27
+Collate: AllClasses.R AllGenerics.R params-methods.R version-methods.R 
28
+         helperFunctions.R inputChecks.R convertRows.R msaPrettyPrint.R
29
+	 print-methods.R show-methods.R msa.R msaMuscle.R msaClustalW.R 
30
+         msaClustalOmega.R
31
+biocViews: MultipleSequenceAlignment, Alignment, MultipleComparison, Sequencing
... ...
@@ -102,7 +102,7 @@ checkGapOpening <- function(gapOpening, type, substitutionMatrix,
102 102
     } else {
103 103
         stop("The parameter gapOpening should be a numeric!")
104 104
     }
105
-    return(gapOpening)
105
+    return(abs(gapOpening))
106 106
 }
107 107
 
108 108
 ###############################################################################
... ...
@@ -136,7 +136,7 @@ checkGapOpening2 <- function(gapOpening, substitutionMatrix,
136 136
     } else {
137 137
         stop("The parameter gapOpening should be a numeric!")
138 138
     }
139
-    return(gapOpening)
139
+    return(abs(gapOpening))
140 140
 }
141 141
 
142 142
 ###############################################################################
... ...
@@ -170,7 +170,7 @@ checkGapExtension <- function(gapExtension, type, substitutionMatrix,
170 170
         stop("The parameter gapExtension should be a numeric!")
171 171
     }
172 172
 
173
-    return(gapExtension)
173
+    return(abs(gapExtension))
174 174
 }
175 175
 
176 176
 ###############################################################################
... ...
@@ -156,7 +156,7 @@ msaClustalW <- function(inputSeqs,
156 156
     ##The gap open score. Must be negative
157 157
 
158 158
     gapOpening <- checkGapOpening(gapOpening, type, substitutionMatrix,
159
-                                  defaultDNAValue=-15.0, defaultAAValue=-10.0)
159
+                                  defaultDNAValue=15.0, defaultAAValue=10.0)
160 160
 
161 161
     ################
162 162
     # gapExtension #
... ...
@@ -164,8 +164,8 @@ msaClustalW <- function(inputSeqs,
164 164
     ##The gap extend score. Must be negative
165 165
 
166 166
     gapExtension <- checkGapExtension(gapExtension, type, substitutionMatrix,
167
-                                      defaultDNAValue=-6.66,
168
-                                      defaultAAValue=-0.2)
167
+                                      defaultDNAValue=6.66,
168
+                                      defaultAAValue=0.2)
169 169
 
170 170
     ############
171 171
     # maxiters #
... ...
@@ -262,24 +262,24 @@ msaMuscle <- function(inputSeqs,
262 262
     ##le: -2.9
263 263
     ##sp: -1439
264 264
     ##sv: -300
265
-    ##spn_dna:-400
266
-    ##spn_rna:-420
265
+    ##spn_dna:400
266
+    ##spn_rna:420
267 267
 
268 268
     if (params$le) {
269
-        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, -2.9)
269
+        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, 2.9)
270 270
     }
271 271
     if (params$sp) {
272
-        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, -1439)
272
+        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, 1439)
273 273
     }
274
-        if (params$sv) {
275
-        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, -300)
274
+    if (params$sv) {
275
+        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, 300)
276 276
     }
277 277
     if (params$spn) {
278 278
         if (identical(type,"dna")) {
279
-        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, -400)
279
+        gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, 400)
280 280
         }
281 281
         if (identical(type,"rna")) {
282
-            gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, -420)
282
+            gapOpening <- checkGapOpening2(gapOpening, substitutionMatrix, 420)
283 283
         }
284 284
         if (identical(type,"protein")) {
285 285
            stop("If you use sequences of type \"protein\", \n",
... ...
@@ -299,7 +299,6 @@ msaMuscle <- function(inputSeqs,
299 299
     ##type= "rna" => gapExtension=0
300 300
     ##type= "protein" 0> gapExtension=???
301 301
 
302
-
303 302
     gapExtension <- checkGapExtension(gapExtension,
304 303
                                       type, substitutionMatrix, 0, 0)
305 304