Skip to content

Commit

Permalink
Merge pull request #9 from dwhswenson/codacy
Browse files Browse the repository at this point in the history
Minor codeclimate/pylint/pep8 fixes
  • Loading branch information
dwhswenson authored Oct 7, 2017
2 parents 46094dc + 581e0a9 commit 43c43f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ engines:

fixme:
enabled: true
issue_override:
severity: info
exclude_paths:
- "**pdb"

duplication:
enabled: true
languages:
python:
mass_threshold: 35
config:
languages:
python:
mass_threshold: 35

ratings:
paths:
Expand Down
8 changes: 4 additions & 4 deletions contact_map/contact_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ def contact_map(self, trajectory, frame_number, residue_query_atom_idxs,
contact_neighbors = contact_neighbors & self._haystack
# frozenset is unique key independent of order
# local_pairs = set(frozenset((atom_idx, neighb))
# for neighb in contact_neighbors)
# for neighb in contact_neighbors)
local_pairs = set(map(
frozenset,
itertools.product([atom_idx], contact_neighbors)
))
contact_pairs |= local_pairs
# contact_pairs |= set(frozenset((atom_idx, neighb))
# for neighb in contact_neighbors)
# for neighb in contact_neighbors)
local_residue_partners = set(self._atom_idx_to_residue_idx[a]
for a in contact_neighbors)
local_res_pairs = set(map(
Expand All @@ -268,8 +268,8 @@ def contact_map(self, trajectory, frame_number, residue_query_atom_idxs,

atom_contacts = collections.Counter(contact_pairs)
# residue_pairs = set(
# frozenset(self._atom_idx_to_residue_idx[aa] for aa in pair)
# for pair in contact_pairs
# frozenset(self._atom_idx_to_residue_idx[aa] for aa in pair)
# for pair in contact_pairs
# )
residue_contacts = collections.Counter(residue_pairs)
return (atom_contacts, residue_contacts)
Expand Down

0 comments on commit 43c43f2

Please sign in to comment.