codonDT2genome: Align a codon data.table to genomic positions

View source: R/codonDT2genome.R

codonDT2genomeR Documentation

Align a codon data.table to genomic positions

Description

Takes a codon table produced from dna2codonDT and aligns genomic positions against exons and codons, using a set of annotations.

Usage

codonDT2genome(codonDT, genomeAnnot, isCompressed)

Arguments

codonDT

Data.table: The output from dna2codonDT. Note, this must have been generated using the exon functionality. It could be the compressed or uncompressed version (see ?dna2codonDT). The required columns are:

  1. $EXON: Integer, the exon ID.

  2. $CODON: Integer, the codon ID.

  3. $NUC.GENE: Integer/Character, the nucleotide ID within the exon coding sequence. An integer class if an uncompressed codon table, but a character class if a compressed codon table (see ?dna2codonDT).

genomeAnnot

Data.table: The exon coding sequence annotations, e.g., from a GFF3 annotations file. Each row should be an exon. The required columns are:

  1. $CHROM: Character, the chromosome ID.

  2. $START: Integer, the starting position (on forward strand).

  3. $END: Integer, the end position (on forward strand).

  4. $STRAND: Character, the strand position, one of '+' (forward), or '-' (reverse). Note, that if the gene is on the reverse strand, the "end" of the exon (relative to the forward strand) is actually the "start" of the exon (relative to the reverse strand).

  5. $EXON: Integer, the exon ID.

isCompressed

Logical: Is the codon data table provided in codonDT compressed? See dna2codonDT.

Value

Returns the codon table but with the additional column $CHROM and $POS, the chromosome and the genomic positions, respectively.


j-a-thia/genomalicious documentation built on Oct. 19, 2024, 7:51 p.m.