extractGenome: Extraction & assembly module

View source: R/extractGenome.r

extractGenomeR Documentation

Extraction & assembly module

Description

Extracting genome fragment from candidates based the results of genome optimization and then assembling all fragments so that produce optimized genome(virtual genome).

Usage

extractGenome(hmp,binsInfo,ID = NULL,designInfo,output = NULL,
              bins,extractContent ="Genotype")

Arguments

hmp

The genetic data in hapmap format.

binsInfo

Data frame, including bins index, start, end, length of bins locus.

ID

A character array regarding sample IDs for 'hmp', if NULL, the 'hmp' data must involve header.

designInfo

Outputs of genomeOptimization, a matrix consists of sample IDs regarding the fragment source among condidates at each bin locus.

output

The prefix of output files regarding the assembled genome.

bins

Results of IBD analysis (bins matrix), each row represents a bin fragment as well as each column represents each sample.

extractContent

Character, the content of virtual genome, "Bin" for bin source well "Genotype" for genetic data, default "Genotype".

Value

A matrix involves of three optimal genomes (optimal: max, moderate: med and poor: min) If output is defined, the assembled genome will be written to files with suffix ".G" or ".bin".

Author(s)

Qian Cheng, Shuqin Jiang, Xiangfeng Wang

See Also

GOVS

Examples

## Not run !
## load test data
# Phenotypic data:
data(phe)
# bins data:
data(bins)
# genomic data:
data(MZ)
# bins info 
data(binsInfo)

# 1.run example for EW trait (write result files to local)
genomeOptimization(pheno = phe,trait = "EW",bins = bins,output = "MZ_test_1404")

# 2.run example for EW trait (get the results of genomeOptimization in R)
GO_Res <- genomeOptimization(pheno = phe,trait = "EW",bins = bins,output = NULL)

# 3.extract and assemble virtual genome (genomic genome)
Vgenome <- extractGenome(hmp = MZ,binsInfo = binsInfo,designInfo = GO_Res$overall)

# 4.extract and assemble virtual genome (bin source genome)
Vbin <- extractGenome(hmp = MZ,binsInfo = binsInfo,designInfo = GO_Res$overall,
                      bins = bins,extractContent = "BINsource")

GOVS-pack/GOVS documentation built on Oct. 9, 2022, 8:29 a.m.