indexes_chr: Extract last index of every chromosome in a vector of...

View source: R/RcppExports.R

indexes_chrR Documentation

Extract last index of every chromosome in a vector of chromosomes

Description

This function tests that chromosomes appear in their numerical order (dies with an error otherwise), and returns the last index of each chromosome.

Usage

indexes_chr(chrs)

Arguments

chrs

Vector of integer chromosomes as it appears in a bim table.

Value

Vector of end indexes per chromosome. The numerical value of the chromosome is its index in this vector. Chromosomes that were not observed have NA values as their end indexes.

Examples

# the end of chr1 is at index 4, for chr2 it's 7, and for chr3 it's 9
indexes_chr( c(1,1,1,1,2,2,2,3,3) )


OchoaLab/simfam documentation built on Jan. 11, 2025, 12:23 a.m.