From aca3ecb54c83b86a03f232b8fa5a5cf33db7feb4 Mon Sep 17 00:00:00 2001 From: linda5mith Date: Thu, 3 Mar 2022 16:20:53 +0000 Subject: [PATCH] Adding mask=True parameter to Pyrodigal to prevent unknown genes 'X' being predicted across unknown nucleotides and subsequently preventing BioSeq.utils.ProtParam.ProteinAnalysis from breaking. --- PhageBoost/get_genecalls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhageBoost/get_genecalls.py b/PhageBoost/get_genecalls.py index 0de0b0e..8a6721e 100755 --- a/PhageBoost/get_genecalls.py +++ b/PhageBoost/get_genecalls.py @@ -19,7 +19,7 @@ def parse_genecall(contig,gene,i): #@bbcachier def get_genecalls_for_contig(contig, meta=True): seq = str(contig.seq) - p = pyrodigal.Pyrodigal(meta=meta) + p = pyrodigal.Pyrodigal(meta=meta, mask=True) if not meta: p.train(seq) a = p.find_genes(seq) genecalls = [parse_genecall(contig, gene, i) for i, gene in enumerate(p.find_genes(seq))]