Phyloseq objects used in the workflow (ps_*)

!!!!! Good candidate for the workshop for the clinicians !!!!!

Mapping new ps_* objects to the old ps.ng.tax* objects (and overwrite notes)

ps_* object What it contains Old R-script equivalent (ps.ng.tax*) Overwrite notes for old object(s) Taxonomic composition Alpha diversity Beta diversity DESeq2 differential abundance
ps_raw Raw imported phyloseq object (integer counts; as imported) (no direct equivalent) ⚠️ only if you also apply sample filtering first
ps_base ps_raw + taxonomy + sample metadata aligned (still raw counts) (closest to) ps.ng.tax before overwrite Old ps.ng.tax BEFORE overwrite: integer count table (absolute abundance). ⚠️ only if you also apply sample filtering first
ps_pruned Optional subset of ps_base (e.g., remove unwanted samples by ID/pattern); still raw counts (subset of) ps.ng.tax before overwrite Old ps.ng.tax BEFORE overwrite: same as above, but without any sample subsetting unless you did it. ⚠️ only if you also apply low-depth filtering
ps_filt Filtered samples (low-depth samples removed) + taxa with nonzero totals; absolute counts ps.ng.tax before overwrite (but with explicit low-depth filtering) Old ps.ng.tax BEFORE overwrite: raw integer counts; new ps_filt is the “cleaned” version after sample-depth QC. ✅ as a starting point (but plot on ps_rel) ✅ as input to rarefaction ✅ as input to rarefaction ✅ as input to ps_deseq
ps_rel Relative abundance (compositional) computed from ps_filt ps.ng.tax_rel (conceptually) In the old script, ps.ng.tax_rel is “relative abundance of ps.ng.tax”, but its meaning depends on whether it was computed before or after ps.ng.tax was overwritten. ✅ primary
ps_abund Absolute counts after “plotting taxa filter” (e.g., mean rel. abundance > 0.1%), derived from ps_filt via ps_rel ps.ng.tax_abund Old ps.ng.tax_abund was created by filtering taxa using mean relative abundance (> 0.001) and then pruning counts. ✅ (if you want cleaner plots) (not recommended)
ps_abund_rel Relative abundance computed from ps_abund (filtered taxa set) ps.ng.tax_abund_rel Old ps.ng.tax_abund_rel was relative abundance of the filtered-taxa object. ✅ (clean composition plots)
ps_rarefied Rarefied counts from ps_filt (even depth) ps.ng.tax after overwrite Old ps.ng.tax was overwritten 1× by rarefy_even_depth(ps.ng.tax, sample.size = 41764) → after this, ps.ng.tax no longer meant raw counts; it meant rarefied counts. ✅ primary ✅ primary
ps_deseq Non-rarefied integer counts from ps_filt + optional count-based taxon prefilter (e.g., total ≥ 10) (no direct equivalent) Old ps.ng.tax_abund is not a good DESeq2 analogue because it used a mean-relative-abundance filter; ps_deseq uses count-based prefiltering (optional) and keeps integer counts. ✅ primary

Overwrite summary (old script):

  • ps.ng.tax was overwritten 1 time:
    • Before overwrite: ps.ng.tax = absolute abundance (raw integer counts).
    • After overwrite: ps.ng.tax = rarefied counts, produced by rarefy_even_depth(ps.ng.tax, sample.size = 41764).
ps_* object What it contains Taxonomic composition Alpha diversity Beta diversity DESeq2 differential abundance
ps_raw Raw imported phyloseq object (integer counts; as imported) ❌ (not recommended directly) ⚠️ only if you also apply sample filtering first
ps_base ps_raw + taxonomy + sample metadata aligned (still raw counts) ⚠️ only if you also apply sample filtering first
ps_pruned Optional subset of ps_base (e.g., remove unwanted samples by ID/pattern); still raw counts ⚠️ only if you also apply low-depth filtering
ps_filt Filtered samples (low-depth samples removed) + taxa with nonzero totals; absolute counts ✅ as a starting point (but plot on ps_rel) ✅ as the input to rarefaction ✅ as the input to rarefaction ✅ as the input to ps_deseq
ps_rel Relative abundance (compositional) computed from ps_filt ✅ primary
ps_abund Absolute counts after “plotting taxa filter” (e.g., mean rel. abundance > 0.1%), derived from ps_filt via ps_rel ✅ (if you want cleaner plots) ❌ (not recommended)
ps_abund_rel Relative abundance computed from ps_abund (filtered taxa set) ✅ (clean composition plots)
ps_rarefied Rarefied counts from ps_filt (even depth) ✅ primary ✅ primary
ps_deseq Non-rarefied integer counts from ps_filt + optional count-based taxon prefilter (e.g., total ≥ 10) ✅ primary

Leave a Reply

Your email address will not be published. Required fields are marked *