Skip to content

Commit

Permalink
update canu and fix buildPackage memory request
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren committed Jul 17, 2024
1 parent 024c6d7 commit fb6afb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Snakefiles/functions.sm
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ def getMBGMemoryRequest(attempt): # Sum the input size, divide by
return int(math.ceil(math.ceil(mem)*scl))

def getBuildPackagesInputONT(wildcards, withONT, withBAM):
result = ""
result = []

if withONT == "True":
if withBAM == "True":
result=expand("../3-align/split/ont{nnnn}.fasta.gz", nnnn = splitONToutputs(wildcards))
else:
result = "../%s"%(rules.extractONT.output.ont_subset)
result.append("../%s"%(rules.extractONT.output.ont_subset))
return result

def getBuildPackageMemoryRequest(attempt): # Sum the size of input files, 2-bit encoded,
Expand All @@ -132,6 +132,8 @@ def getBuildPackageMemoryRequest(attempt): # Sum the size of input files, 2
mem = 0

for f in getBuildPackagesInputONT("", config['withONT'], config['withBAM']):
# strip leading ../ from name, we need it for buildPackages but not here
if f.startswith("../"): f = f[3:]
mem += getFileBP(f)

for f in HIFI_READS:
Expand Down
2 changes: 1 addition & 1 deletion src/canu

0 comments on commit fb6afb7

Please sign in to comment.