Annotates CNV segments with cytoband and gene overlap information.
Details
For each segment, the function calculates the gaps between the segment boundaries and the detectable p and q arm region start/end sites (using cytoband and whitelist edge files). For acrocentric chromosomes, only the q arm boundaries are considered. Based on the size of these gaps, the function determines the event type and returns:
a cytoband range (combination of start and stop cytoband),
a p-arm or q-arm only event,
or, if the event spans the whole chromosome, just the chromosome name (chromosome-level event).
Gene overlap information is also added for each segment.
Examples
AnnotateSegments(
input = "sample_CNV_final.tsv",
out_dir = "results/",
prefix = "Sample1",
cytoband = "data/cytoBand.txt",
whitelist_edge = "data/whitelist.txt",
gene = "data/gene_anno.txt"
)
#> Warning: cannot open file 'data/whitelist.txt': No such file or directory
#> Error in file(file, "rt"): cannot open the connection
