R/aggregate_coding_results.R
noncoding_gene_anchor.RdA gene's non-coding masks have different candidate spans (an enhancer can
lie far from the gene), so a sort on start separates them. This
function gives every gene of a results table one position, its anchor: the
bundled gene table's start for a protein-coding gene (the same table
GLOWr::define_regions_gene uses), and the smallest start over
the gene's rows for a gene not in that table (an ncRNA gene). The scan unit
and aggregate_coding_results (through gene_anchor)
order rows by (chr, anchor, gene, category).
noncoding_gene_anchor(tbl, genes_info = NULL)A results table with label (or gene), chr
and start columns.
A gene table in the layout GLOWr::define_regions_gene
accepts, or NULL (the bundled protein-coding table).
A data.frame with one row per (gene, chr): gene,
chr, anchor (integer position) and family
("protein_coding" or "other").
if (FALSE) { # \dontrun{
tbl <- read.csv("runs/myrun/outputs/results-glow/glow_noncoding_chr22.csv")
anchor <- noncoding_gene_anchor(tbl)
} # }