Skip to content

Commit

Permalink
setup.cfg update; flake8 fixes
Browse files Browse the repository at this point in the history
Update setup.cfg file:
    - remove line length cheat from
    - add .py to * (unsure why this was needed)

fix flake8 errors accordingly
  • Loading branch information
JTFouquier committed Feb 14, 2018
1 parent 64f54b7 commit e736b09
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 5 additions & 3 deletions ghosttree/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ def filter_positions(alignment_fh, maximum_gap_frequency,

def _filter_gap_positions(aln, maximum_gap_frequency):

aln_gap_frequencies = (aln.gap_frequencies(axis='sequence',
relative=False) / aln._seqs.count())
aln_gap_frequencies_boolean = (aln_gap_frequencies <= maximum_gap_frequency)
aln_gap_frequencies = (aln.gap_frequencies(
axis='sequence',
relative=False) / aln._seqs.count())
aln_gap_frequencies_boolean = (aln_gap_frequencies <=
maximum_gap_frequency)
aln = aln.iloc[:, aln_gap_frequencies_boolean]

return aln
Expand Down
6 changes: 4 additions & 2 deletions ghosttree/scaffold/tests/test_hybridtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ def test_make_nr_foundation_alignment_few(self):
self.extension_genus_dic_few)

self.assertEqual(list(result), [
Sequence("AAA---", metadata={"id": "PBB1", "description": "Phoma"}),
Sequence("AAG---", metadata={"id": "CBB1", "description": "Candida"}),
Sequence("AAA---", metadata={"id": "PBB1",
"description": "Phoma"}),
Sequence("AAG---", metadata={"id": "CBB1",
"description": "Candida"}),
])

def test_make_nr_foundation_alignment_none(self):
Expand Down
3 changes: 2 additions & 1 deletion ghosttree/silva/tests/test_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def test_fasta_with_fungi(self):
self.accession,
self.taxonomy_with_fungi)
self.assertEqual(list(result),
[Sequence("ATCG", metadata={'id': "AB21", 'description': "Fungi"})])
[Sequence("ATCG", metadata={'id': "AB21",
'description': "Fungi"})])

def test_fasta_with_many_fungi(self):
result = fungi_from_fasta(self.fasta_many_fungi,
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[flake8]
filename = *
filename = *.py
exclude = *.pyc, __pycache__
max-line-length = 120
ignore = E722

0 comments on commit e736b09

Please sign in to comment.