Skip to contents

Construct a multiOmicDataSet object from tsv files.

Usage

create_multiOmicDataSet_from_files(
  sample_meta_filepath,
  gene_counts_filepath,
  count_type = "raw",
  sample_id_colname = "sample_id"
)

Arguments

sample_meta_filepath

path to tsv file with sample IDs and metadata for differential analysis.

gene_counts_filepath

path to tsv file of expected gene counts from RSEM.

count_type

type to assign the values of gene_counts_filepath to in the counts slot

sample_id_colname

name of the column in sample_meta_filepath that contains the sample IDs

Value

multiOmicDataSet object

Examples

moo <- create_multiOmicDataSet_from_files(
  sample_meta_filepath = system.file("extdata",
    "sample_metadata.tsv.gz",
    package = "MOSuite"
  ),
  gene_counts_filepath = system.file("extdata",
    "RSEM.genes.expected_count.all_samples.txt.gz",
    package = "MOSuite"
  )
)
#> Rows: 58929 Columns: 6
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: "\t"
#> chr (2): gene_id, GeneName
#> dbl (4): KO_S3, KO_S4, WT_S1, WT_S2
#> 
#>  Use `spec()` to retrieve the full column specification for this data.
#>  Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> Rows: 4 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: "\t"
#> chr (2): sample_id, condition
#> 
#>  Use `spec()` to retrieve the full column specification for this data.
#>  Specify the column types or set `show_col_types = FALSE` to quiet this message.
moo@counts$raw %>% head()
#> # A tibble: 6 × 5
#>   gene_id                    KO_S3 KO_S4 WT_S1 WT_S2
#>   <glue>                     <dbl> <dbl> <dbl> <dbl>
#> 1 ENSG00000121410.11|A1BG        0     0     0     0
#> 2 ENSG00000268895.5|A1BG-AS1     0     0     0     0
#> 3 ENSG00000148584.15|A1CF        0     0     0     0
#> 4 ENSG00000175899.14|A2M         0     0     0     0
#> 5 ENSG00000245105.3|A2M-AS1      0     0     0     0
#> 6 ENSG00000166535.20|A2ML1       0     0     0     0
moo@sample_meta
#> # A tibble: 4 × 2
#>   sample_id condition
#>   <chr>     <chr>    
#> 1 KO_S3     knockout 
#> 2 KO_S4     knockout 
#> 3 WT_S1     wildtype 
#> 4 WT_S2     wildtype