Learn R Programming

gclink (version 1.1)

gc_position: Extract ORF Positions for One Specific Gene Cluster

Description

Internal helper used by gc_cal. Given the ordered positions of all reference genes on a contig (Data) and the vector of cluster breakpoints produced by gc_cluster (Cluster), this function slices Data to return the positions that belong to the EachCluster-th cluster.

Usage

gc_position(
  Data = orf_position.tmp,
  Cluster = cluster.tmp,
  EachCluster = eachcluster
)

Value

A numeric vector containing the ORF positions that constitute the requested gene cluster.

Arguments

Data

A numeric vector (ascending order) of ORF positions that carry one of the reference genes of interest. Usually the vector orf_position.tmp created inside gc_cal.

Cluster

Numeric vector returned by gc_cluster; each element marks the last position of a candidate cluster.

EachCluster

Integer index specifying which cluster to extract (1 = first cluster, 2 = second cluster, …).