Learn R Programming

hiReadsProcessor (version 1.8.2)

splitSeqsToFiles: Split DNA sequences into smaller files.

Description

Given a vector of sequences or DNAStringSet or a FASTA filename, the function splits it into smaller pieces as denoted by totalFiles parameter.

Usage

splitSeqsToFiles(x, totalFiles = 4, suffix = "tempy",
  filename = "queryFile.fa")

Arguments

x
a DNAStringSet object, or a FASTA filename.
totalFiles
an integer indicating how many files to create. Default is 4.
suffix
a word to add to each file created. Default is "tempy".
filename
name of the file if x is a DNAStringSet object. Default is "queryFile.fa".

Value

  • a vector of filename names created.

See Also

blatSeqs

Examples

Run this code
seqs <- DNAStringSet(sapply(sample(c(100:1000), 500),
function(size) paste(sample(DNA_BASES, size, replace=TRUE), collapse="")))
splitSeqsToFiles(seqs,5,"tempyQ","myDNAseqs.fa")

Run the code above in your browser using DataLab