-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6048d2a
commit 3ee25d0
Showing
22 changed files
with
462 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: set up python 3.8 | ||
uses: actions/setup-python@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@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@alpha1 | ||
with: | ||
package-name: q2-motus | ||
build-target: dev | ||
additional-tests: py.test --pyargs q2_motus | ||
library-token: ${{ secrets.LIBRARY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,4 +128,5 @@ dmypy.json | |
# Pyre type checker | ||
.pyre/ | ||
|
||
q2_motus/tests/data/dev.ipynb | ||
q2_motus/tests/data/dev.ipynb | ||
dev.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
{% set data = load_setup_py_data() %} | ||
{% set version = data.get('version') or 'placehold' %} | ||
|
||
package: | ||
name: q2-motus | ||
version: {{ version }} | ||
|
||
source: | ||
path: ../.. | ||
|
||
build: | ||
script: make install | ||
|
||
requirements: | ||
host: | ||
- python {{ python }} | ||
- setuptools | ||
|
||
run: | ||
- python {{ python }} | ||
- pandas {{ pandas }} | ||
- qiime2 {{ qiime2_epoch }}.* | ||
- q2-types {{ qiime2_epoch }}.* | ||
- bwa | ||
|
||
test: | ||
requires: | ||
- qiime2 >={{ qiime2 }} | ||
- q2-types >={{ q2_types }} | ||
- pytest | ||
- bwa | ||
|
||
imports: | ||
- q2_motus | ||
- qiime2.plugins.motus | ||
|
||
about: | ||
home: https://github.com/motu-tool/q2-mOTUs | ||
license: BSD-3-Clause | ||
license_family: BSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
from ._taxonomy import profile | ||
from ._taxonomy import profile, import_table | ||
from ._version import get_versions | ||
|
||
__version__ = get_versions()['version'] | ||
del get_versions | ||
|
||
__all__ = ['profile'] | ||
__all__ = ['profile', 'import_table'] | ||
|
||
from .plugin_setup import ( | ||
MotusMergedAbundanceTable, | ||
MotusMergedAbundanceFormat, | ||
MotusMergedAbundanceDirectoryFormat | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from qiime2.plugin import model, ValidationError, TextFileFormat | ||
|
||
|
||
class MotusMergedAbundanceFormat(TextFileFormat): | ||
def _equal_number_of_columns(self, n_lines): | ||
call_params = {} | ||
with self.open() as fh: | ||
header_line = fh.readline() | ||
param_line = header_line.split("#")[-1] | ||
name, info = param_line.split()[0], param_line | ||
call_params[name] = info | ||
while header_line.startswith('# '): | ||
header_line = fh.readline() | ||
param_line = header_line.split("#")[-1] | ||
name, info = param_line.split()[0], param_line | ||
call_params[name] = info | ||
if not "merge" in call_params["call:"]: | ||
raise ValidationError("This is not a merged abundance file. Please, merge abundance files first.") | ||
n_header_fields = len(header_line.split('\t')) | ||
if n_header_fields < 3: | ||
raise ValidationError( | ||
'No sample columns appear to be present.') | ||
for idx, line in enumerate(fh, 2): | ||
if n_lines is not None and idx > n_lines + 1: | ||
break | ||
fields = line.strip().split('\t') | ||
n_fields = len(fields) | ||
if n_fields != n_header_fields: | ||
raise ValidationError( | ||
f'Number of columns on line {line} is inconsistent with ' | ||
'the header line.') | ||
for value in fields[2:]: | ||
try: | ||
value = int(value) | ||
except ValueError: | ||
raise ValidationError( | ||
f'Values in table must be int-able. Found: {value}' | ||
) | ||
|
||
def _validate_(self, level): | ||
level_to_n_lines = {'min': 5, 'max': None} | ||
self._equal_number_of_columns(level_to_n_lines[level]) | ||
|
||
MotusMergedAbundanceDirectoryFormat = model.SingleFileDirectoryFormat( | ||
'MotusMergedAbundanceDirectoryFormat', 'table.tsv', | ||
MotusMergedAbundanceFormat) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# motus version 3.0.3 | merge 3.0.3 | info merged profiles: # git tag version 3.0.3 | motus version 3.0.3 | map_tax 3.0.3 | gene database: nr3.0.3 | calc_mgc 3.0.3 -y insert.scaled_counts -l 75 | calc_motu 3.0.3 -k mOTU -C no_CAMI -g 3 -c | taxonomy: ref_mOTU_3.0.3 meta_mOTU_3.0.3 | ||
# call: python /nfs/cds-peta/exports/biol_micro_cds_gr_sunagawa/scratch/vbezshapkin/conda-envs/qiime2/bin/motus merge -i A.motus,B.motus -o paired-end.motus | ||
#mOTU consensus_taxonomy sampleA sampleB | ||
ref_mOTU_v3_00095 k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia coli 1 0 | ||
ref_mOTU_v3_00096 k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Citrobacter|s__ Citrobacter sp. [Citrobacter amalonaticus/Citrobacter braakii/Citrobacter freundii/Citrobacter pasteurii/Citrobacter portucalensis/Citrobacter sp. A1/Citrobacter sp. A316/Citrobacter sp. AATXQ/Citrobacter sp. AATXR/Citrobacter sp. BIDMC107/Citrobacter sp. BIDMC108/Citrobacter sp. CFSAN044567/Citrobacter sp. FDAARGOS_156/Citrobacter sp. KTE151/Citrobacter sp. KTE30/Citrobacter sp. KTE32/Citrobacter sp. L17/Citrobacter sp. MGH100/Citrobacter sp. MGH103/Citrobacter sp. MGH104/Citrobacter sp. MGH105/Citrobacter sp. MGH109/Citrobacter sp. MGH110/Citrobacter sp. MGH99/Citrobacter werkmanii/Citrobacter youngae/Enterobacter cloacae/Enterobacter sp. GN02600/Escherichia coli/Salmonella enterica] 1 0 | ||
ref_mOTU_v3_00855 k__Bacteria|p__Bacteroidetes|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__Bacteroides uniformis 0 1 | ||
ref_mOTU_v3_02367 k__Bacteria|p__Bacteroidetes|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__Bacteroides dorei/vulgatus [Bacteroidia bacterium UC5.1-2G11/Candidatus Gastranaerophilales bacterium HUM_8/Bacteroides dorei/Bacteroides sp. 3_1_33FAA/Bacteroides sp. 4_3_47FAA/Bacteroides sp. 9_1_42FAA/Bacteroides sp. 3_1_40A/Bacteroides vulgatus] 0 1 | ||
ref_mOTU_v3_03592 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia sp. CAG:344 1 0 | ||
ref_mOTU_v3_03928 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Clostridiales fam. incertae sedis|g__Intestinimonas|s__Intestinimonas butyriciproducens [Intestinimonas butyriciproducens/uncultured Clostridium sp.] 0 1 | ||
ref_mOTU_v3_04716 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Ruminococcaceae|g__Ruthenibacterium|s__Ruthenibacterium lactatiformans [Ruthenibacterium lactatiformans/Ruminococcaceae bacterium cv2/Subdoligranulum sp. 4_3_54A2FAA] 1 1 | ||
ref_mOTU_v3_05238 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Ruminococcaceae|g__Flavonifractor|s__Flavonifractor plautii [Clostridia bacterium UC5.1-2H11/Flavonifractor plautii/Lachnospiraceae bacterium 7_1_58FAA] 1 0 | ||
meta_mOTU_v3_12805 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia species incertae sedis 1 0 | ||
ext_mOTU_v3_26730 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia species incertae sedis 1 0 | ||
unassigned unassigned 1 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# motus version 3.0.3 | merge 3.0.3 | info merged profiles: # git tag version 3.0.3 | motus version 3.0.3 | map_tax 3.0.3 | gene database: nr3.0.3 | calc_mgc 3.0.3 -y insert.scaled_counts -l 75 | calc_motu 3.0.3 -k mOTU -C no_CAMI -g 3 -c | taxonomy: ref_mOTU_3.0.3 meta_mOTU_3.0.3 | ||
# call: python /nfs/cds-peta/exports/biol_micro_cds_gr_sunagawa/scratch/vbezshapkin/conda-envs/qiime2/bin/motus merge -i A.motus,B.motus -o paired-end.motus | ||
#mOTU consensus_taxonomy | ||
ref_mOTU_v3_00095 k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia coli | ||
ref_mOTU_v3_00096 k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Citrobacter|s__ Citrobacter sp. [Citrobacter amalonaticus/Citrobacter braakii/Citrobacter freundii/Citrobacter pasteurii/Citrobacter portucalensis/Citrobacter sp. A1/Citrobacter sp. A316/Citrobacter sp. AATXQ/Citrobacter sp. AATXR/Citrobacter sp. BIDMC107/Citrobacter sp. BIDMC108/Citrobacter sp. CFSAN044567/Citrobacter sp. FDAARGOS_156/Citrobacter sp. KTE151/Citrobacter sp. KTE30/Citrobacter sp. KTE32/Citrobacter sp. L17/Citrobacter sp. MGH100/Citrobacter sp. MGH103/Citrobacter sp. MGH104/Citrobacter sp. MGH105/Citrobacter sp. MGH109/Citrobacter sp. MGH110/Citrobacter sp. MGH99/Citrobacter werkmanii/Citrobacter youngae/Enterobacter cloacae/Enterobacter sp. GN02600/Escherichia coli/Salmonella enterica] | ||
ref_mOTU_v3_00855 k__Bacteria|p__Bacteroidetes|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__Bacteroides uniformis | ||
ref_mOTU_v3_02367 k__Bacteria|p__Bacteroidetes|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__Bacteroides dorei/vulgatus [Bacteroidia bacterium UC5.1-2G11/Candidatus Gastranaerophilales bacterium HUM_8/Bacteroides dorei/Bacteroides sp. 3_1_33FAA/Bacteroides sp. 4_3_47FAA/Bacteroides sp. 9_1_42FAA/Bacteroides sp. 3_1_40A/Bacteroides vulgatus] | ||
ref_mOTU_v3_03592 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia sp. CAG:344 | ||
ref_mOTU_v3_03928 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Clostridiales fam. incertae sedis|g__Intestinimonas|s__Intestinimonas butyriciproducens [Intestinimonas butyriciproducens/uncultured Clostridium sp.] | ||
ref_mOTU_v3_04716 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Ruminococcaceae|g__Ruthenibacterium|s__Ruthenibacterium lactatiformans [Ruthenibacterium lactatiformans/Ruminococcaceae bacterium cv2/Subdoligranulum sp. 4_3_54A2FAA] | ||
ref_mOTU_v3_05238 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Ruminococcaceae|g__Flavonifractor|s__Flavonifractor plautii [Clostridia bacterium UC5.1-2H11/Flavonifractor plautii/Lachnospiraceae bacterium 7_1_58FAA] | ||
meta_mOTU_v3_12805 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia species incertae sedis | ||
ext_mOTU_v3_26730 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia species incertae sedis | ||
unassigned unassigned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# motus version 3.0.3 | merge 3.0.3 | info merged profiles: # git tag version 3.0.3 | motus version 3.0.3 | map_tax 3.0.3 | gene database: nr3.0.3 | calc_mgc 3.0.3 -y insert.scaled_counts -l 75 | calc_motu 3.0.3 -k mOTU -C no_CAMI -g 3 -c | taxonomy: ref_mOTU_3.0.3 meta_mOTU_3.0.3 | ||
# call: python /nfs/cds-peta/exports/biol_micro_cds_gr_sunagawa/scratch/vbezshapkin/conda-envs/qiime2/bin/motus merge -i A.motus,B.motus -o paired-end.motus | ||
#mOTU consensus_taxonomy sampleA sampleB | ||
ref_mOTU_v3_00095 k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia coli 1.0 0.0 | ||
ref_mOTU_v3_00096 k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Citrobacter|s__ Citrobacter sp. [Citrobacter amalonaticus/Citrobacter braakii/Citrobacter freundii/Citrobacter pasteurii/Citrobacter portucalensis/Citrobacter sp. A1/Citrobacter sp. A316/Citrobacter sp. AATXQ/Citrobacter sp. AATXR/Citrobacter sp. BIDMC107/Citrobacter sp. BIDMC108/Citrobacter sp. CFSAN044567/Citrobacter sp. FDAARGOS_156/Citrobacter sp. KTE151/Citrobacter sp. KTE30/Citrobacter sp. KTE32/Citrobacter sp. L17/Citrobacter sp. MGH100/Citrobacter sp. MGH103/Citrobacter sp. MGH104/Citrobacter sp. MGH105/Citrobacter sp. MGH109/Citrobacter sp. MGH110/Citrobacter sp. MGH99/Citrobacter werkmanii/Citrobacter youngae/Enterobacter cloacae/Enterobacter sp. GN02600/Escherichia coli/Salmonella enterica] 1.0 0.0 | ||
ref_mOTU_v3_00855 k__Bacteria|p__Bacteroidetes|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__Bacteroides uniformis 0.0 1.0 | ||
ref_mOTU_v3_02367 k__Bacteria|p__Bacteroidetes|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__Bacteroides dorei/vulgatus [Bacteroidia bacterium UC5.1-2G11/Candidatus Gastranaerophilales bacterium HUM_8/Bacteroides dorei/Bacteroides sp. 3_1_33FAA/Bacteroides sp. 4_3_47FAA/Bacteroides sp. 9_1_42FAA/Bacteroides sp. 3_1_40A/Bacteroides vulgatus] 0.0 1.0 | ||
ref_mOTU_v3_03592 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia sp. CAG:344 1.0 0.0 | ||
ref_mOTU_v3_03928 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Clostridiales fam. incertae sedis|g__Intestinimonas|s__Intestinimonas butyriciproducens [Intestinimonas butyriciproducens/uncultured Clostridium sp.] 0.0 1.0 | ||
ref_mOTU_v3_04716 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Ruminococcaceae|g__Ruthenibacterium|s__Ruthenibacterium lactatiformans [Ruthenibacterium lactatiformans/Ruminococcaceae bacterium cv2/Subdoligranulum sp. 4_3_54A2FAA] 1.0 1.0 | ||
ref_mOTU_v3_05238 k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Ruminococcaceae|g__Flavonifractor|s__Flavonifractor plautii [Clostridia bacterium UC5.1-2H11/Flavonifractor plautii/Lachnospiraceae bacterium 7_1_58FAA] 1.0 0.0 | ||
meta_mOTU_v3_12805 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia species incertae sedis 1.0 0.0 | ||
ext_mOTU_v3_26730 k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__Verrucomicrobiales|f__Akkermansiaceae|g__Akkermansia|s__Akkermansia species incertae sedis 1.0 0.0 | ||
unassigned unassigned 1.0 1.0 |
Oops, something went wrong.