readMFVFile: Read the raw mutation data with the mutation feature vector...

Description Usage Arguments Examples

Description

The mutation feature vector format is tab-delimited format, where the 1st column shows the name of samples, and the 2nd-last columns show the values of mutation features.

When type = "independent", the mutation feature should be equal to (numBases + as.integer(trDir))-dimensional vector, representing substitution patterns (1 to 6, C>A, C>G, C>T, T>A, T>C and T>G), 5' and 3' flanking bases (1 to 4, A, C, G and T), and transcription direction (1 to 2, + and -), in this order.

When type = "full", the mutation feature should be equal to 1-dimensional vector, taking the value of 1 to 6 * 4^{(numBases - 1)} * 2^{as.integer(trDir)}. For the coding of the number to the actual mutation pattern (substitution patterns, flanking bases, transcription direction), seeing the source code of getMutationFeatureVector may be helpful.

Also, this function usually can accept compressed files (e.g., by gzip, bzip2 and so on) when using recent version of R.

Usage

1
readMFVFile(infile, numBases = 3, trDir = FALSE, type = "custom")

Arguments

infile

the path for the input file for the mutation feature data.

numBases

the number of upstream and downstream flanking bases (including the mutated base) to take into account.

trDir

the index representing whether transcription direction is considered or not.

type

this argument can take either "independent", "full", or "custom". The values "independent" or "full" can be set only when the input file is decently formatted.

Examples

1
2
3
We have example data in the pmsignature package;
inputFile <- system.file("extdata/Hoang_MFVF.ind.txt", package="pmsignature")
G <- readMFVFile(inputFile, numBases = 5, type="independent", trDir=TRUE)

friend1ws/pmsignature documentation built on May 16, 2019, 3:27 p.m.