Skip to content

Commit

Permalink
moves import
Browse files Browse the repository at this point in the history
  • Loading branch information
raphenya committed Sep 7, 2023
1 parent 4f55f62 commit 734d5b5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/HomologModel.py
Original file line number Diff line number Diff line change
@@ -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."""
Expand Down
1 change: 1 addition & 0 deletions app/OverexpressionModel.py
Original file line number Diff line number Diff line change
@@ -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."""
Expand Down
15 changes: 8 additions & 7 deletions app/RrnaModel.py
Original file line number Diff line number Diff line change
@@ -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."""
Expand Down Expand Up @@ -27,7 +28,7 @@ def __repr__(self):
def sequence_orientation(self, end, start):
if end > start:
return "+"
else:
else:
return "-"

def run(self):
Expand Down Expand Up @@ -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]
Expand All @@ -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)

Expand All @@ -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:
Expand All @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 734d5b5

Please sign in to comment.