read_single_mapstat: Import a mapstat file

Description Usage Arguments Value

View source: R/mapstat_import.R

Description

Import a mapstat file

Usage

1
read_single_mapstat(path, shorten_sample_id = TRUE, engine = "readr")

Arguments

path

Path to file

shorten_sample_id

Should the sample_id variable in the output be shortened?

If TRUE, "samplename" is returned instead of the full path "foo/bar/samplename.mapstat". IfFALSE, the full path is returned.

engine

Which function should be used to read in the files?

The default, "readr", uses the read_delim() function from the readr package. You can also choose "fread", which will use fread() from the data.table package.

"readr" is a bit slower, but throws more useful warnings. You can cut the reading time by about 30 to 40 percent with "fread".

Value

A data frame containing information from the imported mapstat file. The (by default shortened) filename is added in a column called sample_id.


roeder/mapstatHelpers documentation built on Nov. 5, 2019, 3:14 a.m.