makeLabel {polySegratio}R Documentation

Generate labels from two columns where blanks in first column are replaced by preceding non–blank label

Description

Primarily used to generate marker labels from two columns where the first column is a nucleotide sequence which is mainly blank in that it is the same as the previous one while the second column is increasing numbers (fragment size) for each nucleotide combination

Usage

makeLabel(x, columns = c(1, 2), squash = TRUE, sep = "")

Arguments

x

data frame of markers including labels

columns

the column numbers containing labels (default: c(1,2))

squash

remove trailing/leading blanks in 1st column (default:TRUE)

sep

separator when combining two label columns (default: "")

Value

returns vector of marker names

Author(s)

Peter Baker p.baker1@uq.edu.au

See Also

autoFill is used to replace blanks in first column

Examples


  ## imaginary data frame representing ceq marker names read in from
  ## spreadsheet
  x <- data.frame( col1 = c("agc","","","","gct5","","ccc","",""),
                   col2 = c(1,3,4,5,1,2,2,4,6))
  print(x)
  print(makeLabel(x))
  print(cbind(x,lab=makeLabel(x, sep=".")))

[Package polySegratio version 0.2-5 Index]