From cc96f0fddafebc6261ca2817360211ad19c8ecf8 Mon Sep 17 00:00:00 2001 From: Daniel Cutting Date: Fri, 5 May 2023 17:16:36 +0100 Subject: [PATCH] Fixing typos in scalop predict, adding kwargs argument to assign so that we can pass the hmmer path to anarci. --- build/lib/scalop/predict.py | 8 ++++---- lib/python/scalop/predict.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) mode change 100644 => 100755 build/lib/scalop/predict.py diff --git a/build/lib/scalop/predict.py b/build/lib/scalop/predict.py old mode 100644 new mode 100755 index 57ba996..7faaff1 --- a/build/lib/scalop/predict.py +++ b/build/lib/scalop/predict.py @@ -201,7 +201,7 @@ def assigncmd(args): print('Write results to %s' % opf) return assignresults -def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopdb='',hc='',lc='',blacklist=[]): +def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopdb='',hc='',lc='',blacklist=[], **kwargs): ''' args: ''' @@ -217,8 +217,8 @@ def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopd seqh,seql = seq.split('/') seqh = re.sub('[\W]+','',seqh) seql = re.sub('[\W]+','',seql) - seqs.append(('{}_1'.format(seqi),seqh)) - seqs.append(('{}_2'.format(seqi),seql)) + seqs.append(('{}_1'.format(seqid),seqh)) + seqs.append(('{}_2'.format(seqid),seql)) else: seqs.append((seqid,re.sub('[\W\/]+','',seq))) elif type(seq) == dict: # in dict @@ -251,7 +251,7 @@ def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopd ncpu = multiprocessing.cpu_count() - numberedseqs = run_anarci( seqs,scheme=scheme,ncpu=ncpu,assign_germline=False) + numberedseqs = run_anarci(seqs,scheme=scheme,ncpu=ncpu,assign_germline=False, **kwargs) # Import the right version of pssm database ip(scheme,definition,dbv) diff --git a/lib/python/scalop/predict.py b/lib/python/scalop/predict.py index 57ba996..7faaff1 100755 --- a/lib/python/scalop/predict.py +++ b/lib/python/scalop/predict.py @@ -201,7 +201,7 @@ def assigncmd(args): print('Write results to %s' % opf) return assignresults -def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopdb='',hc='',lc='',blacklist=[]): +def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopdb='',hc='',lc='',blacklist=[], **kwargs): ''' args: ''' @@ -217,8 +217,8 @@ def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopd seqh,seql = seq.split('/') seqh = re.sub('[\W]+','',seqh) seql = re.sub('[\W]+','',seql) - seqs.append(('{}_1'.format(seqi),seqh)) - seqs.append(('{}_2'.format(seqi),seql)) + seqs.append(('{}_1'.format(seqid),seqh)) + seqs.append(('{}_2'.format(seqid),seql)) else: seqs.append((seqid,re.sub('[\W\/]+','',seq))) elif type(seq) == dict: # in dict @@ -251,7 +251,7 @@ def assign(seq,scheme='imgt',definition='north',dbv='latest',structuref='',loopd ncpu = multiprocessing.cpu_count() - numberedseqs = run_anarci( seqs,scheme=scheme,ncpu=ncpu,assign_germline=False) + numberedseqs = run_anarci(seqs,scheme=scheme,ncpu=ncpu,assign_germline=False, **kwargs) # Import the right version of pssm database ip(scheme,definition,dbv)