diff --git a/app/HomologModel.py b/app/HomologModel.py index b163c2c..a93079e 100644 --- a/app/HomologModel.py +++ b/app/HomologModel.py @@ -1,5 +1,6 @@ from app.Base import BaseModel from app.settings import * +from Bio.Blast import NCBIXML class Homolog(BaseModel): """Class for homology searches.""" diff --git a/app/OverexpressionModel.py b/app/OverexpressionModel.py index ea79b3b..7ec7329 100644 --- a/app/OverexpressionModel.py +++ b/app/OverexpressionModel.py @@ -1,5 +1,6 @@ from app.Base import BaseModel from app.settings import * +from Bio.Blast import NCBIXML class Overexpression(BaseModel): """Class for overexpression searches.""" diff --git a/app/RrnaModel.py b/app/RrnaModel.py index 98978a9..8465ddb 100644 --- a/app/RrnaModel.py +++ b/app/RrnaModel.py @@ -1,5 +1,6 @@ from app.Base import BaseModel from app.settings import * +from Bio.Blast import NCBIXML class Rrna(BaseModel): """Class for ribosomal RNA searches.""" @@ -27,7 +28,7 @@ def __repr__(self): def sequence_orientation(self, end, start): if end > start: return "+" - else: + else: return "-" def run(self): @@ -61,7 +62,7 @@ def run(self): orf_info_str = str(orf_info).split(" | ") model_type_id = int(orf_info_str[1].split(":")[1].strip()) # logger.debug("model_type_id: {} ".format(model_type_id)) - + space_pos = align_title.index(' ') hit_id = align_title[0:space_pos] @@ -75,7 +76,7 @@ def run(self): # logger.debug("model_id: {}".format(model_id)) # logger.debug("pass_value: {}".format(pass_value)) - + if model_type_id == 40295: true_pass_evalue = float(pass_value) @@ -91,9 +92,9 @@ def run(self): for hsp in alignment.hsps: query_seq = hsp.query.replace('-', '') - real_query_length = len(query_seq) - sbjct_seq = hsp.sbjct.replace('-', '') - real_sbjct_length = len(sbjct_seq) + real_query_length = len(query_seq) + sbjct_seq = hsp.sbjct.replace('-', '') + real_sbjct_length = len(sbjct_seq) strand = self.sequence_orientation(hsp.sbjct_end, hsp.sbjct_start) for eachs in snp_dict_list: @@ -102,7 +103,7 @@ def run(self): chan = eachs["change"] if hsp.query_start < pos and (hsp.query_start + real_query_length) > pos: - # Report ONLY if the SNPs are present + # Report ONLY if the SNPs are present qry = int(pos) - hsp.query_start + self.find_num_dash(hsp.query, (int(pos) - hsp.query_start)) sbj = int(pos) - hsp.query_start + self.find_num_dash(hsp.query, (int(pos) - hsp.query_start)) diff --git a/app/settings.py b/app/settings.py index 19bdaf3..56fa62b 100644 --- a/app/settings.py +++ b/app/settings.py @@ -3,7 +3,7 @@ import logging import json -from Bio.Blast import NCBIXML +# from Bio.Blast import NCBIXML from Bio.Seq import Seq from Bio import SeqIO