Given a list with data and results (resulting e.g. from compcodeR version 0.1.0), convert it to a phyloCompData object.

convertListTophyloCompData(inp.list)

Arguments

inp.list

A list with data and results, e.g. generated by compcodeR version 0.1.0.

Author

Charlotte Soneson, Paul Bastide

Examples

tree <- ape::read.tree(
  text = "(((A1:0,A2:0,A3:0):1,B1:1):1,((C1:0,C2:0):1.5,(D1:0,D2:0):1.5):0.5);"
  )
count.matrix <- round(matrix(1000*runif(8000), 1000))
sample.annotations <- data.frame(condition = c(1, 1, 1, 1, 2, 2, 2, 2),
                                 id.species = c("A", "A", "A", "B", "C", "C", "D", "D"))
info.parameters <- list(dataset = "mydata", uID = "123456")
length.matrix <- round(matrix(1000*runif(8000), 1000))
colnames(count.matrix) <- colnames(length.matrix) <- rownames(sample.annotations) <- tree$tip.label
convertListTophyloCompData(list(count.matrix = count.matrix,
                                sample.annotations = sample.annotations,
                                info.parameters = list(dataset = "mydata", 
                                                       uID = "123456"),
                                tree = tree,
                                length.matrix = length.matrix))
#> An object of class phyloCompData 
#> Dataset name: mydata 
#> Number of samples: 8 
#> Number of variables: 1000 
#> Number of random outliers: 0 
#> Number of single outliers: 0 
#> Number of known truly differentially expressed genes: 0 
#> No differential expression analysis has been performed. 
#> 
#> count.matrix:
#>       A1  A2  A3  B1  C1  C2
#> [1,] 792 428 133 465 646 375
#> [2,] 750 281  24 121 545 526
#> [3,] 926 800 951 746 794  89
#> [4,] 713 635 778 694 130 216
#> [5,] 545 408   3 905 985 979
#> [6,] 602 561 933 360  81 632
#> + 994 rows and 2 cols...
#> 
#> sample.annotations:
#>    condition id.species
#> A1         1          A
#> A2         1          A
#> A3         1          A
#> B1         1          B
#> C1         2          C
#> C2         2          C
#> + 2 rows...
#> 
#> variable.annotations:
#> data frame with 0 columns and 0 rows
#> 
#> Phylogenetic tree:
#> 
#> Phylogenetic tree with 8 tips and 6 internal nodes.
#> 
#> Tip labels:
#>   A1, A2, A3, B1, C1, C2, ...
#> 
#> Rooted; includes branch lengths.
#> 
#> length.matrix:
#>       A1  A2  A3  B1  C1  C2
#> [1,] 625  85 749 426 264 885
#> [2,] 184 452 984 982 437 631
#> [3,] 505 746 423 387 544 562
#> [4,] 390 703 250 560 901  24
#> [5,] 726 510 589 523 623 567
#> [6,] 568 929 780 923  33 383
#>