<jupyter_start><jupyter_text>This notebook is to perform beta-deversity analysis on continuous variables in metadata (Aitchison)<jupyter_code>#Get Aitchison Distance metrix by Deicode
!qiime deicode rpca \
    --i-table mros_deblur_otus_unrare.qza \
    --p-min-feature-count 10 \
    --p-min-sample-count 500 \
    --o-biplot ordination.qza \
    --o-distance-matrix distance.qza
#Get biplot for visualization
!qiime emperor biplot \
    --i-biplot ordination.qza \
    --m-sample-metadata-file mapping_sleep_alpha.txt\
    --m-feature-metadata-file taxonomy.qza \
    --o-visualization biplot.qzv \
    --p-number-of-features 8
!qiime tools export \
  --input-path distance.qza \
  --output-path distance-matrix
#export taxonomy table
!qiime tools export \
  --input-path taxonomy.qza \
  --output-path taxonomy-table
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column AMAMPT_C1 \
    --p-method permanova \
    --o-visualization deicode/amp_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column SLEEPHRS \
    --p-method permanova \
    --o-visualization deicode/SLEEPHRS_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column SLSLPHRS \
    --p-method permanova \
    --o-visualization deicode/SLSLPHRS_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column GIERACE \
    --p-method permanova \
    --o-visualization deicode/GIERACE_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column GIMSTAT \
    --p-method permanova \
    --o-visualization deicode/GIMSTAT_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column M1ADEPR \
    --p-method permanova \
    --o-visualization deicode/M1ADEPR_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column M1BENZO \
    --p-method permanova \
    --o-visualization deicode/M1BENZO_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column MHCHF \
    --p-method permanova \
    --o-visualization deicode/MHCHF_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column MHDEPR \
    --p-method permanova \
    --o-visualization deicode/MHDEPR_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column MHDEPRT \
    --p-method permanova \
    --o-visualization deicode/MHDEPRT_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column MHDIAB \
    --p-method permanova \
    --o-visualization deicode/MHDIAB_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column MHMI \
    --p-method permanova \
    --o-visualization deicode/MHMI_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column MHOA \
    --p-method permanova \
    --o-visualization deicode/MHOA_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column MHRHEU1 \
    --p-method permanova \
    --o-visualization deicode/MHRHEU1_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column PQBADSLP \
    --p-method permanova \
    --o-visualization deicode/PQBADSLP_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column PQPSQUAL \
    --p-method permanova \
    --o-visualization deicode/PQPSQUAL_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column QLCOMP \
    --p-method permanova \
    --o-visualization deicode/QLCOMP_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column SITE \
    --p-method permanova \
    --o-visualization deicode/SITE_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column TUDRAMT_REVISED \
    --p-method permanova \
    --o-visualization deicode/TUDRAMT_REVISED_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column TURSMOKE \
    --p-method permanova \
    --o-visualization deicode/TURSMOKE_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column PQPSLMED \
    --p-method permanova \
    --o-visualization deicode/PQPSLMED_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column PQPSQUAL \
    --p-method permanova \
    --o-visualization deicode/PQPSQUAL_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column QLCOMP \
    --p-method permanova \
    --o-visualization deicode/QLCOMP_sig.qzv
!qiime diversity beta-group-significance \
    --i-distance-matrix distance.qza \
    --m-metadata-file mapping_sleep_alpha.txt \
    --m-metadata-column PQPEFFIC \
    --p-method permanova \
    --o-visualization deicode/PQPEFFIC_sig.qzv<jupyter_output>[32mSaved Visualization to: deicode/PQPEFFIC_sig.qzv[0m
{'fraction_non_alphanumeric': 0.1250759878419453, 'fraction_numerical': 0.0024316109422492403, 'mean_word_length': 2.6199119911991198, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '383115', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 2418, 'n_tokens_neox': 2303, 'n_words': 380, 'path': '3.2 Beta Diversity(Aitchison) -- Categorical (Qiime2).ipynb', 'repo_name': 'knightlab-analyses/mros_sleep_analysis', 'size': '6580'}