% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessStrandTable.R
\docType{methods}
\name{preprocessStrandTable,StrandFreqMatrix-method}
\alias{preprocessStrandTable,StrandFreqMatrix-method}
\alias{preprocessStrandTable}
\alias{preprocessStrandTable,StrandFreqMatrix,StrandFreqMatrix-method}
\title{preprocessStrandTable -- remove low quality libraries and contigs before attempting to build
a genome}
\usage{
\S4method{preprocessStrandTable}{StrandFreqMatrix}(strandTable,
  strandTableThreshold = 0.8, filterThreshold = 0.8,
  orderMethod = "libsAndConc", lowQualThreshold = 0.9, verbose = TRUE,
  minLib = 10)
}
\arguments{
\item{strandTable}{data.frame containing the strand table to use as input}

\item{strandTableThreshold}{threshold at which to call a contig WW or CC rather than WC}

\item{filterThreshold}{maximum number of libraries a contig can be NA or WC in}

\item{orderMethod}{the method to oder contigs. currently libsAndConc only option. Set to FALSE to not order contigs based on library quality}

\item{lowQualThreshold}{background threshold at which to toss an entire library. If NULL, function will not make an overall assessment of library quality.
Very chimeric assemblies can appear low quality across all libraries.}

\item{verbose}{messages written to terminal}

\item{minLib}{minimum number of libraries a contig must be present in to be included in the output}
}
\value{
A list of one matrix and three quality data.frames -- 1: a matrix of WW/WC/WW calls for all contigs; 2: the quality of libraries used (based on frequencies outside expected ranges); 3: A data.frame of libraries that are of low quality and therefore excluded from analysis; 5: A ChrTable object containing contigs that are present as WC in more libraries than expected. These are excluded from the strandStateMatrix, but are potentially worth investigating for chimerism.
}
\description{
preprocessStrandTable -- remove low quality libraries and contigs before attempting to build
a genome
}
\examples{
data("exampleStrandFreq")

strandStates <- preprocessStrandTable(exampleStrandFreq, lowQualThreshold=0.8)

show(strandStates[[1]]) # WW-WC-CC matrix
}
