Skip to contents

This function is used to name segments along the transcriptome. They are named as chrA_B where A is the number of their chromosome, and B is the segment number on this chromosome. If there is only one segment on this chromosome, there is no _B.

Usage

cnv_label_peaks(segments, chr)

Arguments

segments

DATAFRAME : a dataframe with start and stop position of each segment (no default)

chr

VECTOR : a vector containing the chromosome for each gene (no default)

Value

A vector of length nrow(segments) containing segment names.

Examples

segments = data.frame(start = c(1,5,5,2,8,9),
                      stop = c(2,7,7,4,10,10))
chr = c(1,1,1,1,2,2,2,3,3,3,3)
segments$name = cnv_label_peaks(segments, chr)