orderAllLinkageGroups,LinkageGroupList,StrandStateMatrix,StrandFreqMatrix,StrandReadMatrix-method {contiBAIT} | R Documentation

## Function to call contig ordering algorithms iteratively across each linkage group element

### Description

Function to call contig ordering algorithms iteratively across each linkage group element

### Usage

      ## S4 method for signature
    ## 'LinkageGroupList,StrandStateMatrix,StrandFreqMatrix,StrandReadMatrix'
    orderAllLinkageGroups(linkageGroupList,
      strandStateMatrix, strandFreqMatrix, strandReadCount, whichLG = NULL,
      saveOrdered = NULL, orderCall = "greedy", randomAttempts = 75,
      nProcesses = 1, verbose = TRUE)

### Arguments

`linkageGroupList` | list of vectors, each specifying which contigs belong in which linkage group (product of clusterContigs)
`strandStateMatrix` | table of strand calls for all contigs (product of preprocessStrandTable)
`strandFreqMatrix` | table of W:C read proportions (used for QC) (product of strandSeqFreqTable[[1]])
`strandReadCount` | table of read counts (product of strandSeqFreqTable[[2]])
`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.
`saveOrdered` | Will return a pdf of heatmaps for each linkage group; String entered becomes the fileName (default is saveOrderedPDF=FALSE)
`orderCall` | currently either 'greedy' for greedy algorithm or 'TSP' for travelling salesperson alogrithm (default is 'greedy')
`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.
`nProcesses` | number of processes to attempt ordering in parallel
`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.

### 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)

[Package contiBAIT version 1.18.0 Index]