Creates a set of artificial BAM files and supplementary files which can be used to test run the pipeline. The BAMs contain reads aligned only to one human chromosome, with methylation effects embedded for simulated age and case-control status.
1 2 3 4 5 6
Directory for generated RaMWAS project files and BAMs.
Number of samples/BAMs to create.
Number of reads in each BAM file.
Number of CpGs in the generated genome (with a single chromosome).
Random number generator seed for consistency of the output.
Number of CPU cores to use for data generation.
The function generates a number of files within
bam_list.txt - list of created BAM files.
To be used in
filebam2sample parameters in the pipeline.
covariates.txt - table with age and sex status covariates.
For use in
filecovariates parameter in the pipeline.
Single_chromosome.rds - CpG location file
with the selected chromosome only.
bams - directory with all the BAM files.
The generated BAMs have 600 CpGs affected by
namely fully methylated or not methylated at all, depending on
The methylation level of 1% of all CpGs is affected by age.
The methylation of those CpGs is
The age is generated randomly in the range from 20 to 80.
The function creates multiple files but returns no value.
Andrey A Shabalin [email protected]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
### Location for the artificial project dr = paste0(tempdir(), "/simulated_project") ramwas0createArtificialData( dr, nsamples = 4, nreads = 10e3, ncpgs = 1e3) # Artificial project files created in: dr # The generated files are:" as.matrix(list.files(dr, recursive=TRUE)) ### Clean up unlink(paste0(dr,"/*"), recursive=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.