getSexFromVcf {PureCN} | R Documentation |
This function detects non-random distribution of homozygous variants on chromosome X compared to all other chromosomes. A non-significant Fisher's exact p-value indicates more than one chromosome X copy. This function is called in runAbsoluteCN as sanity check when a VCF is provided. It is also useful for determining sex when no sex marker genes on chrY (e.g. AMELY) are available.
getSexFromVcf( vcf, tumor.id.in.vcf = NULL, min.or = 4, min.or.na = 2.5, max.pv = 0.001, homozygous.cutoff = 0.95, af.cutoff = 0.2, min.coverage = 15, use.somatic.status = TRUE )
vcf |
CollapsedVCF object, read in with the |
tumor.id.in.vcf |
The tumor id in the CollapsedVCF (optional). |
min.or |
Minimum odds-ratio to call sample as male. If p-value is not significant due to a small number of SNPs on chromosome X, sample will be called as NA even when odds-ratio exceeds this cutoff. |
min.or.na |
Minimum odds-ratio to not call a sample. Odds-ratios in the
range |
max.pv |
Maximum Fisher's exact p-value to call sample as male. |
homozygous.cutoff |
Minimum allelic fraction to call position homozygous. |
af.cutoff |
Remove all SNVs with allelic fraction lower than the specified value. |
min.coverage |
Minimum coverage in tumor. Variants with lower coverage are ignored. |
use.somatic.status |
If somatic status and germline data is available, then exclude somatic variants. |
Returns a character(1)
with M
for male, F
for
female, or NA
if unknown.
Markus Riester
vcf.file <- system.file("extdata", "example.vcf.gz", package = "PureCN") vcf <- readVcf(vcf.file, "hg19") # This example vcf is filtered and contains no homozygous calls, # which are necessary for determining sex from chromosome X. getSexFromVcf(vcf)