# Shasta Python API documentation

## Indices and tables

- Index

- Search Page

## Class Assembler

class shasta.Assembler
  __init__(self: shasta.Assembler, largeDataFileNamePrefix: str = 'Data/', createNew: bool = False, readRepresentation: SupportsInt = 1, largeDataPageSize: SupportsInt = 2097152) → None

    Assembler constructor.

  accessAlignmentCandidateTable(self: shasta.Assembler) → None
  accessAlignmentCandidates(self: shasta.Assembler) → None
  accessAlignmentData(self: shasta.Assembler) → None
  accessAlignmentDataReadWrite(self: shasta.Assembler) → None
  accessAssemblyGraphEdgeLists(self: shasta.Assembler) → None
  accessAssemblyGraphEdges(self: shasta.Assembler) → None
  accessAssemblyGraphOrientedReadsByEdge(self: shasta.Assembler) → None
  accessAssemblyGraphSequences(self: shasta.Assembler) → None
  accessAssemblyGraphVertices(self: shasta.Assembler) → None
  accessCompressedAlignments(self: shasta.Assembler) → None
  accessDisjointSetsHistogram(self: shasta.Assembler) → None
  accessKmerChecker(self: shasta.Assembler) → None
  accessKmers(self: shasta.Assembler) → None
  accessMarkerGraphConsensus(self: shasta.Assembler) → None
  accessMarkerGraphCoverageData(self: shasta.Assembler) → None
  accessMarkerGraphEdgeMarkerIntervals(self: shasta.Assembler) → None
  accessMarkerGraphEdges(self: shasta.Assembler, accessEdgesReadWrite: bool = False, accessConnectivityReadWrite: bool = False) → None
  accessMarkerGraphReverseComplementEdge(self: shasta.Assembler) → None
  accessMarkerGraphReverseComplementVertex(self: shasta.Assembler, readWriteAccess: bool = False) → None
  accessMarkerGraphVertexRepeatCounts(self: shasta.Assembler) → None
  accessMarkerGraphVertices(self: shasta.Assembler, readWriteAccess: bool = False) → None
  accessMarkers(self: shasta.Assembler) → None
  accessMode3Assembler(self: shasta.Assembler) → None
  accessReadGraph(self: shasta.Assembler) → None
  accessReadGraphReadWrite(self: shasta.Assembler) → None
  accessSortedMarkers(self: shasta.Assembler) → bool
  alignOrientedReads(self: shasta.Assembler, readId0: SupportsInt, strand0: SupportsInt, readId1: SupportsInt, strand1: SupportsInt, maxSkip: SupportsInt, maxDrift: SupportsInt, maxMarkerFrequency: SupportsInt) → None
  alignOrientedReads1(self: shasta.Assembler, readId0: SupportsInt, strand0: SupportsInt, readId1: SupportsInt, strand1: SupportsInt, matchCount: SupportsInt, mismatchCount: SupportsInt, gapCount: SupportsInt) → None
  alignOrientedReads4(self: shasta.Assembler, readId0: SupportsInt, strand0: SupportsInt, readId1: SupportsInt, strand1: SupportsInt, deltaX: SupportsInt, deltaY: SupportsInt, minEntryCountPerCell: SupportsInt, maxDistanceFromBoundary: SupportsInt, minAlignedMarkerCount: SupportsInt, minAlignedFraction: SupportsFloat, maxSkip: SupportsInt, maxDrift: SupportsInt, maxTrim: SupportsInt, maxBand: SupportsInt, matchScore: SupportsInt, mismatchScore: SupportsInt, gapScore: SupportsInt) → None
  alignOverlappingOrientedReads(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt, maxSkip: SupportsInt, maxDrift: SupportsInt, maxMarkerFrequency: SupportsInt, minAlignedMarkerCount: SupportsInt, maxTrim: SupportsInt) → None
  analyzeAlignmentMatrix(self: shasta.Assembler, readId0: SupportsInt, strand0: SupportsInt, readId1: SupportsInt, strand1: SupportsInt) → None
  analyzeReadGraph(self: shasta.Assembler) → None
  assemble(self: shasta.Assembler, threadCount: SupportsInt = 0, storeCoverageDataCsvLengthThreshold: SupportsInt = 0) → None
  assembleAssemblyGraphEdge(self: shasta.Assembler, edgeId: SupportsInt, storeCoverageData: bool = True) → shasta::AssembledSegment
  assembleMarkerGraphEdges(self: shasta.Assembler, threadCount: typing.SupportsInt = 0, markerGraphEdgeLengthThresholdForConsensus: typing.SupportsInt, storeCoverageData: bool, assembleAllEdges: bool) → None
  assembleMarkerGraphVertices(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  checkMarkerGraphIsStrandSymmetric(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  cleanupDuplicateMarkers(self: shasta.Assembler, threadCount: typing.SupportsInt = 0, minCoverage: typing.SupportsInt, minCoveragePerStrand: typing.SupportsInt, duplicateMarkersPattern1Threshold: typing.SupportsFloat, pattern1CreateNewVertices: bool, pattern2CreateNewVertices: bool) → None
  cleanupMarkerKmerIds(self: shasta.Assembler) → None
  clusterMarkerGraphEdgeOrientedReads(self: shasta.Assembler, edgeId: SupportsInt, errorRateThreshold: SupportsFloat, debug: bool = False) → list[list[int]]
  colorCompressedAssemblyGraph(self: shasta.Assembler, gfaId: str) → None
  colorGfaBySimilarityToSegment(self: shasta.Assembler, segmentId: SupportsInt, minVertexCount: SupportsInt, minEdgeCount: SupportsInt) → None
  colorGfaKeySegments(self: shasta.Assembler, fileName: str = 'Assembly-BothStrands-Color.csv') → None
  colorGfaWithTwoReads(self: shasta.Assembler, readId0: SupportsInt, strand0: SupportsInt, readId1: SupportsInt, strand1: SupportsInt, fileName: str = 'Assembly-BothStrands-Color.csv') → None
  computeAlignments(self: shasta.Assembler, arg0: shasta.AlignOptions, arg1: bool, arg2: SupportsInt) → None
  computeAssemblyStatistics(self: shasta.Assembler) → None
  computeMarkerGraphCoverageHistogram(self: shasta.Assembler) → None
  computeMarkerGraphVerticesCoverageData(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  computeMarkerKmerIds(self: shasta.Assembler, arg0: SupportsInt) → None
  computeReadGraphConnectedComponents(self: shasta.Assembler) → None
  computeSortedMarkers(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  countKmers(self: shasta.Assembler, threadCount: SupportsInt = 0, globalFrequencyOverrideDirectory: str = '') → None
  createAssemblyGraph2(self: shasta.Assembler, pruneLength: SupportsInt, mode2Options: shasta.Mode2AssemblyOptions, threadCount: SupportsInt = 0, debug: bool = False) → None
  createAssemblyGraphEdges(self: shasta.Assembler) → None
  createAssemblyGraphVertices(self: shasta.Assembler) → None
  createCompressedAssemblyGraph(self: shasta.Assembler) → None
  createMarkerGraphEdges(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  createMarkerGraphEdgesStrict(self: shasta.Assembler, minEdgeCoverage: SupportsInt, minEdgeCoveragePerStrand: SupportsInt, threadCount: SupportsInt = 0) → None
  createMarkerGraphSecondaryEdges(self: shasta.Assembler, secondaryEdgeMaxSkip: SupportsInt, threadCount: SupportsInt = 0) → None
  createMarkerGraphVertices(self: shasta.Assembler, minCoverage: SupportsInt, maxCoverage: SupportsInt, minCoveragePerStrand: SupportsInt, allowDuplicateMarkers: bool, peakFinderMinAreaFraction: SupportsFloat, peakFinderAreaStartIndex: SupportsInt, threadCount: SupportsInt = 0) → None
  createPrimaryMarkerGraphEdges(self: shasta.Assembler, minPrimaryCoverage: SupportsInt, maxPrimaryCoverage: SupportsInt, threadCount: SupportsInt = 0) → None
  createReadGraph(self: shasta.Assembler, maxAlignmentCount: SupportsInt, preferAlignedFraction: bool) → None
  createReadGraph2(self: shasta.Assembler, maxAlignmentCount: SupportsInt, markerCountPercentile: SupportsFloat, alignedFractionPercentile: SupportsFloat, maxSkipPercentile: SupportsFloat, maxDriftPercentile: SupportsFloat, maxTrimPercentile: SupportsFloat) → None
  createReadGraph3(self: shasta.Assembler, maxAlignmentCount: SupportsInt) → None
  createReadGraph4(self: shasta.Assembler, maxAlignmentCount: SupportsInt) → None
  createReadGraphUsingPseudoPaths(self: shasta.Assembler, matchScore: SupportsInt, mismatchScore: SupportsInt, gapScore: SupportsInt, mismatchSquareFactor: SupportsFloat, minScore: SupportsFloat, maxAlignmentCount: SupportsInt, threadCount: SupportsInt = 1) → None
  detangle(self: shasta.Assembler) → None
  detangle2(self: shasta.Assembler, diagonalReadCountMin: SupportsInt, offDiagonalReadCountMax: SupportsInt, offDiagonalRatio: SupportsFloat) → None
  findAlignmentCandidatesLowHash0(self: shasta.Assembler, m: typing.SupportsInt, hashFraction: typing.SupportsFloat, minHashIterationCount: typing.SupportsInt, alignmentCandidatesPerRead: typing.SupportsFloat, log2MinHashBucketCount: typing.SupportsInt = 0, minBucketSize: typing.SupportsInt, maxBucketSize: typing.SupportsInt, minFrequency: typing.SupportsInt, threadCount: typing.SupportsInt = 0) → None
  findMarkerGraphReverseComplementEdges(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  findMarkerGraphReverseComplementVertices(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  findMarkers(self: shasta.Assembler, threadCount: SupportsInt = 0) → None

    Find markers in reads.

  flagChimericReads(self: shasta.Assembler, maxChimericReadDistance: SupportsInt, threadCount: SupportsInt = 0) → None
  flagCrossStrandReadGraphEdges1(self: shasta.Assembler, maxDistance: SupportsInt, threadCount: SupportsInt = 0) → None
  flagCrossStrandReadGraphEdges2(self: shasta.Assembler) → None
  flagInconsistentAlignments(self: shasta.Assembler, triangleErrorThreshold: SupportsInt, leastSquareErrorThreshold: SupportsInt, leastSquareMaxDistance: SupportsInt, threadCount: SupportsInt = 0) → None
  flagPalindromicReads(self: shasta.Assembler, maxSkip: SupportsInt, maxDrift: SupportsInt, maxMarkerFrequency: SupportsInt, alignedFractionThreshold: SupportsFloat, nearDiagonalFractionThreshold: SupportsFloat, deltaThreshold: SupportsInt, threadCount: SupportsInt = 0) → None
  gatherOrientedReadsByAssemblyGraphEdge(self: shasta.Assembler, threadCount: SupportsInt = 0) → None
  getAlignmentCandidates(self: shasta.Assembler) → list[shasta.OrientedReadPair]
  getGlobalMarkerGraphVertex(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt, ordinal: SupportsInt) → int
  getGlobalMarkerGraphVertexMarkers(self: shasta.Assembler, vertexId: SupportsInt) → list[tuple[int, int, int]]
  getMarkerGraphMinCoverageUsed(self: shasta.Assembler) → int
  getReads(self: shasta.Assembler) → shasta.Reads
  histogramReadLength(self: shasta.Assembler, fileName: str = 'ReadLengthHistogram.csv') → None

    Create a histogram of read length and write it to a csv file.

  mode3Reassembly(self: shasta.Assembler, arg0: typing.SupportsInt, arg1: shasta::Mode3AssemblyOptions, arg2: bool) → None
  pruneMarkerGraphStrongSubgraph(self: shasta.Assembler, iterationCount: SupportsInt) → None
  readGraphClustering(self: shasta.Assembler) → None
  removeAssemblyGraph(self: shasta.Assembler) → None
  removeMarkerGraph(self: shasta.Assembler) → None
  removeReadGraphBridges(self: shasta.Assembler, maxDistance: SupportsInt) → None
  setMarkerGraphEdgeFlags(self: shasta.Assembler, wasRemovedByTransitiveReduction: SupportsInt, wasPruned: SupportsInt, isSuperBubbleEdge: SupportsInt, isLowCoverageCrossEdge: SupportsInt, wasAssembled: SupportsInt) → None
  setupConsensusCaller(self: shasta.Assembler, arg0: str) → None
  simplifyMarkerGraph(self: shasta.Assembler, maxLength: collections.abc.Sequence[SupportsInt], debug: bool = False) → None
  splitMarkerGraphSecondaryEdges(self: shasta.Assembler, errorRateThreshold: SupportsFloat, minCoverage: SupportsInt, threadCount: SupportsInt = 0) → None
  test(self: shasta.Assembler) → None
  transitiveReduction(self: shasta.Assembler, lowCoverageThreshold: SupportsInt, highCoverageThreshold: SupportsInt, maxDistance: SupportsInt, edgeMarkerSkipThreshold: SupportsInt) → None
  writeAlignmentCandidates(self: shasta.Assembler, useReadName: bool = False, verbose: bool = False) → None
  writeAssemblyGraph(self: shasta.Assembler, arg0: str) → None
  writeBadMarkerGraphVertices(self: shasta.Assembler) → None
  writeFasta(self: shasta.Assembler, fileName: str) → None
  writeGfa1(self: shasta.Assembler, fileName: str) → None
  writeGfa1BothStrands(self: shasta.Assembler, fileName: str) → None
  writeLocalAlignmentCandidateReads(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt, maxDistance: SupportsInt, allowChimericReads: bool, allowCrossStrandEdges: bool, allowInconsistentAlignmentEdges: bool) → None
  writeLocalReadGraphReads(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt, maxDistance: SupportsInt, allowChimericReads: bool, allowCrossStrandEdges: bool, allowInconsistentAlignmentEdges: bool) → None
  writeMarkers(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt, fileName: str) → None

    Write the markers of an oriented read.

  writeOrientedReadPath(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt, fileName: str = 'OrientedReadPath.csv') → None
  writeOrientedReadsByAssemblyGraphEdge(self: shasta.Assembler) → None
  writeOverlappingReads(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt, fileName: str = 'OverlappingReads.fasta') → None

    Write in fasta format the reads that overlap a given read.

  writeParallelMarkerGraphEdges(self: shasta.Assembler) → None
  writePseudoPath(self: shasta.Assembler, readId: SupportsInt, strand: SupportsInt) → None
  writeReadGraphEdges(self: shasta.Assembler, useReadName: bool = False) → None