loadAlleleCounts {TitanCNA} | R Documentation

## Function to load tumour allele counts from a text file or data.frame and returns a data.table.

### Description

Function to load in the allele counts from tumour sequencing data from a delimited text file or data.frame object.

### Usage

      loadAlleleCounts(inCounts, symmetric = TRUE,
      		genomeStyle = "NCBI", sep = "\t", header = TRUE)

    	setGenomeStyle(x, genomeStyle = "NCBI", species = "Homo_sapiens", filterExtraChr = TRUE)

### Arguments

`inCounts` | Full file path to text file or data.frame containing tumour allele count data. `inCounts` must be 6 columns: chromosome, position, reference base, reference read counts, non-reference base, non-reference read counts. ‘chromosome’ column can be in ‘NCBI’ or ‘UCSC’ genome style; only autosomes, sex chromosomes, and mitochondrial chromosome are included (e.g. 1-22,X,Y,MT). The reference and non-reference base columns can be any arbitrary character; it is not used by TitanCNA.
`symmetric` | `logical`; if `TRUE`, then the symmetric allelic counts will be used. `ref` will equal `max(ref,nonRef)`. This parameter must be the same as the `symmetric` parameter for `loadDefaultParameters`.
`genomeStyle` | The genome style to use for chromosomes by TitanCNA. Use one of ‘NCBI’ or ‘UCSC’. It does not matter what style is found in `inCounts`, `genomeStyle` will be the style returned.
`sep` | Character indicating the delimiter used for the columns for `infile`. Default is tab-delimited, "\t".
`header` | `logical` to indicate if the input tumour counts file contains a header line.
`x` | `character` vector of chromosome names to change.
`species` | `character` denoting the species
`filterExtraChr` | `logical`; if `TRUE`, then will return the list of chromosomes given by `extractSeqlevelsByGroup` for the `species` and for autosomes and sex chromosomes, which means that only the major chromosomes are returned (i.e. 1:22, X, Y).

### Value

`loadAlleleCounts` returns a data.table containing components for

`chr` | Chromosome; character, NCBI or UCSC genome style format
`posn` | Position; integer
`ref` | Reference counts; numeric
`nonRef` | Non-reference counts; numeric
`tumDepth` | Tumour depth; numeric

### Author(s)

Gavin Ha <gavinha@gmail.com>

### References

Ha, G., Roth, A., Khattra, J., Ho, J., Yap, D., Prentice, L. M., Melnyk, N., McPherson, A., Bashashati, A., Laks, E., Biele, J., Ding, J., Le, A., Rosner, J., Shumansky, K., Marra, M. A., Huntsman, D. G., McAlpine, J. N., Aparicio, S. A. J. R., and Shah, S. P. (2014). TITAN: Inference of copy number architectures in clonal cell populations from tumour whole genome sequence data. Genome Research, 24: 1881-1893. (PMID: 25060187)

### See Also

`loadDefaultParameters`

### Examples

      infile <- system.file("extdata", "test_alleleCounts_chr2.txt",
                            package = "TitanCNA")
      #### LOAD DATA FROM TEXT FILE ####
      data <- loadAlleleCounts(infile, symmetric = TRUE,
      		genomeStyle = "NCBI", header = TRUE)

      ## use the UCSC chromosome naming convention instead ##
      data$chr <- setGenomeStyle(data$chr, genomeStyle = "UCSC")
      ## Not run:
    	data <- loadAlleleCounts(countsDF, symmetric = TRUE,
      			genomeStyle = "NCBI")

    ## End(Not run)

[Package TitanCNA version 1.24.0 Index]