Skip to contents

Reads allelic imbalance (AI) data from different input formats and standardizes the output.

Usage

ReadAI(aitype, ballele, minsnpcov, gender)

Arguments

aitype

Character. Type of AI input file. Supported values are:

  • "gatk": Tab-separated file with columns Chromosome, Pos, REF_NUCLEOTIDE, ALT_NUCLEOTIDE, REF_COUNT, ALT_COUNT.

  • "dragen": the input must include columns contig, start, stop, refAllele, allele1, allele2, allele1Count, allele2Count, allele1AF, and allele2AF.

  • "other": Tab-separated file with columns Chromosome, Pos, REF_NUCLEOTIDE, ALT_NUCLEOTIDE, REF_COUNT, ALT_COUNT.

ballele

Character. Path to the input allelic count file.

minsnpcov

Numeric, minimum coverage of SNPs to included (default: 20).

gender

Character. Sample gender, either "female" or "male". This value is passed to ReadAI().

Value

A data frame with columns Chromosome, Pos, ref_count, alt_count and maf, containing only autosomal positions (Chromosome not X or Y), with minor allele frequency (maf) between 0 and 0.5.

Examples

if (FALSE) { # \dontrun{
# Read AI data from a count file
maf_df <- ReadAI("gatk", "sample.allele_counts", 20, "female")

# Read AI data from a DRAGEN file
maf_df <- ReadAI("dragen", "sample_dragen.tumor.ballele.counts.gz",20, "female")

# Read AI data from a BAF file
maf_df <- ReadAI("other", "sample.tsv",20, "female")
} # }