MyNixOS website logo
Description

Simulating Triad Genomewide Genotypes.

Simulate genotypes for case-parent triads, case-control, and quantitative trait samples with realistic linkage diequilibrium structure and allele frequency distribution. For studies of epistasis one can simulate models that involve specific SNPs at specific sets of loci, which we will refer to as "pathways". TriadSim generates genotype data by resampling triad genotypes from existing data. The details of the method is described in the manuscript under preparation "Simulating Autosomal Genotypes with Realistic Linkage Disequilibrium and a Spiked in Genetic Effect" Shi, M., Umbach, D.M., Wise A.S., Weinberg, C.R.

TriadSim

TriadSim is a package that can simulate genotypes for case-parent triads, case-control, and quantitative trait samples with realistic linkage diequilibrium structure and allele frequency distribution. For studies of epistasis one can simulate models that involve specific SNPs at specific sets of loci, which we will refer to as "pathways". TriadSim generates genotype data by resampling triad genotypes from existing data. It takes genotypes in PLINK format as the input files. The genotypes for the mothers, fathers, and children are in separate files. The mothers, fathers, and children must be from the same set of triad families although the ordering of the families can be different for the three sets of data. After reading in the genotypes, a sorting step will reorder the families so that the three individuals in each family can realign.

Installation

This pacakge can be installed from CRAN.

A quick demo

library(TriadSim)
m.file <- paste(system.file(package = "TriadSim"),'/extdata/pop1_4chr_mom',sep='')
f.file <- paste(system.file(package = "TriadSim"),'/extdata/pop1_4chr_dad',sep='')
k.file <- paste(system.file(package = "TriadSim"),'/extdata/pop1_4chr_kid',sep='')
input.plink.file <- c(m.file, f.file, k.file)

TriadSim(input.plink.file, out.put.file=paste(tempdir(),'triad',sep=''), fr.desire=0.05,pathways=list(1:4,5:8),n.ped=1000, N.brk=3, target.snp=NA,P0=0.001,is.OR=FALSE,risk.exposure= 1,risk.pathway.unexposed=c(1.5, 2), risk.pathway.exposed=c(1.5, 2), is.case=TRUE, e.fr=NA, pop1.frac=NA, P0.ratio=1,rcmb.rate, no_cores=NA)
#> [1]  21 118 121 140 155 168 218 383
#> coercing object of mode  numeric  to SnpMatrix
#> Writing FAM file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad1.fam 
#> Writing extended MAP file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad1.bim 
#> Writing BED file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad1.bed (SNP-major mode)
#> coercing object of mode  numeric  to SnpMatrix
#> Writing FAM file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad8.fam 
#> Writing extended MAP file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad8.bim 
#> Writing BED file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad8.bed (SNP-major mode)
#> coercing object of mode  numeric  to SnpMatrix
#> Writing FAM file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad17.fam 
#> Writing extended MAP file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad17.bim 
#> Writing BED file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad17.bed (SNP-major mode)
#> coercing object of mode  numeric  to SnpMatrix
#> Writing FAM file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad20.fam 
#> Writing extended MAP file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad20.bim 
#> Writing BED file to C:\Users\shi2\AppData\Local\Temp\2\RtmpCA8mlGtriad20.bed (SNP-major mode)

For more examples see the vignette in the package.

Metadata

Version

0.3.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows