splitSeqsToFiles: Split DNA sequences into smaller files.

Description Usage Arguments Value See Also Examples

View source: R/hiReadsProcessor.R

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

1
2
splitSeqsToFiles(x, totalFiles = 4, suffix = "tempy",
  filename = "queryFile.fa", outDir = getwd())

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".

outDir

directory to write the output file. Default is current directory.

Value

a vector of filename names created.

See Also

blatSeqs

Examples

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

hiReadsProcessor documentation built on Nov. 8, 2020, 5:43 p.m.