make a link data.frame for biobakery mapping files input
Source:R/import-utils.R
linkBiobakeryMap.Rd
make a link data.frame for biobakery mapping files input
Arguments
- map
Character
, result fromreadLines()
on uncompressed humann mapping files.
Value
a two-column data.frame
that can be converted into an adjacency
matrix used as input for weaveWeb()
.
Examples
# some dummy input, as a character vector of IDs separated by tabs.
x <- c("x_1\ty_1\ty_2\ty_4", "x_2\ty_1\ty_3", "x_3\ty_2\ty_y")
linkBiobakeryMap(x)
#> id.x id.y
#> 1 x_1 y_1
#> 2 x_1 y_2
#> 3 x_1 y_4
#> 4 x_2 y_1
#> 5 x_2 y_3
#> 6 x_3 y_2
#> 7 x_3 y_y