makeLabel function

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

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

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

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: "")

Returns

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=".")))
  • Maintainer: Peter Baker
  • License: GPL-3
  • Last published: 2018-03-22

Useful links