#' Make a linker sequence from the batch sequence and barlength.
#'
#' @param batch batch sequence
#' @param barlen length of barcode sequence
#' @param side which side the hairpin is in relation to the main double stranded sequence
#' @return linker sequence
#' @export
make_linker <- function(batch, barlen, side = "right") {
bar_empty <- rep("N", barlen)
batch_conv <- batch
batch_conv[batch_conv == "C"] <- "T"
batch_revcompconv <- rev(sq_comp(batch))
batch_revcompconv[batch_revcompconv == "C"] <- "T"
if (side == "right") {
return(c(batch_conv, bar_empty, batch_revcompconv))
} else if (side == "left") {
return(c(batch_revcompconv, bar_empty, batch_conv))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.