File: Mode2Assembly-B.py

package info (click to toggle)
shasta 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,636 kB
  • sloc: cpp: 82,262; python: 2,348; makefile: 222; sh: 143
file content (74 lines) | stat: -rwxr-xr-x 2,819 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/python3

"""

This run the final portion of Mode 2 assembly.

"""

import ast
import argparse
import shasta
import GetConfig


parser = argparse.ArgumentParser()    
parser.add_argument('--debug', action='store_true')
parser.add_argument('--no-debug', action='store_false')
parser.set_defaults(debug=False)
arguments = parser.parse_args()
debug = arguments.debug

config = GetConfig.getConfig()

shasta.openPerformanceLog('Mode2Assembly-B.log')

a = shasta.Assembler()
a.accessMarkers()
a.accessMarkerGraphVertices()
a.accessMarkerGraphReverseComplementVertex()
a.accessMarkerGraphEdges(accessEdgesReadWrite = True)
a.accessMarkerGraphReverseComplementEdge()
a.accessMarkerGraphConsensus()



# Fill in the Mode2Assemblyoptions.
mode2Options = shasta.Mode2AssemblyOptions();

mode2Options.strongBranchThreshold = int(config['Assembly']['mode2.strongBranchThreshold'])
mode2Options.epsilon = float(config['Assembly']['mode2.epsilon'])

mode2Options.minConcordantReadCountForBubbleRemoval = int(config['Assembly']['mode2.bubbleRemoval.minConcordantReadCount'])
mode2Options.maxDiscordantReadCountForBubbleRemoval = int(config['Assembly']['mode2.bubbleRemoval.maxDiscordantReadCount'])
mode2Options.minLogPForBubbleRemoval = float(config['Assembly']['mode2.bubbleRemoval.minlogP'])

mode2Options.componentSizeThresholdForBubbleRemoval = int(config['Assembly']['mode2.bubbleRemoval.componentSizeThreshold'])
mode2Options.minConcordantReadCountForPhasing = int(config['Assembly']['mode2.phasing.minConcordantReadCount'])
mode2Options.maxDiscordantReadCountForPhasing = int(config['Assembly']['mode2.phasing.maxDiscordantReadCount'])
mode2Options.minLogPForPhasing = float(config['Assembly']['mode2.phasing.minlogP'])

mode2Options.maxSuperbubbleSize = int(config['Assembly']['mode2.superbubble.maxSize'])
mode2Options.maxSuperbubbleChunkSize = int(config['Assembly']['mode2.superbubble.maxChunkSize'])
mode2Options.maxSuperbubbleChunkPathCount = int(config['Assembly']['mode2.superbubble.maxChunkPathCount'])
mode2Options.superbubbleEdgeLengthThreshold = int(config['Assembly']['mode2.superbubble.edgeLengthThreshold'])

mode2Options.suppressGfaOutput      = ast.literal_eval(config['Assembly']['mode2.suppressGfaOutput'])
mode2Options.suppressFastaOutput    = ast.literal_eval(config['Assembly']['mode2.suppressFastaOutput'])
mode2Options.suppressDetailedOutput = ast.literal_eval(config['Assembly']['mode2.suppressDetailedOutput'])
mode2Options.suppressPhasedOutput   = ast.literal_eval(config['Assembly']['mode2.suppressPhasedOutput'])
mode2Options.suppressHaploidOutput  = ast.literal_eval(config['Assembly']['mode2.suppressHaploidOutput'])




a.createAssemblyGraph2(
    pruneLength = int(config['Assembly']['pruneLength']),
    mode2Options = mode2Options,
    threadCount = 0,
    debug = debug
    )