-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVelvetG.py
68 lines (65 loc) · 2.82 KB
/
VelvetG.py
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
class VelvetG:
def __init__(self, OutputFolder=None, CoverageCutoff=None, MinContigLength=None, ExpCov=None, MaxCov=None, InsertLength=None):
"""
(required) OutputFolder = Output Directory of DeBruijn Graph Results
CoverageCutoff = Minimum amount of times a base pair is sequenced
MinContigLength = The smallest continuous sequenced length output desired
ExpCov = The expected coverage of times a base pair is sequenced
MaxCov = the largest amount of times a base pair is sequenced
(requires pairs ends option in velveth) InsertLength = To activate the use of read pairs, you must specify two parameters: the
expected (i.e. average) insert length (or at least a rough estimate), and the
expected short-read k-mer coverage (see 5.1 for more information)
"""
self.SetCoverageCutoff(CoverageCutoff)
self.SetMinContigLength(MinContigLength)
self.SetExpCov(ExpCov)
self.SetMaxCov(MaxCov)
self.SetInsertLength(InsertLength)
self.SetOutputFolder(OutputFolder)
Command = self.BuildCommand()
self.SetCommand(Command)
def SetOutputFolder(self,OF):
self.OutputFolder = OF
def SetCoverageCutoff(self,CC):
self.CoverageCutoff = CC
def SetMinContigLength(self,MCL):
self.MinContigLength = MCL
def SetExpCov(self,EC):
self.ExpCov = EC
def SetMaxCov(self,MC):
self.MaxCov = MC
def SetInsertLength(self,IL):
self.InsertLength = IL
def SetCommand(self,C):
self.Command = C
def GetCommand(self,C):
return self.Command
def GetOutputFolder(self):
return self.OutputFolder
def GetCoverageCutoff(self):
return self.CoverageCutoff
def GetMinContigLength(self):
return self.MinContigLength
def GetExpCov(self):
return self.ExpCov
def GetMaxCov(self):
return self.MaxCov
def GetInsertLength(self):
return self.InsertLength
def BuildCommand(self):
temp = ''
if self.GetOutputFolder() == None:
return
else:
temp = temp + 'velvetg %s'% self.GetOutputFolder()
if self.GetMinContigLength() != None:
temp = temp + ' -min_contig_lgth %d'% self.GetMinContigLength()
if self.GetMaxCov() != None:
temp = temp + ' -max_coverage %d'% self.GetMaxCov()
if self.GetCoverageCutoff() != None:
temp = temp + ' -cov_cutoff %d'% self.GetCoverageCutoff()
if self.GetExpCov() != None:
temp = temp + ' -exp_cov %d'% self.GetExpCov()
if self.GetInsertLength() != None:
temp = temp + ' -ins_length %d'% self.GetInsertLength()
return temp