Creates a copy number alteration matrix from segment files.
facets.dat( seg = NULL, filenames = NULL, path = NULL, patients = NULL, min.purity = 0.3, epsilon = 0.005, adaptive = FALSE )
seg | a segmentation file containing the segmentation information of multiple patients |
---|---|
filenames | the names of the segment files to be loaded and processed (Note must end in ".Rdata"). |
path | the relative path to the files folder from your current directory |
patients | the names of the patients of the respective filenames. Default simply 1 to number of files. |
min.purity | the minimum purity of the sample required to be kept in the final dataset. Default is 0.3. |
epsilon | level of unions when aggregating segments between. Default is 0.005. |
adaptive | CNregions option to create adaptive segments. Default is FALSE. |
out.cn : a matrix of the union of all segment files with patients as rows and segments as columns
ploidy : a vector of the ploidy values for the patients in out.cn (as in facets output)
purity : a vector of the purity values for the patients in out.cn (as in facets output)
FGAs : a vector of the fragment of genome altered values for the patients in out.cn (only when tcn an lcn are available)
library(gnomeR) library(dplyr) library(dtplyr) patients <- as.character(unique(mut$Tumor_Sample_Barcode))[1:1000] patients.seg <- as.character(unlist(clin.sample %>% filter(Sample.Identifier %in% patients, as.numeric(as.character(Tumor.Purity)) > 30) %>% select(Sample.Identifier))) facet <- facets.dat(seg = seg, patients=patients.seg[0:100])