[med-svn] [Git][med-team/q2-quality-filter][master] 6 commits: New upstream version 2021.8.0
Andreas Tille (@tille)
gitlab at salsa.debian.org
Wed Sep 29 16:01:22 BST 2021
Andreas Tille pushed to branch master at Debian Med / q2-quality-filter
Commits:
67aab201 by Andreas Tille at 2021-09-29T16:54:42+02:00
New upstream version 2021.8.0
- - - - -
df2c8aaf by Andreas Tille at 2021-09-29T16:54:42+02:00
routine-update: New upstream version
- - - - -
f26726a8 by Andreas Tille at 2021-09-29T16:54:43+02:00
Update upstream source from tag 'upstream/2021.8.0'
Update to upstream version '2021.8.0'
with Debian dir c725977e3c372ab978d7d4bd54cdc9538d682289
- - - - -
d9485c53 by Andreas Tille at 2021-09-29T16:54:43+02:00
routine-update: Standards-Version: 4.6.0
- - - - -
f3f5c2db by Andreas Tille at 2021-09-29T16:56:51+02:00
Versioned (Build-)Depends on qiime and q2 modules (>= 2021.8.0)
- - - - -
1d63a906 by Andreas Tille at 2021-09-29T16:58:19+02:00
Upload to unstable
- - - - -
18 changed files:
- + .github/workflows/ci.yml
- − .travis.yml
- LICENSE
- README.md
- − ci/recipe/conda_build_config.yaml
- ci/recipe/meta.yaml
- debian/changelog
- debian/control
- q2_quality_filter/__init__.py
- q2_quality_filter/_filter.py
- q2_quality_filter/_format.py
- q2_quality_filter/_transformer.py
- q2_quality_filter/_type.py
- q2_quality_filter/_version.py
- q2_quality_filter/plugin_setup.py
- q2_quality_filter/test/__init__.py
- q2_quality_filter/test/test_filter.py
- setup.py
Changes:
=====================================
.github/workflows/ci.yml
=====================================
@@ -0,0 +1,55 @@
+# This file is automatically generated by busywork.qiime2.org and
+# template-repos - any manual edits made to this file will be erased when
+# busywork performs maintenance updates.
+
+name: ci
+
+on:
+ pull_request:
+ push:
+ branches:
+ - master
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: checkout source
+ uses: actions/checkout at v2
+
+ - name: set up python 3.8
+ uses: actions/setup-python at v1
+ with:
+ python-version: 3.8
+
+ - name: install dependencies
+ run: python -m pip install --upgrade pip
+
+ - name: lint
+ run: |
+ pip install -q https://github.com/qiime2/q2lint/archive/master.zip
+ q2lint
+ pip install -q flake8
+ flake8
+
+ build-and-test:
+ needs: lint
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: checkout source
+ uses: actions/checkout at v2
+ with:
+ fetch-depth: 0
+
+ - name: set up git repo for versioneer
+ run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
+
+ - uses: qiime2/action-library-packaging at alpha1
+ with:
+ package-name: q2-quality-filter
+ build-target: dev
+ additional-tests: py.test --pyargs q2_quality_filter
+ library-token: ${{ secrets.LIBRARY_TOKEN }}
=====================================
.travis.yml deleted
=====================================
@@ -1,23 +0,0 @@
-dist: trusty
-sudo: false
-language: python
-before_install:
- - export MPLBACKEND='Agg'
- - wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- - export MINICONDA_PREFIX="$HOME/miniconda"
- - bash miniconda.sh -b -p $MINICONDA_PREFIX
- - export PATH="$MINICONDA_PREFIX/bin:$PATH"
- - conda config --set always_yes yes
- - conda update -q conda
- - conda info -a
-install:
- - wget -q https://raw.githubusercontent.com/qiime2/environment-files/master/latest/staging/qiime2-latest-py36-linux-conda.yml
- - conda env create -q -n test-env --file qiime2-latest-py36-linux-conda.yml
- - source activate test-env
- - conda install -q pytest-cov
- - pip install -q flake8
- - pip install -q https://github.com/qiime2/q2lint/archive/master.zip
- - make install
-script:
- - make lint
- - make test-cov
=====================================
LICENSE
=====================================
@@ -1,6 +1,6 @@
BSD 3-Clause License
-Copyright (c) 2017-2020, QIIME 2 development team.
+Copyright (c) 2017-2021, QIIME 2 development team.
All rights reserved.
Redistribution and use in source and binary forms, with or without
=====================================
README.md
=====================================
@@ -1,5 +1,5 @@
# q2-quality-filter
-[![Build Status](https://travis-ci.org/qiime2/q2-quality-filter.svg?branch=master)](https://travis-ci.org/qiime2/q2-quality-filter)
+![](https://github.com/qiime2/q2-quality-filter/workflows/ci/badge.svg)
-This is a QIIME 2 plugin. For details on QIIME 2, see https://qiime2.org..
+This is a QIIME 2 plugin. For details on QIIME 2, see https://qiime2.org..
\ No newline at end of file
=====================================
ci/recipe/conda_build_config.yaml deleted
=====================================
@@ -1,2 +0,0 @@
-python:
- - 3.6
=====================================
ci/recipe/meta.yaml
=====================================
@@ -1,6 +1,5 @@
{% set data = load_setup_py_data() %}
{% set version = data.get('version') or 'placehold' %}
-{% set release = '.'.join(version.split('.')[:2]) %}
package:
name: q2-quality-filter
@@ -20,11 +19,18 @@ requirements:
run:
- python {{ python }}
- pandas
- - qiime2 {{ release }}.*
- - q2templates {{ release }}.*
- - q2-types {{ release }}.*
+ - numpy
+ - qiime2 {{ qiime2_epoch }}.*
+ - q2templates {{ qiime2_epoch }}.*
+ - q2-types {{ qiime2_epoch }}.*
test:
+ requires:
+ - qiime2 >={{ qiime2 }}
+ - q2templates >={{ q2templates }}
+ - q2-types >={{ q2_types }}
+ - pytest
+
imports:
- q2_quality_filter
- qiime2.plugins.quality_filter
=====================================
debian/changelog
=====================================
@@ -1,10 +1,17 @@
-q2-quality-filter (2020.11.1-3) UNRELEASED; urgency=medium
+q2-quality-filter (2021.8.0-1) unstable; urgency=medium
+ * Team upload.
+
+ [ Étienne Mollier ]
* d/control: update uploader address
* d/watch: fix broken url to github
* d/salsa-ci.yml: disable test on i386; python3-skbio missing on i386
- -- Étienne Mollier <emollier at debian.org> Mon, 05 Jul 2021 22:39:37 +0200
+ [ Andreas Tille ]
+ * Standards-Version: 4.6.0 (routine-update)
+ * Versioned (Build-)Depends on qiime and q2 modules (>= 2021.8.0)
+
+ -- Andreas Tille <tille at debian.org> Wed, 29 Sep 2021 16:56:59 +0200
q2-quality-filter (2020.11.1-2) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -9,10 +9,10 @@ Build-Depends: debhelper-compat (= 13),
python3,
python3-setuptools,
python3-nose,
- qiime (>= 2019.10.0),
- q2templates,
- q2-types
-Standards-Version: 4.5.1
+ qiime (>= 2021.8.0),
+ q2templates (>= 2021.8.0),
+ q2-types (>= 2021.8.0)
+Standards-Version: 4.6.0
Vcs-Browser: https://salsa.debian.org/med-team/q2-quality-filter
Vcs-Git: https://salsa.debian.org/med-team/q2-quality-filter.git
Homepage: https://qiime2.org/
@@ -24,9 +24,9 @@ Depends: ${shlibs:Depends},
${misc:Depends},
${python3:Depends},
python3-pandas,
- qiime,
- q2templates,
- q2-types
+ qiime (>= 2021.8.0),
+ q2templates (>= 2021.8.0),
+ q2-types (>= 2021.8.0)
Description: QIIME2 plugin for PHRED-based filtering and trimming
QIIME 2 is a powerful, extensible, and decentralized microbiome analysis
package with a focus on data and analysis transparency. QIIME 2 enables
=====================================
q2_quality_filter/__init__.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2017-2020, QIIME 2 development team.
+# Copyright (c) 2017-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
=====================================
q2_quality_filter/_filter.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2017-2020, QIIME 2 development team.
+# Copyright (c) 2017-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
@@ -20,10 +20,11 @@ from q2_types.per_sample_sequences import (
def _read_fastq_seqs(filepath, phred_offset):
# This function is adapted from @jairideout's SO post:
# http://stackoverflow.com/a/39302117/3424666
- fh = gzip.open(filepath, 'rt')
+ fh = gzip.open(filepath, 'rb')
for seq_header, seq, qual_header, qual in itertools.zip_longest(*[fh] * 4):
qual = qual.strip()
- qual_parsed = np.fromstring(qual, dtype=np.uint8) - phred_offset
+ qual_parsed = np.frombuffer(memoryview(qual), dtype=np.uint8)
+ qual_parsed = qual_parsed - phred_offset
yield (seq_header.strip(), seq.strip(), qual_header.strip(),
qual, qual_parsed)
@@ -86,7 +87,8 @@ def q_score(demux: SingleLanePerSampleSingleEndFastqDirFmt,
log_records_totalkept_counts = {}
metadata_view = demux.metadata.view(YamlFormat).open()
- phred_offset = yaml.load(metadata_view)['phred-offset']
+ phred_offset = yaml.load(metadata_view,
+ Loader=yaml.SafeLoader)['phred-offset']
demux_manifest = demux.manifest.view(demux.manifest.format)
demux_manifest = pd.read_csv(demux_manifest.open(), dtype=str)
demux_manifest.set_index('filename', inplace=True)
@@ -139,12 +141,11 @@ def q_score(demux: SingleLanePerSampleSingleEndFastqDirFmt,
continue
# do not keep the read if there are too many ambiguous bases
- if sequence_record[1].count('N') > max_ambiguous:
+ if sequence_record[1].count(b'N') > max_ambiguous:
log_records_max_ambig_counts[sample_id] += 1
continue
- fastq_lines = '\n'.join(sequence_record[:4]) + '\n'
- fastq_lines = fastq_lines.encode('utf-8')
+ fastq_lines = b'\n'.join(sequence_record[:4]) + b'\n'
if writer is None:
writer = gzip.open(str(path), mode='w')
=====================================
q2_quality_filter/_format.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2017-2020, QIIME 2 development team.
+# Copyright (c) 2017-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
=====================================
q2_quality_filter/_transformer.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2017-2020, QIIME 2 development team.
+# Copyright (c) 2017-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
@@ -7,7 +7,6 @@
# ----------------------------------------------------------------------------
import pandas as pd
-import numpy as np
import qiime2
from .plugin_setup import plugin
@@ -22,12 +21,12 @@ def _1(data: pd.DataFrame) -> QualityFilterStatsFmt:
_stats_column_dtypes = {
- 'sample-id': np.str,
- 'total-input-reads': np.number,
- 'total-retained-reads': np.number,
- 'reads-truncated': np.number,
- 'reads-too-short-after-truncation': np.number,
- 'reads-exceeding-maximum-ambiguous-bases': np.number
+ 'sample-id': str,
+ 'total-input-reads': int,
+ 'total-retained-reads': int,
+ 'reads-truncated': int,
+ 'reads-too-short-after-truncation': int,
+ 'reads-exceeding-maximum-ambiguous-bases': int,
}
=====================================
q2_quality_filter/_type.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2017-2020, QIIME 2 development team.
+# Copyright (c) 2017-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
=====================================
q2_quality_filter/_version.py
=====================================
@@ -23,9 +23,9 @@ def get_keywords():
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keywords().
- git_refnames = " (tag: 2020.11.1)"
- git_full = "7230c7590aa3a3400df954a6333b63f2c8c276a1"
- git_date = "2020-12-05 20:44:48 +0000"
+ git_refnames = " (tag: 2021.8.0)"
+ git_full = "16889091c5e035dc1a849aacdb6e90b55fe096b1"
+ git_date = "2021-09-09 18:35:30 +0000"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
=====================================
q2_quality_filter/plugin_setup.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2016-2020, QIIME 2 development team.
+# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
=====================================
q2_quality_filter/test/__init__.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2016-2020, QIIME 2 development team.
+# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
=====================================
q2_quality_filter/test/test_filter.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2016-2020, QIIME 2 development team.
+# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
@@ -11,7 +11,7 @@ import gzip
import os
import pandas as pd
-import pandas.util.testing as pdt
+import pandas.testing as pdt
import qiime2
from qiime2.sdk import Artifact
import numpy as np
@@ -35,8 +35,8 @@ class FilterTests(TestPluginBase):
package = 'q2_quality_filter.test'
def test_read_fastq_seqs(self):
- exp = [('@foo', 'ATGC', '+', 'IIII', np.array([40, 40, 40, 40])),
- ('@bar', 'TGCA', '+', 'ABCD', np.array([32, 33, 34, 35]))]
+ exp = [(b'@foo', b'ATGC', b'+', b'IIII', np.array([40, 40, 40, 40])),
+ (b'@bar', b'TGCA', b'+', b'ABCD', np.array([32, 33, 34, 35]))]
obs = list(_read_fastq_seqs(self.get_data_path('simple.fastq.gz'), 33))
self.assertEqual(len(obs), 2)
@@ -120,8 +120,8 @@ class FilterTests(TestPluginBase):
'reads-truncated',
'reads-too-short-after-truncation',
'reads-exceeding-maximum-ambiguous-bases']
- exp_drop_ambig_stats = pd.DataFrame([('foo', 2., 1., 0., 0., 1.),
- ('bar', 1., 0., 0., 0., 1.)],
+ exp_drop_ambig_stats = pd.DataFrame([('foo', 2, 1, 0, 0, 1),
+ ('bar', 1, 0, 0, 0, 1)],
columns=columns)
exp_drop_ambig_stats = exp_drop_ambig_stats.set_index('sample-id')
obs = []
@@ -145,8 +145,8 @@ class FilterTests(TestPluginBase):
"ATA",
"+",
"DDD"]
- exp_trunc_stats = pd.DataFrame([('foo', 2., 1., 0., 0., 1.),
- ('bar', 1., 1., 1., 0., 0.)],
+ exp_trunc_stats = pd.DataFrame([('foo', 2, 1, 0, 0, 1),
+ ('bar', 1, 1, 1, 0, 0)],
columns=columns)
exp_trunc_stats = exp_trunc_stats.set_index('sample-id')
@@ -231,7 +231,7 @@ class FilterTests(TestPluginBase):
'reads-truncated',
'reads-too-short-after-truncation',
'reads-exceeding-maximum-ambiguous-bases']
- exp_stats = pd.DataFrame([('foo', 10., 6., 10., 4., 0.)],
+ exp_stats = pd.DataFrame([('foo', 10, 6, 10, 4, 0)],
columns=columns)
exp_stats = exp_stats.set_index('sample-id')
obs = []
@@ -316,7 +316,7 @@ class FilterTests(TestPluginBase):
'reads-truncated',
'reads-too-short-after-truncation',
'reads-exceeding-maximum-ambiguous-bases']
- exp_stats = pd.DataFrame([('foo', 10., 6., 10., 4., 0.)],
+ exp_stats = pd.DataFrame([('foo', 10, 6, 10, 4, 0)],
columns=columns)
exp_stats = exp_stats.set_index('sample-id')
obs = []
=====================================
setup.py
=====================================
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
-# Copyright (c) 2017-2020, QIIME 2 development team.
+# Copyright (c) 2017-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
View it on GitLab: https://salsa.debian.org/med-team/q2-quality-filter/-/compare/d5353dce5aa724725974b33d86b22b167eaec9a8...1d63a906cddfe182f42f6fb39aace3d9397f8a90
--
View it on GitLab: https://salsa.debian.org/med-team/q2-quality-filter/-/compare/d5353dce5aa724725974b33d86b22b167eaec9a8...1d63a906cddfe182f42f6fb39aace3d9397f8a90
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210929/fab31acd/attachment-0001.htm>
More information about the debian-med-commit
mailing list