% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orderAllLinkageGroups.R
\docType{methods}
\name{orderAllLinkageGroups,LinkageGroupList,StrandStateMatrix,StrandFreqMatrix,StrandReadMatrix-method}
\alias{orderAllLinkageGroups,LinkageGroupList,StrandStateMatrix,StrandFreqMatrix,StrandReadMatrix-method}
\alias{orderAllLinkageGroups}
\alias{orderAllLinkageGroups,orderAllLinkageGroups-LinkageGroupList-StrandStateMatrix-StrandFreqMatrix-StrandReadMatrix-method}
\title{Function to call contig ordering algorithms iteratively across each linkage group element}
\usage{

  \S4method{orderAllLinkageGroups}{LinkageGroupList,StrandStateMatrix,StrandFreqMatrix,StrandReadMatrix}(linkageGroupList,
  strandStateMatrix, strandFreqMatrix, strandReadCount, whichLG = NULL,
  saveOrdered = NULL, orderCall = "greedy", randomAttempts = 75,
  nProcesses = 1, verbose = TRUE)
}
\arguments{
\item{linkageGroupList}{list of vectors, each specifying which contigs belong in which linkage group (product of clusterContigs)}

\item{strandStateMatrix}{table of strand calls for all contigs (product of preprocessStrandTable)}

\item{strandFreqMatrix}{table of W:C read proportions (used for QC) (product of strandSeqFreqTable[[1]])}

\item{strandReadCount}{table of read counts (product of strandSeqFreqTable[[2]])}

\item{whichLG}{vector of integers specifying the element(s) of linkageGroupList to be ordered (i.e. which specific linkage groups to try to order). Default is all LGs.}

\item{saveOrdered}{Will return a pdf of heatmaps for each linkage group; String entered becomes the fileName (default is saveOrderedPDF=FALSE)}

\item{orderCall}{currently either 'greedy' for greedy algorithm or 'TSP' for travelling salesperson alogrithm (default is 'greedy')}

\item{randomAttempts}{itenger specifying number of iterations of either the Monte Carlo or the 2-opt TSP solver to identify the best ordering. Default is 75, but higher values (eg 1000) make more sense for the TSP.}

\item{nProcesses}{number of processes to attempt ordering in parallel}

\item{verbose}{Pringts messages to the terminal. Default is TRUE}
}
\value{
a list containing a ContigOrdering object consisting of ordered contigs with linkage group names, a StrandStateList consisting of StrandStateMatrices for each LG, and a
LinkageGroupList consisting of reordered contigs within each list element.
}
\description{
Function to call contig ordering algorithms iteratively across each linkage group element
}
\examples{
#Get a data.frame of ordered contigs from cells from the same organism, aligned to the same genome
 
data("exampleLGList")
data("exampleWCMatrix")
data("exampleStrandFreq")
data("exampleReadCounts")
contigOrder <- orderAllLinkageGroups(exampleLGList, exampleWCMatrix, exampleStrandFreq, exampleReadCounts)

show(contigOrder)

contigOrder <- orderAllLinkageGroups(exampleLGList, exampleWCMatrix, exampleStrandFreq, exampleReadCounts, orderCall='TSP')
show(contigOrder)
}
