view qiime2/merge_feature_table_and_taxonomy.xml @ 8:d66c7509e8f9 draft

Uploaded
author florianbegusch
date Tue, 13 Aug 2019 07:57:53 -0400
parents 914fa4daf16a
children f190567fe3f6
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="merge_feature_table_and_taxonomy" name="merge feature table and taxonomy" version="2019.4">
	<description>- Merge features and taxonomy into a single biom file.</description>
	<requirements>
		<requirement type="package" version="2019.4">qiime2</requirement>
	</requirements>
	<command>
mkdir out;

qiime tools export --input-path $taxonomy_qza --output-path out;
qiime tools export --input-path $biom_qza --output-path out;

sed -i '1s;^;#;' out/*.tsv;
sed -i 's/Confidence/confidence/g' out/*.tsv;
sed -i 's/Taxon/taxonomy/g' out/*.tsv;
sed -i 's/Feature ID/OTU ID/g' out/*.tsv;

biom add-metadata -i out/*.biom -o table_with_sample_metadata.biom --observation-metadata-fp out/*.tsv
;
mv *.biom $biom_and_tax_merged</command>
	<inputs>
		<param label="Feature table" name="biom_qza" type="data" format="qza,no_unzip.zip" collection_type="list"/>
		<param label="Taxonomy" name="taxonomy_qza" type="data" format="qza,no_unzip.zip"/>
	</inputs>
	<outputs>
		<data format="biom2" label="${tool.name} on ${on_string}: biom_and_tax_merged.biom" name="biom_and_tax_merged"/>
	</outputs>
	<help>
	</help>
<macros>
	<import>qiime_citation.xml</import>
</macros>
<expand macro="qiime_citation" />
</tool>