beta diversity on multiple tables

Hello,

I am trying to run some power calculations using weighted unifrac in Micropower. Micropower won’t directly calculate beta-diversity metrics for unifrac; you have to export their simulated tables and the tree to another program, run the beta-diversity commands, then import the resulting distance matrices back to Micropower. Is there a way to run qiime diversity beta-phylogenetic on multiple tables? Or another command that would run on multiple tables? Or another program that anyone knows of that will do this? (There are a lot of simulated tables!)

@Heather_E, there are multiple good ways to iterate over a collection of tables in QIIME 2, using entry-level programming techniques.

If you prefer the command line interface, you can wrap QIIME 2 commands in a BASH for loop:

for filename in ~/my_data/a_folder_full_of_qzas/*; do 
qiime tools peek "$filename"
done

This will qiime tools peek some.qza for every file in a_folder_full_of_qzas. You can put more than one command inside the do...done portion of the loop, separated by newlines. This will allow you to import a whole directory of biom tables, for example, then run beta-phylogenetic (and whatever else you like) on each one in turn.

If you’re working in the Artifact API, you can use Python’s native for loops to iteratively run a series of commands.

Does that help?
Chris :llama:

2 Likes

Yes, thank you! I’m trying it now…

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.