forked from qiime2/q2-vsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_examples.py
40 lines (31 loc) · 1.42 KB
/
_examples.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2023, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from qiime2.plugins import ArtifactAPIUsage
rep_seqs_url = \
('https://s3-us-west-2.amazonaws.com/qiime2-data/2024.2/'
'tutorials/chimera/atacama-rep-seqs.qza')
table_url = \
('https://s3-us-west-2.amazonaws.com/qiime2-data/2024.2/'
'tutorials/chimera/atacama-table.qza')
use = ArtifactAPIUsage()
def cluster_features_de_novo(use):
rep_seqs = use.init_artifact_from_url('seqs1', rep_seqs_url)
table = use.init_artifact_from_url('table1', table_url)
perc_identity = 0.97
strand = 'plus'
threads = 1
clustered_table, clustered_sequences = use.action(
use.UsageAction('vsearch', 'cluster_features_de_novo'),
use.UsageInputs(sequences=rep_seqs, table=table,
perc_identity=perc_identity, strand=strand,
threads=threads),
use.UsageOutputNames(clustered_table='clustered_table',
clustered_sequences='clustered_sequences')
)
clustered_table.assert_output_type('FeatureTable[Frequency]')
clustered_sequences.assert_output_type('FeatureData[Sequence]')