Releases: drostlab/myTAI
v2.3.4
v2.3.0.9006
This update has focused on improving the single-cell phyloset functionality.
The single-cell phylo expression object no longer depends on Seurat. You can construct the ScPhyloExpressionSet either from a count matrix (sparse or dense), using ScPhyloExpressionSet_from_matrix, or from a Seurat object, using ScPhyloExpressionSet_from_seurat. For consistency, one can use BulkPhyloExpressionSet_from_df instead of as_BulkPhyloExpressionSet.
One key functionality of the single-cell object is the ability to switch between different identities when plotting (equivalent to the Seurat::Idents functionality). This is done by setting the ::identities_label property of the object. The ::available_idents property can be used to see what options the user has in setting the current identity. By setting ::idents_colours[[]], the user can choose a colour pallette for the different identities when plotting, which are saved across different plotting calls.
The computation of TAI values for single cell is now cached. Moreover, we have readded the C++ accelerated code for the computation of TAI, which upon profiling shows to be faster than the R version when handling more than 100000 cells (an adaptive function chooses the appropriate implementation for the object size).
Some of the plotting functionality had been improved and more options were added for plotting (e.g. plot_gene_heatmap now allows for passing a custom colour mapping for the rows (genes), instead of colouring them by their strata; plot_signature for single cell should be more readable).
Bug fixes:
- validation of S7 objects now works properly
- printing of object information now works properly (instead of dumping all the properties information)
v2.2.0.9006
Most importantly, new vignettes were added and the website has been updated. Many thanks to @LotharukpongJS
Functionality wise:
- added more input validation across functions
- improved plotting in
destroy_pattern - renamed
tfPStotf_PSand fixed bug which prevented strata transformations from happening (PhyloExpressionSet now has an extra field @strata_values which keeps track of the phylostratum values) - added back standard deviation ribbon to plot_signature
- finer control over cell identity selection in the sc object
- fixed bugs in some of the plotting functions, such as plot_signature_multiple showing the colours in reverse, plot_genes_heatmap not working when given just one gene etc.
v2.1.0.9000
myTAI 2.1.0.9000
Major Refactoring and New Features
- Single-cell support: New
ScPhyloExpressionSetS7 class for single-cell data, alongsideBulkPhyloExpressionSetfor bulk data. - Property renaming:
conditions→identities(andconditions_label→identities_label),counts/counts_collapsed→expression/expression_collapsed. - All core logic and plotting now robust to both bulk and single-cell objects.
Function Renaming and Prefixes
- Statistical tests: All core test functions now use the
stat_prefix:flatline_test()→stat_flatline_test()early_conservation_test()→stat_early_conservation_test()late_conservation_test()→stat_late_conservation_test()reductive_hourglass_test()→stat_reductive_hourglass_test()reverse_hourglass_test()→stat_reverse_hourglass_test()pairwise_test()→stat_pairwise_test()generic_conservation_test()→stat_generic_conservation_test()generate_conservation_txis()→stat_generate_conservation_txis()
- Gene selection/filtering: All gene selection/filtering functions now use the
genes_prefix:top_expression_genes()→genes_top_mean()top_variance_genes()→genes_top_variance()lowly_expressed_genes()→genes_lowly_expressed()filter_dyn_expr()→genes_filter_dynamic()
Other Changes
- Many internal and Rd files renamed for consistency (e.g.,
gene_patterns.R→genes_patterns.R,S7_utils.R→utils_S7.R). - Deprecated/legacy files removed:
expression_utils.R,single_cell.R. - All documentation and examples updated to use new function/property names.
v2.0.0.9000
myTAI 2.0.0
Major Changes
New S7 Class System
- Migrated from traditional R data structures to modern S7 classes
- New
PhyloExpressionSetS7 class replaces the old data.frame-based format - New
TestResultS7 class for standardized storage of statistical test results - Computed properties automatically calculate derived values like TXI, pTXI, conditions, etc.
- Built-in data validation and type checking through S7 properties
- Improved replicate data handling with automatic collapsing
Function Name Modernization
Function names have been updated to use snake_case convention:
Statistical Tests (old → new)
FlatLineTest()→flatline_test()ReductiveHourglassTest()→reductive_hourglass_test()EarlyConservationTest()→early_conservation_test()LateConservationTest()→late_conservation_test()ReverseHourglassTest()→reverse_hourglass_test()PairwiseTest()→pairwise_test()
Visualization Functions (old → new)
PlotSignature()→plot_signature()PlotPattern()→plot_signature()PlotContribution()→plot_contribution()PlotDistribution()→plot_distribution_strata()PlotCategoryExpr()→plot_strata_expression()PlotRE()→plot_relative_expression_line()PlotBarRE()→plot_relative_expression_bar()PlotGeneSet()→plot_gene_profiles()PlotMeans,PlotVars,PlotMedians→plot_strata_expression(aggregate_FUN="mean"/"var"/"median")PlotSignatureMultiple()→plot_signature_multiple()PlotSignatureTransformed()→plot_signature_transformed()PlotSignatureGeneQuantiles()→plot_signature_gene_quantiles()
Utility Functions (old → new)
TAI()→ Computed property of PhyloExpressionSet (still accessible viaTAI())TDI()→ Computed property of PhyloExpressionSet (still accessible viaTDI())TEI()→ Computed property of PhyloExpressionSet (still accessible viaTEI())TPI()→ Computed property of PhyloExpressionSet (still accessible viaTPI())pTAI(),pTDI→sTXI()(generalized for all transcriptomic indices)pMatrix()→pTXI()CollapseReplicates()→collapse, Built into PhyloExpressionSet constructorExpressed()→lowly_expressed_genes()MatchMap()→match_map()SelectGeneSet()→select_genes()TopExpressionGenes()→top_expression_genes()TopVarianceGenes()→top_variance_genes()REMatrix()→rel_exp_matrix()RE()→relative_expression()omitMatrix()→omit_matrix()is.ExpressionSet()→ Built into S7 validationage.apply()→age.apply()(unchanged)tf()→tf()ortransform_counts()tfPS()→tfPS()(unchanged)tfStability()→tf_stability()taxid()→taxid()(unchanged)
New Functions
destroy_pattern(): Apply GATAI algorithm to identify pattern-contributing genesplot_signature_multiple(): Plot multiple signatures on the same plotplot_signature_gene_quantiles(): Plot signature with gene expression quantilesplot_signature_transformed(): Plot signatures with different transformationsplot_sample_space(): Visualize sample relationships using PCA or UMAPplot_mean_var(): Mean-variance relationship plotsplot_gene_profiles(): Individual gene expression profilesplot_distribution_expression(): Expression distribution plotsplot_distribution_pTAI(): Partial TXI distribution plotsplot_distribution_pTAI_qqplot(): Q-Q plots for pTXI distributionsplot_distribution_strata(): Phylostrata distribution plotsplot_gene_heatmap(): Gene expression heatmapsplot_gene_space(): Gene space visualizationplot_cullen_frey(): Cullen-Frey plots for distribution assessmentplot_null_txi_sample(): Null TXI sample plotsas_PhyloExpressionSet(): Convert data to PhyloExpressionSet S7 objectget_sc_TAI(): Single-cell TAI computation for Seurat objectsdiagnose_test_robustness(): Diagnose statistical test robustnessremove_genes(): Remove genes from PhyloExpressionSetPS_colours(): Generate phylostratum color palettesConservationTestResult(): S7 class for conservation test resultsTestResult(): S7 class for statistical test results
Enhanced Features
- Improved performance with parallelized C++ functions using RcppArmadillo
- All plots now use ggplot2 with consistent styling
- Comprehensive unit tests
- Updated to use modern R packages (ggplot2, dplyr, etc.)
Breaking Changes
- Function names have been updated to snake_case convention
- PhyloExpressionSet is now an S7 object instead of a data.frame
- Function signatures have been updated for consistency
- Some deprecated functions have been removed
- New package dependencies: S7, RcppArmadillo
Migration Guide
To migrate from myTAI 1.x to 2.0:
-
Convert data format:
# Old format (data.frame) old_phyex <- PhyloExpressionSetExample # New format (S7 object) new_phyex <- as_PhyloExpressionSet(old_phyex)
-
Update function calls:
# Old syntax PlotSignature(phyex_set, TestStatistic = "FlatLineTest") # New syntax plot_signature(phyex_set, conservation_test = flatline_test)
-
Access computed properties:
# Old syntax tai_values <- TAI(phyex_set) # New syntax tai_values <- phyex_set@TXI # or tai_values <- TAI(phyex_set)
myTAI v1.0
This is the historic version of myTAI