LoadVcf: A function to get a filtered (and possibly splitted)...

Description Usage Arguments Value See Also Examples

Description

A function to get a filtered (and possibly splitted) vcfR::VCF object from a VCF file.

Usage

1
2
LoadVcf(file.path, survival = NULL, only.biallelic = TRUE,
  only.snp = TRUE, verbose = TRUE)

Arguments

file.path

The path to the VCF file you want to load

survival

Optional. A logical vector for splitting the data into two vcfR::VCF objects. The length of the vector must match the number of samples in the VCF file.

only.biallelic

Logical. If TRUE (default), only biallelic variants will be loaded.

only.snp

Logical. If TRUE (default), the indel variants will be omited.

verbose

Logical. If TRUE (default), report status of the process along the execution.

Value

A vcR:VCF object or a list of vcfR:VCF objects if a survival vector was provided. If a list is returned, list$alive is the vcfR::VCF object containing the samples which the position corresponded with a TRUE in the survival vector. The other samples are contained in list$dead as an other vcfR::VCF object.

See Also

For more information, see SplitVcf, RmNonBiallelics and RmIndels which this function bind.

Examples

1
2
3
4
5
6
7
## Not run: 
LoadVCF("example.vcf")
LoadVCF("example.vcf", survival = c(TRUE, FALSE, FALSE, TRUE, ...))
LoadVCF("example.vcf", survival = mySurvVector, verbose = FALSE)
LoadVCF("example.vcf", only.biallelic = FALSE, only.snp = FALSE)

## End(Not run)

laurentlab-mpipz/rsurvival documentation built on May 29, 2019, 9:14 a.m.