Learn R Programming

hiReadsProcessor (version 1.8.2)

write.listedDNAStringSet: Write a fasta file per sample in parallel

Description

Given a listed DNAStringSet object return from extractSeqs, the function writes a fasta file for each sample as defined in filePath parameter.

Usage

write.listedDNAStringSet(dnaSet, filePath = ".", filePrefix = "processed",
  prependSamplenames = TRUE, format = "fasta", parallel = FALSE)

Arguments

dnaSet
listed DNAStringSet object containing sequences to be written.
filePath
a path write the fasta files per sample. Default is current working directory.
filePrefix
prefix the filenames with a string. Default is 'processed' followed by samplename.
prependSamplenames
Prepend definition lines with samplenames. Default is TRUE. Make sure the dnaSet parameter is a named list where names are used as samplenames.
format
either fasta (the default) or fastq.
parallel
use parallel backend to perform calculation with BiocParallel. Defaults to TRUE. If no parallel backend is registered, then a serial version is ran using SerialParam.

See Also

findBarcodes, read.SeqFolder, extractSeqs, addListNameToReads

Examples

Run this code
load(file.path(system.file("data", package = "hiReadsProcessor"),
"FLX_seqProps.RData"))
samples <- c('Roth-MLV3p-CD4TMLVWell6-Tsp509I',
'Roth-MLV3p-CD4TMLVWell6-MseI', 'Roth-MLV3p-CD4TMLVwell5-MuA')
seqs <- extractSeqs(seqProps, sector='2', samplename=samples, feature="primed")
write.listedDNAStringSet(seqs)

Run the code above in your browser using DataLab