R/writeSFF.R

Defines functions writeSFF

Documented in writeSFF

writeSFF <- function(sffContainer, filename) {
  
  ll <- list(flowgramFormat=flowgramFormat(sffContainer), flowChars=flowChars(sffContainer), 
             keySequence=keySequence(sffContainer), clipQualityLeft=clipQualityLeft(sffContainer), 
             clipQualityRight=clipQualityRight(sffContainer), clipAdapterLeft=clipAdapterLeft(sffContainer), 
             clipAdapterRight=clipAdapterRight(sffContainer), flowgrams=flowgrams(sffContainer), 
             flowIndexes=flowIndexes(sffContainer), reads=as.character(reads(sffContainer), use.names=TRUE), 
             qualityScores=sapply(sapply(as.character(quality(reads(sffContainer))), function(x) charToRaw(x)), 
                                  function(x) as.integer(x)-as.integer(33)))
  
  .Call("writeSFFfromR", ll, filename)
  
}

Try the R453Plus1Toolbox package in your browser

Any scripts or data that you put into this service are public.

R453Plus1Toolbox documentation built on Nov. 8, 2020, 5:59 p.m.