@@ -167,30 +167,6 @@ test_that("transformAssay", {
167167 # Compare
168168 expect_equal(mat , mat_comp )
169169
170- # Tests rclr
171- # Calc RCLRs
172- assay <- assay(tse , " counts" )
173- suppressWarnings(
174- mat <- assays(mia :: transformAssay(tse , assay.type = " counts" , method = " rclr" ))$ rclr
175- )
176-
177- suppressWarnings(
178- mat_comp <- apply(as.matrix(assay ), 2 , FUN = function (x ){
179- temp <- log(x )
180- temp [is.infinite(temp )] <- NA
181- temp <- log(x ) - mean(temp , na.rm = TRUE )
182- temp [is.infinite(temp )] <- 0
183- return (temp )
184- })
185- )
186-
187- # Round
188- mat <- round(mat , 4 )
189- mat_comp <- round(mat_comp , 4 )
190-
191- # Compare
192- expect_equal(mat , mat_comp , check.attributes = FALSE )
193-
194170 # Expect that error occurs
195171 expect_error(mia :: transformAssay(tse , method = " clr" ))
196172
@@ -213,17 +189,6 @@ test_that("transformAssay", {
213189 # One missing value
214190 assay(tse , " na_values" )[4 , 5 ] <- NA
215191
216- # clr robust transformations
217- test <- assay(transformAssay(tse , method = " rclr" , assay.type = " test" ), " rclr" )
218- test2 <- assay(transformAssay(tse , method = " rclr" , assay.type = " test2" ), " rclr" )
219-
220- # Removes first rows
221- test <- test [- 1 , ]
222- test2 <- test2 [- 1 , ]
223-
224- # Expect that under 10 values are unequal. Values have only one decimal.
225- expect_true(sum(round(test , 1 ) != round(test2 , 1 ), na.rm = TRUE ) < 10 )
226-
227192 tse <- transformAssay(tse , method = " relabundance" )
228193 # Expect error when counts and zeroes
229194 expect_error(
@@ -356,7 +321,7 @@ test_that("transformAssay", {
356321 attr(actual , " parameters" )$ pseudocount <- NULL
357322 compare <- vegan :: decostand(assay(tse , " relabundance" ), method = " rclr" ,
358323 MARGIN = 2 )
359- expect_equal(actual , compare )
324+ expect_equal(actual , compare , check.attributes = FALSE )
360325
361326 # alr
362327 tse <- transformAssay(tse , assay.type = " relabundance" , method = " alr" ,
0 commit comments