This reads an input file in a LEfSe input format

read.lefse(filename = "data.txt", rows.meta = 1, row.samples = 2)

Arguments

filename

name of the input file in a LEfSe input format

rows.meta

specifies in which rows medata variables are stored

row.samples

specifies in which row sample names are stored

Value

a list with two elements:

  • feat a features matrix

  • meta a metadate matrix

Examples


fn.in.lefse<- system.file("extdata",
"LEfSe_crc_zeller_msb_mocat_specI.tsv",package = "SIAMCAT")
meta.and.features <- read.lefse(fn.in.lefse, rows.meta = 1:6,
row.samples = 7)
meta <- meta.and.features$meta
feat <- meta.and.features$feat
label <- create.label(meta=meta, label="label", case = "cancer")
#> Label used as case:
#>    cancer
#> Label used as control:
#>    healthy
#> + finished create.label.from.metadata in 0.002 s
siamcat <- siamcat(feat=feat, label=label, meta=meta)
#> + starting validate.data
#> +++ checking overlap between labels and features
#> + Keeping labels of 141 sample(s).
#> +++ checking sample number per class
#> +++ checking overlap between samples and metadata
#> + finished validate.data in 0.058 s