Description Usage Arguments Value Examples
This a function for removing the duplicated barcodes in the library file that will be used for the bcSeq alignment.
1 | uniqueBar(inputFile,outputFile)
|
inputFile |
(string) filename for the library sequences, needs to be a fasta or fastq file. |
outputFile |
(string) output filename. |
default |
No objects are returned to R |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #### Generate barcodes
lFName <- "./libFile.fasta"
bases <- c(rep('A', 4), rep('C',4), rep('G',4), rep('T',4))
numOfBars <- 20
Barcodes <- rep(NA, numOfBars*2)
for (i in 1:numOfBars){
Barcodes[2*i-1] <- paste0(">barcode_ID: ", i)
Barcodes[2*i] <- paste(sample(bases, length(bases)), collapse = '')
}
Barcodes <- rbind(Barcodes, Barcodes)
write(Barcodes, lFName)
outFile <- "./libFile_unique.fasta"
uniqueBar(lFName, outFile)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.