getSexFromCoverage: Get sample sex from coverage

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getSex.R

Description

This function determines the sex of a sample by the coverage ratio of chrX and chrY. Loss of chromosome Y (LOY) can result in a wrong female call. For small targeted panels, this will only work when sufficient sex marker genes such as AMELY are covered. For optimal results, parameters might need to be tuned for the assay.

Usage

1
2
3
4
5
6
getSexFromCoverage(
  coverage.file,
  min.ratio = 25,
  min.ratio.na = 20,
  remove.outliers = TRUE
)

Arguments

coverage.file

Coverage file or data read with readCoverageFile.

min.ratio

Min chrX/chrY coverage ratio to call sample as female.

min.ratio.na

Min chrX/chrY coverage ratio to call sample as NA. This ratio defines a grey zone from min.ratio.na to min.ratio in which samples are not called. The default is set to a copy number ratio that would be rare in male samples, but lower than expected in female samples. Contamination can be a source of ambiguous calls. Mappability issues on chromosome Y resulting in low coverage need to be considered when setting cutoffs.

remove.outliers

Removes coverage outliers before calculating mean chromosome coverages.

Value

Returns a character(1) with M for male, F for female, or NA if unknown.

Author(s)

Markus Riester

See Also

getSexFromVcf

Examples

1
2
3
tumor.coverage.file <- system.file("extdata", "example_tumor.txt", 
    package="PureCN")
sex <- getSexFromCoverage(tumor.coverage.file)

PureCN documentation built on Nov. 8, 2020, 5:37 p.m.