Description Usage Arguments Details Value Author(s) See Also Examples
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 | ramwas0createArtificialData(dir,
nsamples = 20,
nreads = 1e6,
ncpgs = 500e3,
randseed = 18090212,
threads = 1)
|
dir |
Directory for generated RaMWAS project files and BAMs. |
nsamples |
Number of samples/BAMs to create. |
nreads |
Number of reads in each BAM file. |
ncpgs |
Number of CpGs in the generated genome (with a single chromosome). |
randseed |
Random number generator seed for consistency of the output. |
threads |
Number of CPU cores to use for data generation. |
The function generates a number of files within dir
directory.
bam_list.txt
- list of created BAM files.
To be used in filebamlist
and
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 sex
,
namely fully methylated or not methylated at all, depending on sex
.
The methylation level of 1% of all CpGs is affected by age.
The methylation of those CpGs is
equal to age/100
or 1-age/100
.
The age is generated randomly in the range from 20 to 80.
The function creates multiple files but returns no value.
Andrey A Shabalin andrey.shabalin@gmail.com
See vignettes: browseVignettes("ramwas")
.
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.