ampliseq icon indicating copy to clipboard operation
ampliseq copied to clipboard

Export distance matrix files

Open michaelsilverstein opened this issue 4 months ago • 4 comments

Description of feature

While ampliseq outputs beta diversity results by metadata feature to results/qiime2/diversity/beta_diversity/DISTANCE-METRIC_distance_matrix_METADATA-FEATURE, it does not include the raw distance matrix. I see that these matrices are saved within the work directory within a directory called diversity_core (ex. work/57/ce33c441419c48f56572c9f137f2b8/diversity_core/weighted_unifrac_distance_matrix.qza). It would be great to export these raw distance matrix qiime artifacts to results/qiime2/diversity/beta_diversity/.

michaelsilverstein avatar Dec 03 '25 19:12 michaelsilverstein

This may be as simples as adding distance = QIIME2_DIVERSITY_CORE.out.distance to emit in https://github.com/nf-core/ampliseq/blob/master/subworkflows/local/qiime2_diversity.nf?

michaelsilverstein avatar Dec 03 '25 21:12 michaelsilverstein

Hi there,

I think thats covered with --save_intermediates that affects https://github.com/nf-core/ampliseq/blob/d8dd15d5e7760752691357c177bed2e35a2e413f/conf/modules.config#L947-L950

Could you append to you command --save_intermediates -resume and see if that yields what you need? If thats indeed what you were looking for, maybe its not documented properly?

d4straub avatar Dec 04 '25 07:12 d4straub

Hi Daniel, thank you for the prompt response! Yes, this flag works, but, obviously, includes other intermediate files. I'd personally prefer not to output those because many are redundant with those already included in the results folder. I figured users would like the full distance matrices as apart of the standard output without also including these other intermediate files.

michaelsilverstein avatar Dec 05 '25 16:12 michaelsilverstein

Fair point. That could be changed indeed that distance matrix files are by default in the results folder.

d4straub avatar Dec 05 '25 16:12 d4straub

Change merged into dev.

d4straub avatar Mar 12 '26 08:03 d4straub