mergeBatches: Merges data from several batches for cohort analysis

View source: R/cohortAnalyseBatch.R

mergeBatchesR Documentation

Merges data from several batches for cohort analysis

Description

Merges data from several batches for cohort analysis

Usage

mergeBatches(paths, targetMetaDataFile, targetRdirectory, cpus = 1)

Arguments

paths

data.frame: One row for each batch to be merged.

targetMetaDataFile

character: Path to where the merged metaData will be stored. This also affect where a downstream cohort analysis is stored.

targetRdirectory

character: Path to where the Rdata will be stored.

Details

This function merges the data from multiple batches, setting them up for a joint cohort analysis. Note that this is only for the purpose of a downstream cohort analysis. The output R directory cannot be run as a batch Rdirectory.

Examples

## Not run: 
paths = data.frame('metaDataFile' = c('~/superFreq/myFirstBatch/metaData.txt', '~/superFreq/mySecondBatch/metaData.txt'),
           'Rdirectory'= c('~/superFreq/myFirstBatch/R', '~/superFreq/myFirstBatch/R'))

targetMetaDataFile = '~/superFreq/mergedAnalysis/metaData.txt'
targetRdirectory = '~/superFreq/mergedAnalysis/R'

mergeBatches(paths, targetMetaDataFile, targetRdirectory)

outputDirectories = list('Rdirectory'=targetRdirectory)
cohortAnalyseBatch(targetMetaDataFile, outputDirectories, cpus=6, genome='hg19')


## End(Not run)

ChristofferFlensburg/superFreq documentation built on Nov. 15, 2023, 6:15 a.m.