pre_process: Pre-process methylation array data from (raw) .idat files to...

View source: R/pre_process.R

pre_processR Documentation

Pre-process methylation array data from (raw) .idat files to segment & log2r intensity files calculated by CONUMEE.

Description

construct RGChannelSet in parallel using foreach

Generate Qc reports

Usage

pre_process(
  targets,
  purity = NULL,
  query = T,
  RGset = T,
  out = "./analysis/intermediate/",
  idats_folder = NULL,
  subf = "IDATS/",
  folder = NULL,
  ncores = NULL,
  arraytype = NULL,
  copy = FALSE,
  frac = 0.1,
  pval = 0.01,
  remove_sex = TRUE,
  sampGroups = NULL
)

pre_process.myLoad(
  targets,
  folder,
  arraytype = "450K",
  ncores = NULL,
  files = NULL,
  copy = FALSE
)

qc(
  rgSet,
  sampGroups = NULL,
  sampNames = "Sample_Name",
  qc_folder = "analysis/intermediate/QC/"
)

purify(myLoad, knn = 5)

queryfy(
  targets,
  rgSet,
  sampGroups = NULL,
  sampNames = "Sample_Name",
  frac = 0.1,
  pval = 0.01,
  remove_sex = TRUE,
  arraytype = NULL,
  qc_folder = "analysis/intermediate/QC"
)

Arguments

targets

A sample sheet with the required fields for ChAMP to load files.

purity

Whether or not you want purity imputed by Rfpurify. Default=TRUE.

query

Set to TRUE when you are only interested in imputing purity. Default=TRUE

RGset

Whether you want normalised "RGChannelSet" or "RGChannelSetExtended" to be saved or not. path=out

out

Results folder to store the normalized and clean RGset.

idats_folder

Folder containing idats. It will try to guess which idat belongs to which row in the targets data.frame.

subf

Subfolder inside results folder where IDAT files will be copied.

folder

this directory will be created as the combination of out and subf. if you save the csv file inside this folder it will be used by minfi::read.450k.sheet.

ncores

number of cores to use.

arraytype

Methylation array type

copy

Change to TRUE if you want to copy files to idats folder. Useful when working in HPC and idats are in ISILON.

frac

Fraction of faulty probes (P-value > pval ) allowed. default 0.1

pval

P-value cutoff. default 0.01

remove_sex

Boolean. Should sex chromosomes be removed? default = TRUE

sampGroups

Groups for qc report & plots color category.

files

Files

rgSet

Input RGChannelSet object with raw idats and metadata.

sampNames

Sample names to be used for labels.

qc_folder

Path to location where qc_report and plot will be saved.

myLoad

a RGset as returned by minfi::read.metharray.exp. will use this as basedir to load the idats. default is results/IDATS/.

knn

number of neighbors for knn algorithm

Value

Log2r intensities ready to be analysed with conumee.

RGset

Qc plots

Normalized & filtered RGset.

Author(s)

izar de Villasante

izar de Villasante

Examples


data("TrainingSet_Sample_sheet")
ss<-TrainingSet_Sample_sheet[1:56,]
pre_process(ss)

ijcBIT/cnv.methyl documentation built on Jan. 10, 2023, 7:51 a.m.