Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: fix log formatting issues #68

Merged
merged 2 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
twine upload wheelhouse/ms2pip*-manylinux1_x86_64.whl
twine upload dist/*.tar.gz

- uses: actions/upload-artifact@v2-preview
- uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/ms2pip*-manylinux1_x86_64.whl
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ jobs:
- name: Test with pytest
run: |
pytest
- uses: actions/upload-artifact@v2-preview
- uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/ms2pip*.whl

2 changes: 1 addition & 1 deletion conversion_tools/maxquant_to_peprec.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def scan_mgf(peprec, mgf_folder, filename_col='raw_file', scan_num_col='scan_num
found = False
if found and line[-4:] != '0.0\n':
out.write(line)
logging.info("{}/{} spectra found and written to new MGF file.".format(count, len(peprec)))
logging.info("%i/%i spectra found and written to new MGF file.", count, len(peprec))


def ArgParse():
Expand Down
6 changes: 3 additions & 3 deletions ms2pip/ms2pipC.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,8 @@ def run(self):
"{}_correlations.csv".format(self.output_filename), index=True
)
logger.info(
"median correlations: %f",
correlations.groupby("ion")["pearsonr"].median(),
"median correlations: \n%s",
str(correlations.groupby("ion")["pearsonr"].median()),
)
elif self.match_spectra:
results = self._process_peptides()
Expand Down Expand Up @@ -822,7 +822,7 @@ def _read_peptide_information(self):
num_pep_filtered = num_pep - len(data)
if num_pep_filtered > 0:
logger.info(
"Removed {} unsupported peptide sequences (< 3, > 99 \
"Removed %i unsupported peptide sequences (< 3, > 99 \
amino acids, or containing B, J, O, U, X or Z).",
num_pep_filtered,
)
Expand Down
22 changes: 11 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
VERSION = "3.6.1"
import os
from glob import glob

from setuptools import setup
from setuptools.extension import Extension
from Cython.Distutils import build_ext
import numpy


VERSION = "3.6.2.dev"

NAME = "ms2pip"
LICENSE = "apache-2.0"
Expand Down Expand Up @@ -43,23 +52,14 @@
]
PYTHON_REQUIRES = ">=3.6,<4"

import os
from glob import glob

from setuptools import setup
from setuptools.extension import Extension
from Cython.Distutils import build_ext
import numpy


with open("README.md", "r") as fh:
LONG_DESCRIPTION = fh.read()

to_remove = [
"ms2pip/cython_modules/ms2pip_pyx.c*",
"ms2pip/cython_modules/ms2pip_pyx.so",
]
_ = [[os.remove(f) for f in glob(pat)] for pat in to_remove]
#_ = [[os.remove(f) for f in glob(pat)] for pat in to_remove]

extensions = [
Extension(
Expand Down