Description Usage Arguments Value Examples
Reads the output of midas_merge.py
1 | read_midas_data(midas_dir, map = NULL, genes = NULL, cds_only = TRUE)
|
midas_dir |
Directory where the output from midas_merge.py is located. It must include files: 'snps_info.txt', 'snps_depth.txt' and 'snps_freq.txt'. |
map |
A data table associating samples in the MIDAS otput to groups. It must have an 'sample' and a 'Group' column. |
genes |
The list of genes that are to be tested. Must correspond to entries in the 'genes_id' column of the 'snps_info.txt' file. If NULL, all genes will be tested. |
cds_only |
If TRUE, it will remove all sites that do not have a gene_id. If a gene list is passed its effect is redundant. |
A list with three data tables: info, freq and depth, corresponding to the three files from MIDAS
1 2 3 4 5 6 7 8 9 10 11 12 | library(HMVAR)
library(tidyverse)
# Get file paths
midas_dir <- system.file("toy_example/merged.snps/", package = "HMVAR")
map <- read_tsv(system.file("toy_example/map.txt", package = "HMVAR"),
col_types = cols(.default = col_character())) %>%
select(sample = ID, Group)
# Read data
midas_data <- read_midas_data(midas_dir = midas_dir, map = map, cds_only = TRUE)
midas_data
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.