Skip to content

Commit 65b2292

Browse files
committed
Finalised mash reference genome parsing
1 parent b96d9ba commit 65b2292

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

OLCspades/OLCspades.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def __init__(self, args, pipelinecommit, startingtime, scriptpath):
142142
import reporter
143143
import compress
144144
import multiprocessing
145+
printtime('Welcome to the CFIA de novo bacterial assembly pipeline {}'.format(pipelinecommit), startingtime)
145146
# Define variables from the arguments - there may be a more streamlined way to do this
146147
self.args = args
147148
self.path = os.path.join(args.path, '')
@@ -213,7 +214,9 @@ def __init__(self, args, pipelinecommit, startingtime, scriptpath):
213214
homepath = os.path.split(os.path.abspath(__file__))[0]
214215
# Find the commit of the script by running a command to change to the directory containing the script and run
215216
# a git command to return the short version of the commit hash
216-
commit = subprocess.Popen('cd {} && git rev-parse --short HEAD'.format(homepath),
217+
# commit = subprocess.Popen('cd {} && git rev-parse --short HEAD'.format(homepath),
218+
# shell=True, stdout=subprocess.PIPE).communicate()[0].rstrip()
219+
commit = subprocess.Popen('cd {} && git tag'.format(homepath),
217220
shell=True, stdout=subprocess.PIPE).communicate()[0].rstrip()
218221
from argparse import ArgumentParser
219222
# Parser for arguments

OLCspades/mash.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ def mash(self):
8686

8787
def parse(self):
8888
import re
89-
from csv import DictReader
90-
from glob import glob
91-
# Set the name of the refseq profile
92-
refseqprofile = glob('{}{}/*.txt'.format(self.referencefilepath, self.analysistype))[0]
93-
# Open the refseq profile file as a dictionary
94-
profile = DictReader(open(refseqprofile), dialect='excel-tab')
9589
printtime('Determining closest refseq genome', self.starttime)
9690
for sample in self.metadata:
9791
if sample.general.bestassemblyfile != 'NA':

0 commit comments

Comments
 (0)