============================================================ BARNACLE ANALYSIS LOG Started: 2025-11-06 11:13:10 Log file: ../output/13.00-multiomics-barnacle/barnacle_analysis_log_20251106_111310.txt ============================================================ Working in output directory: ../output/13.00-multiomics-barnacle Loaded normalized data: Apul: (10223, 41) Peve: (10223, 37) Ptua: (10223, 37) Common genes across all species: 10223 Filtered to common genes: Apul: (10223, 40) Peve: (10223, 36) Ptua: (10223, 36) Parsing sample information for each species... apul: Samples: 10 (['ACR.139', 'ACR.145', 'ACR.150']...) Timepoints: [1, 2, 3, 4] peve: Samples: 9 (['POR.216', 'POR.245', 'POR.260']...) Timepoints: [1, 2, 3, 4] ptua: Samples: 9 (['POC.219', 'POC.222', 'POC.255']...) Timepoints: [1, 2, 3, 4] Timepoints found across all species: [1, 2, 3, 4] Maximum samples in any species: 10 Detailed sample structure: apul: 10 samples × 4 timepoints peve: 9 samples × 4 timepoints ptua: 9 samples × 4 timepoints Creating 3D tensor by combining species and samples... Note: R-level filtering has already removed samples without all 4 timepoints Processing apul: Added ACR.139 with 4 timepoints: [1, 2, 3, 4] Added ACR.145 with 4 timepoints: [1, 2, 3, 4] Added ACR.150 with 4 timepoints: [1, 2, 3, 4] Added ACR.173 with 4 timepoints: [1, 2, 3, 4] Added ACR.186 with 4 timepoints: [1, 2, 3, 4] Added ACR.225 with 4 timepoints: [1, 2, 3, 4] Added ACR.229 with 4 timepoints: [1, 2, 3, 4] Added ACR.237 with 4 timepoints: [1, 2, 3, 4] Added ACR.244 with 4 timepoints: [1, 2, 3, 4] Added ACR.265 with 4 timepoints: [1, 2, 3, 4] Processing peve: Added POR.216 with 4 timepoints: [1, 2, 3, 4] Added POR.245 with 4 timepoints: [1, 2, 3, 4] Added POR.260 with 4 timepoints: [1, 2, 3, 4] Added POR.262 with 4 timepoints: [1, 2, 3, 4] Added POR.69 with 4 timepoints: [1, 2, 3, 4] Added POR.72 with 4 timepoints: [1, 2, 3, 4] Added POR.73 with 4 timepoints: [1, 2, 3, 4] Added POR.74 with 4 timepoints: [1, 2, 3, 4] Added POR.83 with 4 timepoints: [1, 2, 3, 4] Processing ptua: Added POC.219 with 4 timepoints: [1, 2, 3, 4] Added POC.222 with 4 timepoints: [1, 2, 3, 4] Added POC.255 with 4 timepoints: [1, 2, 3, 4] Added POC.259 with 4 timepoints: [1, 2, 3, 4] Added POC.40 with 4 timepoints: [1, 2, 3, 4] Added POC.42 with 4 timepoints: [1, 2, 3, 4] Added POC.52 with 4 timepoints: [1, 2, 3, 4] Added POC.53 with 4 timepoints: [1, 2, 3, 4] Added POC.57 with 4 timepoints: [1, 2, 3, 4] Creating 3D tensor with shape: (10223, 28, 4) Combined samples from all species: 28 === TENSOR STATISTICS === Tensor shape: (10223, 28, 4) Total elements: 1144976 Finite values: 1144976 Missing/NaN values: 0 Missing percentage: 0.00% Filled 112 sample-timepoint combinations Missing 0 sample-timepoint combinations Non-zero finite values: 1128956 Zero finite values: 16020 Sparsity among finite values: 1.40% Sample mapping: combined_index sample_label species sample_id 0 0 apul_ACR.139 apul ACR.139 1 1 apul_ACR.145 apul ACR.145 2 2 apul_ACR.150 apul ACR.150 3 3 apul_ACR.173 apul ACR.173 4 4 apul_ACR.186 apul ACR.186 5 5 apul_ACR.225 apul ACR.225 6 6 apul_ACR.229 apul ACR.229 7 7 apul_ACR.237 apul ACR.237 8 8 apul_ACR.244 apul ACR.244 9 9 apul_ACR.265 apul ACR.265 Rank comparison helper functions loaded ============================================================ FACTOR MATCH SCORE (FMS) EVALUATION ============================================================ This analysis evaluates decomposition quality using the Factor Match Score from the tensorly-viz (tlviz) library, which measures how well the decomposed factors match the original tensor structure. ============================================================ Found 12 successful ranks to evaluate: [5, 8, 10, 12, 15, 20, 25, 35, 45, 55, 65, 75] --- Evaluating FMS for Rank 5 --- Loaded factor matrices - Genes: (10223, 5), Samples: (28, 5), Time: (4, 5) Reconstruction FMS: 0.7601 (correlation: 0.5202) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 8 --- Loaded factor matrices - Genes: (10223, 8), Samples: (28, 8), Time: (4, 8) Reconstruction FMS: 0.8003 (correlation: 0.6005) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 10 --- Loaded factor matrices - Genes: (10223, 10), Samples: (28, 10), Time: (4, 10) Reconstruction FMS: 0.8225 (correlation: 0.6451) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 12 --- Loaded factor matrices - Genes: (10223, 12), Samples: (28, 12), Time: (4, 12) Reconstruction FMS: 0.8398 (correlation: 0.6797) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 15 --- Loaded factor matrices - Genes: (10223, 15), Samples: (28, 15), Time: (4, 15) Reconstruction FMS: 0.8610 (correlation: 0.7219) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 20 --- Loaded factor matrices - Genes: (10223, 20), Samples: (28, 20), Time: (4, 20) Reconstruction FMS: 0.8863 (correlation: 0.7726) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 25 --- Loaded factor matrices - Genes: (10223, 25), Samples: (28, 25), Time: (4, 25) Reconstruction FMS: 0.9059 (correlation: 0.8118) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 35 --- Loaded factor matrices - Genes: (10223, 35), Samples: (28, 35), Time: (4, 35) Reconstruction FMS: 0.9341 (correlation: 0.8681) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 45 --- Loaded factor matrices - Genes: (10223, 45), Samples: (28, 45), Time: (4, 45) Reconstruction FMS: 0.9533 (correlation: 0.9066) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 55 --- Loaded factor matrices - Genes: (10223, 55), Samples: (28, 55), Time: (4, 55) Reconstruction FMS: 0.9663 (correlation: 0.9326) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 65 --- Loaded factor matrices - Genes: (10223, 65), Samples: (28, 65), Time: (4, 65) Reconstruction FMS: 0.9761 (correlation: 0.9523) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 75 --- Loaded factor matrices - Genes: (10223, 75), Samples: (28, 75), Time: (4, 75) Reconstruction FMS: 0.9838 (correlation: 0.9676) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json ============================================================ FMS RESULTS SUMMARY ============================================================ Saved FMS comparison table to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv Factor Match Score Results: rank fms_tlviz fms_reconstruction reconstruction_correlation 5 NaN 0.7601 0.5202 8 NaN 0.8003 0.6005 10 NaN 0.8225 0.6451 12 NaN 0.8398 0.6797 15 NaN 0.8610 0.7219 20 NaN 0.8863 0.7726 25 NaN 0.9059 0.8118 35 NaN 0.9341 0.8681 45 NaN 0.9533 0.9066 55 NaN 0.9663 0.9326 65 NaN 0.9761 0.9523 75 NaN 0.9838 0.9676 ============================================================ NOTE: TLViz FMS unavailable (scipy version incompatibility) ============================================================ This is expected and normal with scipy >= 1.14. The Reconstruction FMS provides equivalent functionality. ============================================================ [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score vs Rank\n(Reconstruction-based FMS - Primary Metric)') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Reconstruction Correlation') Text(0.5, 1.0, 'Tensor Reconstruction Quality vs Rank\n(Correlation between original and reconstructed)') (-1.05, 1.05) Saved FMS plot to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores_plot.png ============================================================ FMS-BASED RANK RECOMMENDATION ============================================================ Best Reconstruction FMS: Rank 75 (score: 0.9838) Best Reconstruction Correlation: Rank 75 (score: 0.9676) TLViz FMS: Not available (SciPy compatibility issue) High-scoring ranks (top 20%): [55, 65, 75] Threshold: 0.9637 FMS Interpretation: • Reconstruction FMS is the PRIMARY metric for rank selection - Measures tensor reconstruction quality (0-1 scale) - Based on correlation between original and decomposed tensors • Reconstruction correlation shows direct fit quality (-1 to 1) - Values > 0.9 indicate excellent reconstruction - Values > 0.8 indicate good reconstruction • Higher scores = better factor recovery and model fit • Consider ranks with consistently high Reconstruction FMS (top 20%) Note: TLViz FMS unavailable due to scipy >= 1.14 incompatibility (This is normal and does not affect analysis quality) ============================================================ FACTOR MATCH SCORE EVALUATION COMPLETE ============================================================ Summary: 12/12 ranks have valid Reconstruction FMS 0/12 ranks have valid TLViz FMS → Use Reconstruction FMS and correlation for rank selection ============================================================ FACTOR MATCH SCORE (FMS) EVALUATION ============================================================ This analysis evaluates decomposition quality using the Factor Match Score from the tensorly-viz (tlviz) library, which measures how well the decomposed factors match the original tensor structure. ============================================================ Found 12 successful ranks to evaluate: [5, 8, 10, 12, 15, 20, 25, 35, 45, 55, 65, 75] --- Evaluating FMS for Rank 5 --- Loaded factor matrices - Genes: (10223, 5), Samples: (28, 5), Time: (4, 5) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.7601 (correlation: 0.5202) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 8 --- Loaded factor matrices - Genes: (10223, 8), Samples: (28, 8), Time: (4, 8) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.8003 (correlation: 0.6005) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 10 --- Loaded factor matrices - Genes: (10223, 10), Samples: (28, 10), Time: (4, 10) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.8225 (correlation: 0.6451) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 12 --- Loaded factor matrices - Genes: (10223, 12), Samples: (28, 12), Time: (4, 12) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.8398 (correlation: 0.6797) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 15 --- Loaded factor matrices - Genes: (10223, 15), Samples: (28, 15), Time: (4, 15) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.8610 (correlation: 0.7219) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 20 --- Loaded factor matrices - Genes: (10223, 20), Samples: (28, 20), Time: (4, 20) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.8863 (correlation: 0.7726) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 25 --- Loaded factor matrices - Genes: (10223, 25), Samples: (28, 25), Time: (4, 25) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.9059 (correlation: 0.8118) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 35 --- Loaded factor matrices - Genes: (10223, 35), Samples: (28, 35), Time: (4, 35) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.9341 (correlation: 0.8681) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 45 --- Loaded factor matrices - Genes: (10223, 45), Samples: (28, 45), Time: (4, 45) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.9533 (correlation: 0.9066) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 55 --- Loaded factor matrices - Genes: (10223, 55), Samples: (28, 55), Time: (4, 55) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.9663 (correlation: 0.9326) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 65 --- Loaded factor matrices - Genes: (10223, 65), Samples: (28, 65), Time: (4, 65) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.9761 (correlation: 0.9523) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 75 --- Loaded factor matrices - Genes: (10223, 75), Samples: (28, 75), Time: (4, 75) TLViz FMS: Failed - 'MockDecomposition' object is not subscriptable (method: failed) Reconstruction FMS: 0.9838 (correlation: 0.9676) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json ============================================================ FMS RESULTS SUMMARY ============================================================ Saved FMS comparison table to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv Factor Match Score Results: rank fms_tlviz fms_reconstruction reconstruction_correlation 5 NaN 0.7601 0.5202 8 NaN 0.8003 0.6005 10 NaN 0.8225 0.6451 12 NaN 0.8398 0.6797 15 NaN 0.8610 0.7219 20 NaN 0.8863 0.7726 25 NaN 0.9059 0.8118 35 NaN 0.9341 0.8681 45 NaN 0.9533 0.9066 55 NaN 0.9663 0.9326 65 NaN 0.9761 0.9523 75 NaN 0.9838 0.9676 ============================================================ NOTE: TLViz FMS unavailable (scipy version incompatibility) ============================================================ This is expected and normal with scipy >= 1.14. The Reconstruction FMS provides equivalent functionality. ============================================================ [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score vs Rank\n(Reconstruction-based FMS - Primary Metric)') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Reconstruction Correlation') Text(0.5, 1.0, 'Tensor Reconstruction Quality vs Rank\n(Correlation between original and reconstructed)') (-1.05, 1.05) Saved FMS plot to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores_plot.png ============================================================ FMS-BASED RANK RECOMMENDATION ============================================================ Best Reconstruction FMS: Rank 75 (score: 0.9838) Best Reconstruction Correlation: Rank 75 (score: 0.9676) TLViz FMS: Not available (SciPy compatibility issue) High-scoring ranks (top 20%): [55, 65, 75] Threshold: 0.9637 FMS Interpretation: • Reconstruction FMS is the PRIMARY metric for rank selection - Measures tensor reconstruction quality (0-1 scale) - Based on correlation between original and decomposed tensors • Reconstruction correlation shows direct fit quality (-1 to 1) - Values > 0.9 indicate excellent reconstruction - Values > 0.8 indicate good reconstruction • Higher scores = better factor recovery and model fit • Consider ranks with consistently high Reconstruction FMS (top 20%) Note: TLViz FMS unavailable due to scipy >= 1.14 incompatibility (This is normal and does not affect analysis quality) ============================================================ FACTOR MATCH SCORE EVALUATION COMPLETE ============================================================ Summary: 12/12 ranks have valid Reconstruction FMS 0/12 ranks have valid TLViz FMS → Use Reconstruction FMS and correlation for rank selection ============================================================ FACTOR MATCH SCORE (FMS) EVALUATION ============================================================ This analysis evaluates decomposition quality using the Factor Match Score from the tensorly-viz (tlviz) library, which measures how well the decomposed factors match the original tensor structure. ============================================================ Found 12 successful ranks to evaluate: [5, 8, 10, 12, 15, 20, 25, 35, 45, 55, 65, 75] --- Evaluating FMS for Rank 5 --- Loaded factor matrices - Genes: (10223, 5), Samples: (28, 5), Time: (4, 5) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.7601 (correlation: 0.5202) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 8 --- Loaded factor matrices - Genes: (10223, 8), Samples: (28, 8), Time: (4, 8) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.8003 (correlation: 0.6005) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 10 --- Loaded factor matrices - Genes: (10223, 10), Samples: (28, 10), Time: (4, 10) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.8225 (correlation: 0.6451) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 12 --- Loaded factor matrices - Genes: (10223, 12), Samples: (28, 12), Time: (4, 12) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.8398 (correlation: 0.6797) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 15 --- Loaded factor matrices - Genes: (10223, 15), Samples: (28, 15), Time: (4, 15) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.8610 (correlation: 0.7219) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 20 --- Loaded factor matrices - Genes: (10223, 20), Samples: (28, 20), Time: (4, 20) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.8863 (correlation: 0.7726) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 25 --- Loaded factor matrices - Genes: (10223, 25), Samples: (28, 25), Time: (4, 25) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.9059 (correlation: 0.8118) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 35 --- Loaded factor matrices - Genes: (10223, 35), Samples: (28, 35), Time: (4, 35) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.9341 (correlation: 0.8681) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 45 --- Loaded factor matrices - Genes: (10223, 45), Samples: (28, 45), Time: (4, 45) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.9533 (correlation: 0.9066) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 55 --- Loaded factor matrices - Genes: (10223, 55), Samples: (28, 55), Time: (4, 55) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.9663 (correlation: 0.9326) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 65 --- Loaded factor matrices - Genes: (10223, 65), Samples: (28, 65), Time: (4, 65) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.9761 (correlation: 0.9523) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 75 --- Loaded factor matrices - Genes: (10223, 75), Samples: (28, 75), Time: (4, 75) TLViz FMS: 1.0000 ✅ Reconstruction FMS: 0.9838 (correlation: 0.9676) Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json ============================================================ FMS RESULTS SUMMARY ============================================================ Saved FMS comparison table to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv Factor Match Score Results: rank fms_tlviz fms_reconstruction reconstruction_correlation 5 1.0000 0.7601 0.5202 8 1.0000 0.8003 0.6005 10 1.0000 0.8225 0.6451 12 1.0000 0.8398 0.6797 15 1.0000 0.8610 0.7219 20 1.0000 0.8863 0.7726 25 1.0000 0.9059 0.8118 35 1.0000 0.9341 0.8681 45 1.0000 0.9533 0.9066 55 1.0000 0.9663 0.9326 65 1.0000 0.9761 0.9523 75 1.0000 0.9838 0.9676 [] [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score vs Rank\n(Higher = Better Factor Recovery)') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Reconstruction Correlation') Text(0.5, 1.0, 'Tensor Reconstruction Quality vs Rank\n(Correlation between original and reconstructed)') (-1.05, 1.05) Saved FMS plot to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores_plot.png ============================================================ FMS-BASED RANK RECOMMENDATION ============================================================ Best Reconstruction FMS: Rank 75 (score: 0.9838) Best Reconstruction Correlation: Rank 75 (score: 0.9676) Best TLViz FMS: Rank 10 (score: 1.0000) High-scoring ranks (top 20%): [55, 65, 75] Threshold: 0.9637 FMS Interpretation: • Reconstruction FMS is the PRIMARY metric for rank selection - Measures tensor reconstruction quality (0-1 scale) - Based on correlation between original and decomposed tensors • Reconstruction correlation shows direct fit quality (-1 to 1) - Values > 0.9 indicate excellent reconstruction - Values > 0.8 indicate good reconstruction • Higher scores = better factor recovery and model fit • Consider ranks with consistently high Reconstruction FMS (top 20%) • TLViz FMS available and can be used for additional validation ============================================================ FACTOR MATCH SCORE EVALUATION COMPLETE ============================================================ Summary: 12/12 ranks have valid Reconstruction FMS 12/12 ranks have valid TLViz FMS → Use Reconstruction FMS and correlation for rank selection ============================================================ FACTOR MATCH SCORE (FMS) EVALUATION ============================================================ This analysis evaluates decomposition quality using the Factor Match Score from the tensorly-viz (tlviz) library, which measures how well the decomposed factors match the original tensor structure. ============================================================ Found 12 successful ranks to evaluate: [5, 8, 10, 12, 15, 20, 25, 35, 45, 55, 65, 75] --- Evaluating FMS for Rank 5 --- Loaded factor matrices - Genes: (10223, 5), Samples: (28, 5), Time: (4, 5) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.7601 (correlation: 0.5202) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 8 --- Loaded factor matrices - Genes: (10223, 8), Samples: (28, 8), Time: (4, 8) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8003 (correlation: 0.6005) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 10 --- Loaded factor matrices - Genes: (10223, 10), Samples: (28, 10), Time: (4, 10) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8225 (correlation: 0.6451) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 12 --- Loaded factor matrices - Genes: (10223, 12), Samples: (28, 12), Time: (4, 12) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8398 (correlation: 0.6797) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 15 --- Loaded factor matrices - Genes: (10223, 15), Samples: (28, 15), Time: (4, 15) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8610 (correlation: 0.7219) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 20 --- Loaded factor matrices - Genes: (10223, 20), Samples: (28, 20), Time: (4, 20) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8863 (correlation: 0.7726) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 25 --- Loaded factor matrices - Genes: (10223, 25), Samples: (28, 25), Time: (4, 25) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9059 (correlation: 0.8118) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 35 --- Loaded factor matrices - Genes: (10223, 35), Samples: (28, 35), Time: (4, 35) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9341 (correlation: 0.8681) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 45 --- Loaded factor matrices - Genes: (10223, 45), Samples: (28, 45), Time: (4, 45) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9533 (correlation: 0.9066) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 55 --- Loaded factor matrices - Genes: (10223, 55), Samples: (28, 55), Time: (4, 55) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9663 (correlation: 0.9326) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 65 --- Loaded factor matrices - Genes: (10223, 65), Samples: (28, 65), Time: (4, 65) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9761 (correlation: 0.9523) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 75 --- Loaded factor matrices - Genes: (10223, 75), Samples: (28, 75), Time: (4, 75) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9838 (correlation: 0.9676) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json ============================================================ FMS RESULTS SUMMARY ============================================================ Saved FMS comparison table to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv ============================================================ FACTOR MATCH SCORE RESULTS ============================================================ ⚠️ NOTE: TLViz FMS compares decomposition to itself (always ~1.0) ⭐ USE RECONSTRUCTION FMS for rank selection (compares to original tensor) ============================================================ rank fms_tlviz fms_reconstruction reconstruction_correlation 5 1.0000 0.7601 0.5202 8 1.0000 0.8003 0.6005 10 1.0000 0.8225 0.6451 12 1.0000 0.8398 0.6797 15 1.0000 0.8610 0.7219 20 1.0000 0.8863 0.7726 25 1.0000 0.9059 0.8118 35 1.0000 0.9341 0.8681 45 1.0000 0.9533 0.9066 55 1.0000 0.9663 0.9326 65 1.0000 0.9761 0.9523 75 1.0000 0.9838 0.9676 ============================================================ ⚠️ WARNING: TLViz FMS shows all values near 1.0 ============================================================ This indicates self-comparison (decomposition vs itself). This is NOT useful for rank selection. → USE RECONSTRUCTION FMS instead (varies by rank: 0.76-0.98) ============================================================ [] [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score vs Rank\n(Higher = Better Factor Recovery)') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Reconstruction Correlation') Text(0.5, 1.0, 'Tensor Reconstruction Quality vs Rank\n(Correlation between original and reconstructed)') (-1.05, 1.05) Saved FMS plot to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores_plot.png ============================================================ FMS-BASED RANK RECOMMENDATION ============================================================ Best Reconstruction FMS: Rank 75 (score: 0.9838) Best Reconstruction Correlation: Rank 75 (score: 0.9676) Best TLViz FMS: Rank 10 (score: 1.0000) High-scoring ranks (top 20%): [55, 65, 75] Threshold: 0.9637 FMS Interpretation: • Reconstruction FMS is the PRIMARY metric for rank selection - Measures tensor reconstruction quality (0-1 scale) - Based on correlation between original and decomposed tensors • Reconstruction correlation shows direct fit quality (-1 to 1) - Values > 0.9 indicate excellent reconstruction - Values > 0.8 indicate good reconstruction • Higher scores = better factor recovery and model fit • Consider ranks with consistently high Reconstruction FMS (top 20%) • TLViz FMS available and can be used for additional validation ============================================================ FACTOR MATCH SCORE EVALUATION COMPLETE ============================================================ Summary: 12/12 ranks have valid Reconstruction FMS 12/12 ranks have valid TLViz FMS → Use Reconstruction FMS and correlation for rank selection ============================================================ FACTOR MATCH SCORE (FMS) EVALUATION ============================================================ This analysis evaluates decomposition quality using the Factor Match Score from the tensorly-viz (tlviz) library, which measures how well the decomposed factors match the original tensor structure. ============================================================ Found 12 successful ranks to evaluate: [5, 8, 10, 12, 15, 20, 25, 35, 45, 55, 65, 75] --- Evaluating FMS for Rank 5 --- Loaded factor matrices - Genes: (10223, 5), Samples: (28, 5), Time: (4, 5) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.7601 (correlation: 0.5202) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 8 --- Loaded factor matrices - Genes: (10223, 8), Samples: (28, 8), Time: (4, 8) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8003 (correlation: 0.6005) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 10 --- Loaded factor matrices - Genes: (10223, 10), Samples: (28, 10), Time: (4, 10) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8225 (correlation: 0.6451) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 12 --- Loaded factor matrices - Genes: (10223, 12), Samples: (28, 12), Time: (4, 12) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8398 (correlation: 0.6797) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 15 --- Loaded factor matrices - Genes: (10223, 15), Samples: (28, 15), Time: (4, 15) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8610 (correlation: 0.7219) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 20 --- Loaded factor matrices - Genes: (10223, 20), Samples: (28, 20), Time: (4, 20) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8863 (correlation: 0.7726) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 25 --- Loaded factor matrices - Genes: (10223, 25), Samples: (28, 25), Time: (4, 25) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9059 (correlation: 0.8118) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 35 --- Loaded factor matrices - Genes: (10223, 35), Samples: (28, 35), Time: (4, 35) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9341 (correlation: 0.8681) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 45 --- Loaded factor matrices - Genes: (10223, 45), Samples: (28, 45), Time: (4, 45) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9533 (correlation: 0.9066) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 55 --- Loaded factor matrices - Genes: (10223, 55), Samples: (28, 55), Time: (4, 55) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9663 (correlation: 0.9326) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 65 --- Loaded factor matrices - Genes: (10223, 65), Samples: (28, 65), Time: (4, 65) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9761 (correlation: 0.9523) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 75 --- Loaded factor matrices - Genes: (10223, 75), Samples: (28, 75), Time: (4, 75) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9838 (correlation: 0.9676) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 Saved FMS results to: factor_match_score.json ============================================================ FMS RESULTS SUMMARY ============================================================ Saved FMS comparison table to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv ============================================================ FACTOR MATCH SCORE RESULTS ============================================================ ⚠️ NOTE: TLViz FMS compares decomposition to itself (always ~1.0) ⭐ USE RECONSTRUCTION FMS for rank selection (compares to original tensor) ============================================================ rank fms_tlviz fms_reconstruction reconstruction_correlation 5 1.0000 0.7601 0.5202 8 1.0000 0.8003 0.6005 10 1.0000 0.8225 0.6451 12 1.0000 0.8398 0.6797 15 1.0000 0.8610 0.7219 20 1.0000 0.8863 0.7726 25 1.0000 0.9059 0.8118 35 1.0000 0.9341 0.8681 45 1.0000 0.9533 0.9066 55 1.0000 0.9663 0.9326 65 1.0000 0.9761 0.9523 75 1.0000 0.9838 0.9676 ============================================================ ⚠️ WARNING: TLViz FMS shows all values near 1.0 ============================================================ This indicates self-comparison (decomposition vs itself). This is NOT useful for rank selection. → USE RECONSTRUCTION FMS instead (varies by rank: 0.76-0.98) ============================================================ [] [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score vs Rank\n(Higher = Better Factor Recovery)') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Reconstruction Correlation') Text(0.5, 1.0, 'Tensor Reconstruction Quality vs Rank\n(Correlation between original and reconstructed)') (-1.05, 1.05) Saved FMS plot to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores_plot.png ============================================================ FMS-BASED RANK RECOMMENDATION ============================================================ Best Reconstruction FMS: Rank 75 (score: 0.9838) Best Reconstruction Correlation: Rank 75 (score: 0.9676) Best TLViz FMS: Rank 10 (score: 1.0000) High-scoring ranks (top 20%): [55, 65, 75] Threshold: 0.9637 FMS Interpretation: • Reconstruction FMS is the PRIMARY metric for rank selection - Measures tensor reconstruction quality (0-1 scale) - Based on correlation between original and decomposed tensors • Reconstruction correlation shows direct fit quality (-1 to 1) - Values > 0.9 indicate excellent reconstruction - Values > 0.8 indicate good reconstruction • Higher scores = better factor recovery and model fit • Consider ranks with consistently high Reconstruction FMS (top 20%) • TLViz FMS available and can be used for additional validation ============================================================ FACTOR MATCH SCORE EVALUATION COMPLETE ============================================================ Summary: 12/12 ranks have valid Reconstruction FMS 12/12 ranks have valid TLViz FMS → Use Reconstruction FMS and correlation for rank selection ============================================================ FACTOR MATCH SCORE (FMS) EVALUATION ============================================================ This analysis evaluates decomposition quality using the Factor Match Score from the tensorly-viz (tlviz) library, which measures how well the decomposed factors match the original tensor structure. ============================================================ Found 12 successful ranks to evaluate: [5, 8, 10, 12, 15, 20, 25, 35, 45, 55, 65, 75] ============================================================ ⚠️ SYNTHETIC VALIDATION ENABLED ============================================================ This will test factor recovery by: 1. Creating synthetic tensor from each decomposition 2. Adding noise to test robustness 3. Re-decomposing to see if factors are recovered Expected additional time: 18-24 minutes ============================================================ --- Evaluating FMS for Rank 5 --- Loaded factor matrices - Genes: (10223, 5), Samples: (28, 5), Time: (4, 5) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.7601 (correlation: 0.5202) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.6170 (fair recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 8 --- Loaded factor matrices - Genes: (10223, 8), Samples: (28, 8), Time: (4, 8) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8003 (correlation: 0.6005) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.6859 (fair recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 10 --- Loaded factor matrices - Genes: (10223, 10), Samples: (28, 10), Time: (4, 10) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8225 (correlation: 0.6451) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.9071 (excellent recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 12 --- Loaded factor matrices - Genes: (10223, 12), Samples: (28, 12), Time: (4, 12) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8398 (correlation: 0.6797) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.5074 (fair recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 15 --- Loaded factor matrices - Genes: (10223, 15), Samples: (28, 15), Time: (4, 15) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8610 (correlation: 0.7219) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.7324 (good recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 20 --- Loaded factor matrices - Genes: (10223, 20), Samples: (28, 20), Time: (4, 20) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.8863 (correlation: 0.7726) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.4963 (poor recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 25 --- Loaded factor matrices - Genes: (10223, 25), Samples: (28, 25), Time: (4, 25) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9059 (correlation: 0.8118) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.6034 (fair recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 35 --- Loaded factor matrices - Genes: (10223, 35), Samples: (28, 35), Time: (4, 35) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9341 (correlation: 0.8681) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.5673 (fair recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 45 --- Loaded factor matrices - Genes: (10223, 45), Samples: (28, 45), Time: (4, 45) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9533 (correlation: 0.9066) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.5851 (fair recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 55 --- Loaded factor matrices - Genes: (10223, 55), Samples: (28, 55), Time: (4, 55) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9663 (correlation: 0.9326) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.4969 (poor recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 65 --- Loaded factor matrices - Genes: (10223, 65), Samples: (28, 65), Time: (4, 65) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9761 (correlation: 0.9523) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.5136 (fair recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json --- Evaluating FMS for Rank 75 --- Loaded factor matrices - Genes: (10223, 75), Samples: (28, 75), Time: (4, 75) Running synthetic validation (this may take 1-2 minutes)... /home/shared/barnacle/barnacle/decomposition.py:268: UserWarning: Algorithm failed to converge after 5000 iterations warnings.warn(message) TLViz FMS: 1.0000 ⚠️ (self-consistency check only) ⭐ RECONSTRUCTION FMS: 0.9838 (correlation: 0.9676) ⭐ ↳ Primary metric for rank selection ↳ Valid elements used: 1,144,976 🔬 SYNTHETIC FMS: 0.4539 (poor recovery with 10% noise) ↳ Tests factor recovery robustness Saved FMS results to: factor_match_score.json ============================================================ FMS RESULTS SUMMARY ============================================================ Saved FMS comparison table to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv ============================================================ FACTOR MATCH SCORE RESULTS ============================================================ ⚠️ NOTE: TLViz FMS compares decomposition to itself (always ~1.0) ⭐ USE RECONSTRUCTION FMS for rank selection (compares to original tensor) 🔬 SYNTHETIC FMS validates factor recovery robustness (optional) ============================================================ rank fms_tlviz fms_reconstruction reconstruction_correlation fms_synthetic 5 1.0000 0.7601 0.5202 0.6170 8 1.0000 0.8003 0.6005 0.6859 10 1.0000 0.8225 0.6451 0.9071 12 1.0000 0.8398 0.6797 0.5074 15 1.0000 0.8610 0.7219 0.7324 20 1.0000 0.8863 0.7726 0.4963 25 1.0000 0.9059 0.8118 0.6034 35 1.0000 0.9341 0.8681 0.5673 45 1.0000 0.9533 0.9066 0.5851 55 1.0000 0.9663 0.9326 0.4969 65 1.0000 0.9761 0.9523 0.5136 75 1.0000 0.9838 0.9676 0.4539 ============================================================ ⚠️ WARNING: TLViz FMS shows all values near 1.0 ============================================================ This indicates self-comparison (decomposition vs itself). This is NOT useful for rank selection. → USE RECONSTRUCTION FMS instead (varies by rank: 0.76-0.98) ============================================================ [] [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score vs Rank\n(Higher = Better Factor Recovery)') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Reconstruction Correlation') Text(0.5, 1.0, 'Tensor Reconstruction Quality vs Rank\n(Correlation between original and reconstructed)') (-1.05, 1.05) Saved FMS plot to: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores_plot.png ============================================================ FMS-BASED RANK RECOMMENDATION ============================================================ Best Reconstruction FMS: Rank 75 (score: 0.9838) Best Reconstruction Correlation: Rank 75 (score: 0.9676) Best TLViz FMS: Rank 10 (score: 1.0000) High-scoring ranks (top 20%): [55, 65, 75] Threshold: 0.9637 FMS Interpretation: • Reconstruction FMS is the PRIMARY metric for rank selection - Measures tensor reconstruction quality (0-1 scale) - Based on correlation between original and decomposed tensors • Reconstruction correlation shows direct fit quality (-1 to 1) - Values > 0.9 indicate excellent reconstruction - Values > 0.8 indicate good reconstruction • Higher scores = better factor recovery and model fit • Consider ranks with consistently high Reconstruction FMS (top 20%) • TLViz FMS available and can be used for additional validation ============================================================ FACTOR MATCH SCORE EVALUATION COMPLETE ============================================================ Summary: 12/12 ranks have valid Reconstruction FMS 12/12 ranks have valid TLViz FMS → Use Reconstruction FMS and correlation for rank selection ============================================================ SYNTHETIC FMS ELBOW PLOT (STANDALONE) ============================================================ Loading FMS results from: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv Loaded FMS data for 12 ranks Columns available: ['rank', 'fms_tlviz', 'fms_reconstruction', 'fms_synthetic', 'reconstruction_correlation', 'tlviz_success', 'reconstruction_success', 'synthetic_success', 'tlviz_method', 'reconstruction_method', 'synthetic_method', 'valid_elements'] Found 12 ranks with valid synthetic FMS [] [] [] [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score Comparison: Finding the Elbow\nSynthetic FMS peaks at optimal rank, then declines (overfitting)') (0.0, 1.05) Text(74.575, 0.91, 'Excellent (>0.9)') Text(74.575, 0.71, 'Good (>0.7)') Text(74.575, 0.51, 'Fair (>0.5)') [] [] Text(10, 0.48123809137542917, 'Optimal\nRank 10') Text(6.5, 0.879785657206089, 'Underfitting\n(Too simple)') Text(35.0, 0.879785657206089, 'Overfitting\n(Capturing noise)') Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Synthetic Validation FMS') Text(0.5, 1.0, 'Synthetic FMS: Factor Recovery Test\nPeak indicates optimal balance between fit and stability') (0.35389934436773185, 1.05) :138: UserWarning: Glyph 128300 (\N{MICROSCOPE}) missing from font(s) DejaVu Sans. :138: UserWarning: Glyph 11088 (\N{WHITE MEDIUM STAR}) missing from font(s) DejaVu Sans. :140: UserWarning: Glyph 128300 (\N{MICROSCOPE}) missing from font(s) DejaVu Sans. :140: UserWarning: Glyph 11088 (\N{WHITE MEDIUM STAR}) missing from font(s) DejaVu Sans. ✓ Saved Synthetic FMS elbow plot to: ../output/13.00-multiomics-barnacle/rank_comparison/synthetic_fms_elbow_plot.png ============================================================ SYNTHETIC FMS ELBOW ANALYSIS ============================================================ Optimal Rank: 10 (FMS = 0.9071) Complete Synthetic FMS Results: Rank Synthetic FMS Quality Status -------- --------------- ------------ -------------------- 5 0.6170 Fair 8 0.6859 Fair 10 0.9071 Excellent ★ OPTIMAL 12 0.5074 Fair 15 0.7324 Good 20 0.4963 Poor 25 0.6034 Fair 35 0.5673 Fair 45 0.5851 Fair 55 0.4969 Poor 65 0.5136 Fair 75 0.4539 Poor Interpretation: • Synthetic FMS tests factor recovery from noisy data • Peak at rank 10 indicates best balance: - Sufficient complexity to capture patterns - Robust enough to avoid overfitting noise • Higher ranks show declining FMS (overfitting) • Lower ranks show lower FMS (underfitting) Statistics: • Improvement to optimal: +0.2213 • Average FMS after optimal: 0.5507 • Decline from peak: -0.3564 ============================================================ SYNTHETIC FMS ELBOW PLOT GENERATION COMPLETE ============================================================ ============================================================ SYNTHETIC FMS ELBOW PLOT (STANDALONE) ============================================================ Loading FMS results from: ../output/13.00-multiomics-barnacle/rank_comparison/factor_match_scores.csv Loaded FMS data for 12 ranks Columns available: ['rank', 'fms_tlviz', 'fms_reconstruction', 'fms_synthetic', 'reconstruction_correlation', 'tlviz_success', 'reconstruction_success', 'synthetic_success', 'tlviz_method', 'reconstruction_method', 'synthetic_method', 'valid_elements'] Found 12 ranks with valid synthetic FMS [] [] [] [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Factor Match Score') Text(0.5, 1.0, 'Factor Match Score Comparison: Finding the Elbow\nSynthetic FMS peaks at optimal rank, then declines (overfitting)') (0.0, 1.05) Text(74.575, 0.91, 'Excellent (>0.9)') Text(74.575, 0.71, 'Good (>0.7)') Text(74.575, 0.51, 'Fair (>0.5)') :91: UserWarning: Glyph 128300 (\N{MICROSCOPE}) missing from font(s) DejaVu Sans. :91: UserWarning: Glyph 11088 (\N{WHITE MEDIUM STAR}) missing from font(s) DejaVu Sans. :93: UserWarning: Glyph 128300 (\N{MICROSCOPE}) missing from font(s) DejaVu Sans. :93: UserWarning: Glyph 11088 (\N{WHITE MEDIUM STAR}) missing from font(s) DejaVu Sans. ✓ Saved Synthetic FMS elbow plot to: ../output/13.00-multiomics-barnacle/rank_comparison/synthetic_fms_elbow_plot.png ============================================================ SYNTHETIC FMS ELBOW ANALYSIS ============================================================ Optimal Rank: 10 (FMS = 0.9071) Complete Synthetic FMS Results: Rank Synthetic FMS Quality Status -------- --------------- ------------ -------------------- 5 0.6170 Fair 8 0.6859 Fair 10 0.9071 Excellent ★ OPTIMAL 12 0.5074 Fair 15 0.7324 Good 20 0.4963 Poor 25 0.6034 Fair 35 0.5673 Fair 45 0.5851 Fair 55 0.4969 Poor 65 0.5136 Fair 75 0.4539 Poor Interpretation: • Synthetic FMS tests factor recovery from noisy data • Peak at rank 10 indicates best balance: - Sufficient complexity to capture patterns - Robust enough to avoid overfitting noise • Higher ranks show declining FMS (overfitting) • Lower ranks show lower FMS (underfitting) Statistics: • Improvement to optimal: +0.2213 • Average FMS after optimal: 0.5507 • Decline from peak: -0.3564 ============================================================ SYNTHETIC FMS ELBOW PLOT GENERATION COMPLETE ============================================================ ============================================================ Creating rank comparison visualizations ============================================================ Loading results from log file: ../output/13.00-multiomics-barnacle/rank_comparison_log.json Log timestamp: 2025-10-21T06:48:19.041205 Total runs: 12 Successful: 12 Failed: 0 Loaded 12 results from log file Saved metrics table Text(0.5, 0.98, 'Rank Comparison: Key Metrics') [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Variance Explained') Text(0.5, 1.0, 'Variance Explained vs Rank') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Relative Reconstruction Error') Text(0.5, 1.0, 'Reconstruction Error vs Rank') [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Final Loss') Text(0.5, 1.0, 'Final Loss vs Rank') [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Gene Factor Sparsity') Text(0.5, 1.0, 'Gene Sparsity vs Rank') (0.0, 1.05) [] Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Weight Coefficient of Variation') Text(0.5, 1.0, 'Component Weight Variability vs Rank') Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Iterations to Convergence') Text(0.5, 1.0, 'Convergence Speed vs Rank\n(Green=Converged, Red=Max Iterations)') Saved: rank_comparison_summary.png [] Text(10, -10, '+9.0%') Text(10, -10, '+5.5%') Text(10, -10, '+4.6%') Text(10, -10, '+5.9%') Text(10, -10, '+7.6%') Text(10, -10, '+6.2%') Text(10, -10, '+9.5%') Text(10, -10, '+6.8%') Text(10, -10, '+4.8%') Text(10, -10, '+3.7%') Text(10, -10, '+2.9%') Text(0.5, 0, 'Rank (Number of Components)') Text(0, 0.5, 'Variance Explained') Text(0.5, 1.0, 'Elbow Plot: Finding Optimal Rank\n(Look for diminishing returns)') (0.0, 1.05) [, , , , , , , , , , , ] Saved: elbow_plot.png [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Iteration') Text(0, 0.5, 'Loss') Text(0.5, 1.0, 'Loss Convergence Trajectories by Rank') Saved: loss_trajectories.png All comparison plots saved to: ../output/13.00-multiomics-barnacle/rank_comparison ============================================================ CREATING INDIVIDUAL RANK VISUALIZATIONS ============================================================ Creating visualizations for 12 ranks... --- Rank 5 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 5: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 5: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 5: Component Weights\n(Top 5 highlighted in coral)') [, , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([442., 705., 795., 744., 712., 705., 651., 605., 614., 501., 493., 424., 422., 356., 285., 307., 252., 211., 163., 150., 128., 108., 85., 62., 55., 56., 38., 26., 27., 15., 13., 17., 9., 8., 8., 7., 4., 3., 3., 4., 3., 4., 0., 2., 0., 0., 0., 0., 0., 1.]), array([ 0. , 0.41655391, 0.83310782, 1.24966172, 1.66621563, 2.08276954, 2.49932345, 2.91587736, 3.33243126, 3.74898517, 4.16553908, 4.58209299, 4.9986469 , 5.4152008 , 5.83175471, 6.24830862, 6.66486253, 7.08141644, 7.49797034, 7.91452425, 8.33107816, 8.74763207, 9.16418597, 9.58073988, 9.99729379, 10.4138477 , 10.83040161, 11.24695551, 11.66350942, 12.08006333, 12.49661724, 12.91317115, 13.32972505, 13.74627896, 14.16283287, 14.57938678, 14.99594069, 15.41249459, 15.8290485 , 16.24560241, 16.66215632, 17.07871023, 17.49526413, 17.91181804, 18.32837195, 18.74492586, 19.16147977, 19.57803367, 19.99458758, 20.41114149, 20.8276954 ]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 5: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 5: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 8 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 8: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 8: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 8: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([4.160e+02, 1.137e+03, 1.071e+03, 8.930e+02, 6.880e+02, 6.660e+02, 6.340e+02, 6.030e+02, 5.380e+02, 5.130e+02, 4.490e+02, 4.220e+02, 3.690e+02, 3.160e+02, 3.030e+02, 2.460e+02, 1.890e+02, 1.660e+02, 1.230e+02, 1.030e+02, 7.700e+01, 7.200e+01, 5.200e+01, 4.000e+01, 3.900e+01, 2.100e+01, 2.400e+01, 8.000e+00, 9.000e+00, 8.000e+00, 1.000e+01, 4.000e+00, 2.000e+00, 2.000e+00, 2.000e+00, 2.000e+00, 0.000e+00, 4.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00]), array([ 0. , 0.62932014, 1.25864027, 1.88796041, 2.51728054, 3.14660068, 3.77592081, 4.40524095, 5.03456108, 5.66388122, 6.29320135, 6.92252149, 7.55184162, 8.18116176, 8.81048189, 9.43980203, 10.06912216, 10.6984423 , 11.32776243, 11.95708257, 12.5864027 , 13.21572284, 13.84504297, 14.47436311, 15.10368324, 15.73300338, 16.36232351, 16.99164365, 17.62096378, 18.25028392, 18.87960405, 19.50892419, 20.13824432, 20.76756446, 21.39688459, 22.02620473, 22.65552486, 23.284845 , 23.91416513, 24.54348527, 25.1728054 , 25.80212554, 26.43144567, 27.06076581, 27.69008594, 28.31940608, 28.94872622, 29.57804635, 30.20736649, 30.83668662, 31.46600676]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 8: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 8: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 10 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 10: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([148., 553., 795., 912., 943., 760., 748., 641., 531., 575., 499., 444., 408., 316., 331., 305., 226., 198., 157., 144., 114., 80., 87., 57., 49., 54., 28., 35., 17., 6., 8., 7., 10., 8., 4., 6., 1., 2., 4., 3., 4., 2., 0., 1., 0., 0., 1., 0., 0., 1.]), array([ 0. , 0.79823011, 1.59646021, 2.39469032, 3.19292042, 3.99115053, 4.78938063, 5.58761074, 6.38584084, 7.18407095, 7.98230105, 8.78053116, 9.57876126, 10.37699137, 11.17522147, 11.97345158, 12.77168168, 13.56991179, 14.3681419 , 15.166372 , 15.96460211, 16.76283221, 17.56106232, 18.35929242, 19.15752253, 19.95575263, 20.75398274, 21.55221284, 22.35044295, 23.14867305, 23.94690316, 24.74513326, 25.54336337, 26.34159347, 27.13982358, 27.93805369, 28.73628379, 29.5345139 , 30.332744 , 31.13097411, 31.92920421, 32.72743432, 33.52566442, 34.32389453, 35.12212463, 35.92035474, 36.71858484, 37.51681495, 38.31504505, 39.11327516, 39.91150526]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 10: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 12 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 12: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 12: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 12: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([288., 808., 903., 888., 743., 733., 670., 660., 524., 553., 478., 438., 398., 344., 313., 253., 232., 193., 160., 122., 88., 76., 80., 54., 46., 34., 26., 27., 15., 15., 17., 8., 9., 7., 6., 3., 2., 0., 2., 1., 2., 1., 0., 0., 0., 1., 1., 0., 0., 1.]), array([ 0. , 0.78904138, 1.57808276, 2.36712413, 3.15616551, 3.94520689, 4.73424827, 5.52328964, 6.31233102, 7.1013724 , 7.89041378, 8.67945516, 9.46849653, 10.25753791, 11.04657929, 11.83562067, 12.62466204, 13.41370342, 14.2027448 , 14.99178618, 15.78082756, 16.56986893, 17.35891031, 18.14795169, 18.93699307, 19.72603444, 20.51507582, 21.3041172 , 22.09315858, 22.88219996, 23.67124133, 24.46028271, 25.24932409, 26.03836547, 26.82740684, 27.61644822, 28.4054896 , 29.19453098, 29.98357236, 30.77261373, 31.56165511, 32.35069649, 33.13973787, 33.92877924, 34.71782062, 35.506862 , 36.29590338, 37.08494476, 37.87398613, 38.66302751, 39.45206889]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 12: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 12: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 15 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 15: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 15: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 15: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([2.930e+02, 9.260e+02, 1.196e+03, 9.910e+02, 7.580e+02, 6.900e+02, 6.290e+02, 6.110e+02, 5.830e+02, 5.050e+02, 4.590e+02, 3.840e+02, 3.710e+02, 3.160e+02, 2.860e+02, 2.010e+02, 1.880e+02, 1.630e+02, 1.280e+02, 1.050e+02, 9.200e+01, 7.000e+01, 6.400e+01, 4.400e+01, 3.200e+01, 3.300e+01, 2.300e+01, 1.600e+01, 2.200e+01, 1.300e+01, 9.000e+00, 3.000e+00, 1.000e+00, 4.000e+00, 2.000e+00, 5.000e+00, 1.000e+00, 2.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 2.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00]), array([ 0. , 0.80290751, 1.60581502, 2.40872252, 3.21163003, 4.01453754, 4.81744505, 5.62035255, 6.42326006, 7.22616757, 8.02907508, 8.83198259, 9.63489009, 10.4377976 , 11.24070511, 12.04361262, 12.84652012, 13.64942763, 14.45233514, 15.25524265, 16.05815016, 16.86105766, 17.66396517, 18.46687268, 19.26978019, 20.07268769, 20.8755952 , 21.67850271, 22.48141022, 23.28431773, 24.08722523, 24.89013274, 25.69304025, 26.49594776, 27.29885526, 28.10176277, 28.90467028, 29.70757779, 30.51048529, 31.3133928 , 32.11630031, 32.91920782, 33.72211533, 34.52502283, 35.32793034, 36.13083785, 36.93374536, 37.73665286, 38.53956037, 39.34246788, 40.14537539]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 15: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 15: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 20 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 20: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 20: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 20: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15'), Text(15, 0, 'C16'), Text(16, 0, 'C17'), Text(17, 0, 'C18'), Text(18, 0, 'C19'), Text(19, 0, 'C20')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([1.120e+02, 7.690e+02, 1.579e+03, 1.315e+03, 1.026e+03, 8.280e+02, 7.550e+02, 6.180e+02, 5.430e+02, 4.530e+02, 3.690e+02, 3.190e+02, 2.800e+02, 2.160e+02, 1.900e+02, 1.650e+02, 1.260e+02, 1.040e+02, 8.800e+01, 6.500e+01, 5.900e+01, 5.300e+01, 3.400e+01, 2.900e+01, 1.900e+01, 1.900e+01, 1.400e+01, 1.500e+01, 1.400e+01, 7.000e+00, 6.000e+00, 7.000e+00, 6.000e+00, 6.000e+00, 5.000e+00, 1.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 1.000e+00, 0.000e+00, 3.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00]), array([ 0. , 1.14694073, 2.29388146, 3.4408222 , 4.58776293, 5.73470366, 6.88164439, 8.02858512, 9.17552585, 10.32246659, 11.46940732, 12.61634805, 13.76328878, 14.91022951, 16.05717024, 17.20411098, 18.35105171, 19.49799244, 20.64493317, 21.7918739 , 22.93881464, 24.08575537, 25.2326961 , 26.37963683, 27.52657756, 28.67351829, 29.82045903, 30.96739976, 32.11434049, 33.26128122, 34.40822195, 35.55516268, 36.70210342, 37.84904415, 38.99598488, 40.14292561, 41.28986634, 42.43680708, 43.58374781, 44.73068854, 45.87762927, 47.02457 , 48.17151073, 49.31845147, 50.4653922 , 51.61233293, 52.75927366, 53.90621439, 55.05315513, 56.20009586, 57.34703659]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 20: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 20: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 25 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(126.97222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 25: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 25: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 25: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15'), Text(15, 0, 'C16'), Text(16, 0, 'C17'), Text(17, 0, 'C18'), Text(18, 0, 'C19'), Text(19, 0, 'C20'), Text(20, 0, 'C21'), Text(21, 0, 'C22'), Text(22, 0, 'C23'), Text(23, 0, 'C24'), Text(24, 0, 'C25')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([6.000e+01, 3.350e+02, 1.040e+03, 1.210e+03, 1.003e+03, 8.840e+02, 7.420e+02, 6.320e+02, 5.800e+02, 5.660e+02, 4.560e+02, 3.730e+02, 3.220e+02, 3.020e+02, 2.650e+02, 2.280e+02, 1.810e+02, 1.820e+02, 1.290e+02, 1.060e+02, 9.700e+01, 9.200e+01, 8.600e+01, 7.200e+01, 5.500e+01, 3.600e+01, 3.100e+01, 2.500e+01, 2.100e+01, 2.600e+01, 1.200e+01, 1.300e+01, 9.000e+00, 9.000e+00, 8.000e+00, 2.000e+00, 3.000e+00, 9.000e+00, 6.000e+00, 3.000e+00, 3.000e+00, 2.000e+00, 1.000e+00, 1.000e+00, 1.000e+00, 2.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 2.000e+00]), array([ 0. , 0.95121768, 1.90243535, 2.85365303, 3.80487071, 4.75608839, 5.70730606, 6.65852374, 7.60974142, 8.5609591 , 9.51217677, 10.46339445, 11.41461213, 12.3658298 , 13.31704748, 14.26826516, 15.21948284, 16.17070051, 17.12191819, 18.07313587, 19.02435355, 19.97557122, 20.9267889 , 21.87800658, 22.82922425, 23.78044193, 24.73165961, 25.68287729, 26.63409496, 27.58531264, 28.53653032, 29.487748 , 30.43896567, 31.39018335, 32.34140103, 33.29261871, 34.24383638, 35.19505406, 36.14627174, 37.09748941, 38.04870709, 38.99992477, 39.95114245, 40.90236012, 41.8535778 , 42.80479548, 43.75601316, 44.70723083, 45.65844851, 46.60966619, 47.56088386]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 25: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 25: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 35 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(189.47222222222223, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 35: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 35: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 35: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15'), Text(15, 0, 'C16'), Text(16, 0, 'C17'), Text(17, 0, 'C18'), Text(18, 0, 'C19'), Text(19, 0, 'C20'), Text(20, 0, 'C21'), Text(21, 0, 'C22'), Text(22, 0, 'C23'), Text(23, 0, 'C24'), Text(24, 0, 'C25'), Text(25, 0, 'C26'), Text(26, 0, 'C27'), Text(27, 0, 'C28'), Text(28, 0, 'C29'), Text(29, 0, 'C30'), Text(30, 0, 'C31'), Text(31, 0, 'C32'), Text(32, 0, 'C33'), Text(33, 0, 'C34'), Text(34, 0, 'C35')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([3.200e+01, 1.250e+02, 6.140e+02, 1.244e+03, 1.426e+03, 1.182e+03, 1.009e+03, 8.030e+02, 6.340e+02, 5.210e+02, 4.310e+02, 3.620e+02, 3.020e+02, 2.780e+02, 2.200e+02, 1.640e+02, 1.220e+02, 1.180e+02, 8.800e+01, 9.600e+01, 7.000e+01, 6.600e+01, 5.100e+01, 3.600e+01, 3.900e+01, 3.700e+01, 2.800e+01, 2.400e+01, 1.600e+01, 2.000e+01, 1.200e+01, 6.000e+00, 1.200e+01, 5.000e+00, 3.000e+00, 4.000e+00, 6.000e+00, 3.000e+00, 1.000e+00, 1.000e+00, 1.000e+00, 2.000e+00, 1.000e+00, 2.000e+00, 3.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 2.000e+00]), array([ 0. , 1.08865263, 2.17730526, 3.26595789, 4.35461052, 5.44326315, 6.53191578, 7.62056841, 8.70922105, 9.79787368, 10.88652631, 11.97517894, 13.06383157, 14.1524842 , 15.24113683, 16.32978946, 17.41844209, 18.50709472, 19.59574735, 20.68439998, 21.77305261, 22.86170524, 23.95035787, 25.03901051, 26.12766314, 27.21631577, 28.3049684 , 29.39362103, 30.48227366, 31.57092629, 32.65957892, 33.74823155, 34.83688418, 35.92553681, 37.01418944, 38.10284207, 39.1914947 , 40.28014733, 41.36879997, 42.4574526 , 43.54610523, 44.63475786, 45.72341049, 46.81206312, 47.90071575, 48.98936838, 50.07802101, 51.16667364, 52.25532627, 53.3439789 , 54.43263153]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 35: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 35: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 45 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(251.97222222222223, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 45: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 45: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 45: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15'), Text(15, 0, 'C16'), Text(16, 0, 'C17'), Text(17, 0, 'C18'), Text(18, 0, 'C19'), Text(19, 0, 'C20'), Text(20, 0, 'C21'), Text(21, 0, 'C22'), Text(22, 0, 'C23'), Text(23, 0, 'C24'), Text(24, 0, 'C25'), Text(25, 0, 'C26'), Text(26, 0, 'C27'), Text(27, 0, 'C28'), Text(28, 0, 'C29'), Text(29, 0, 'C30'), Text(30, 0, 'C31'), Text(31, 0, 'C32'), Text(32, 0, 'C33'), Text(33, 0, 'C34'), Text(34, 0, 'C35'), Text(35, 0, 'C36'), Text(36, 0, 'C37'), Text(37, 0, 'C38'), Text(38, 0, 'C39'), Text(39, 0, 'C40'), Text(40, 0, 'C41'), Text(41, 0, 'C42'), Text(42, 0, 'C43'), Text(43, 0, 'C44'), Text(44, 0, 'C45')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([3.800e+01, 4.220e+02, 1.937e+03, 2.191e+03, 1.580e+03, 1.107e+03, 8.170e+02, 5.340e+02, 3.920e+02, 2.790e+02, 2.150e+02, 1.410e+02, 1.500e+02, 1.030e+02, 5.500e+01, 5.300e+01, 3.700e+01, 3.700e+01, 3.000e+01, 1.500e+01, 1.700e+01, 1.500e+01, 1.000e+01, 7.000e+00, 6.000e+00, 7.000e+00, 7.000e+00, 4.000e+00, 2.000e+00, 5.000e+00, 1.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 2.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 2.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00]), array([ 0. , 1.49122879, 2.98245759, 4.47368638, 5.96491518, 7.45614397, 8.94737276, 10.43860156, 11.92983035, 13.42105914, 14.91228794, 16.40351673, 17.89474553, 19.38597432, 20.87720311, 22.36843191, 23.8596607 , 25.35088949, 26.84211829, 28.33334708, 29.82457588, 31.31580467, 32.80703346, 34.29826226, 35.78949105, 37.28071985, 38.77194864, 40.26317743, 41.75440623, 43.24563502, 44.73686381, 46.22809261, 47.7193214 , 49.2105502 , 50.70177899, 52.19300778, 53.68423658, 55.17546537, 56.66669416, 58.15792296, 59.64915175, 61.14038055, 62.63160934, 64.12283813, 65.61406693, 67.10529572, 68.59652452, 70.08775331, 71.5789821 , 73.0702109 , 74.56143969]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 45: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 45: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 55 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(314.47222222222223, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 55: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 55: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 55: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15'), Text(15, 0, 'C16'), Text(16, 0, 'C17'), Text(17, 0, 'C18'), Text(18, 0, 'C19'), Text(19, 0, 'C20'), Text(20, 0, 'C21'), Text(21, 0, 'C22'), Text(22, 0, 'C23'), Text(23, 0, 'C24'), Text(24, 0, 'C25'), Text(25, 0, 'C26'), Text(26, 0, 'C27'), Text(27, 0, 'C28'), Text(28, 0, 'C29'), Text(29, 0, 'C30'), Text(30, 0, 'C31'), Text(31, 0, 'C32'), Text(32, 0, 'C33'), Text(33, 0, 'C34'), Text(34, 0, 'C35'), Text(35, 0, 'C36'), Text(36, 0, 'C37'), Text(37, 0, 'C38'), Text(38, 0, 'C39'), Text(39, 0, 'C40'), Text(40, 0, 'C41'), Text(41, 0, 'C42'), Text(42, 0, 'C43'), Text(43, 0, 'C44'), Text(44, 0, 'C45'), Text(45, 0, 'C46'), Text(46, 0, 'C47'), Text(47, 0, 'C48'), Text(48, 0, 'C49'), Text(49, 0, 'C50'), Text(50, 0, 'C51'), Text(51, 0, 'C52'), Text(52, 0, 'C53'), Text(53, 0, 'C54'), Text(54, 0, 'C55')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([3.200e+01, 2.920e+02, 1.842e+03, 2.458e+03, 1.716e+03, 1.138e+03, 8.050e+02, 5.550e+02, 3.930e+02, 2.350e+02, 2.060e+02, 1.260e+02, 1.170e+02, 7.000e+01, 5.300e+01, 3.500e+01, 3.800e+01, 2.200e+01, 2.000e+01, 1.000e+01, 9.000e+00, 1.000e+01, 6.000e+00, 9.000e+00, 4.000e+00, 1.100e+01, 1.000e+00, 2.000e+00, 1.000e+00, 1.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00]), array([ 0. , 1.4403933 , 2.88078661, 4.32117991, 5.76157321, 7.20196652, 8.64235982, 10.08275312, 11.52314643, 12.96353973, 14.40393303, 15.84432634, 17.28471964, 18.72511294, 20.16550625, 21.60589955, 23.04629285, 24.48668616, 25.92707946, 27.36747276, 28.80786607, 30.24825937, 31.68865267, 33.12904598, 34.56943928, 36.00983258, 37.45022589, 38.89061919, 40.33101249, 41.7714058 , 43.2117991 , 44.6521924 , 46.09258571, 47.53297901, 48.97337231, 50.41376562, 51.85415892, 53.29455222, 54.73494553, 56.17533883, 57.61573213, 59.05612544, 60.49651874, 61.93691204, 63.37730535, 64.81769865, 66.25809195, 67.69848526, 69.13887856, 70.57927186, 72.01966517]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 55: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 55: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 65 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(376.97222222222223, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 65: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 65: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 65: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15'), Text(15, 0, 'C16'), Text(16, 0, 'C17'), Text(17, 0, 'C18'), Text(18, 0, 'C19'), Text(19, 0, 'C20'), Text(20, 0, 'C21'), Text(21, 0, 'C22'), Text(22, 0, 'C23'), Text(23, 0, 'C24'), Text(24, 0, 'C25'), Text(25, 0, 'C26'), Text(26, 0, 'C27'), Text(27, 0, 'C28'), Text(28, 0, 'C29'), Text(29, 0, 'C30'), Text(30, 0, 'C31'), Text(31, 0, 'C32'), Text(32, 0, 'C33'), Text(33, 0, 'C34'), Text(34, 0, 'C35'), Text(35, 0, 'C36'), Text(36, 0, 'C37'), Text(37, 0, 'C38'), Text(38, 0, 'C39'), Text(39, 0, 'C40'), Text(40, 0, 'C41'), Text(41, 0, 'C42'), Text(42, 0, 'C43'), Text(43, 0, 'C44'), Text(44, 0, 'C45'), Text(45, 0, 'C46'), Text(46, 0, 'C47'), Text(47, 0, 'C48'), Text(48, 0, 'C49'), Text(49, 0, 'C50'), Text(50, 0, 'C51'), Text(51, 0, 'C52'), Text(52, 0, 'C53'), Text(53, 0, 'C54'), Text(54, 0, 'C55'), Text(55, 0, 'C56'), Text(56, 0, 'C57'), Text(57, 0, 'C58'), Text(58, 0, 'C59'), Text(59, 0, 'C60'), Text(60, 0, 'C61'), Text(61, 0, 'C62'), Text(62, 0, 'C63'), Text(63, 0, 'C64'), Text(64, 0, 'C65')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([2.400e+01, 7.000e+01, 9.690e+02, 2.179e+03, 1.834e+03, 1.330e+03, 9.920e+02, 7.070e+02, 4.970e+02, 4.050e+02, 2.840e+02, 2.190e+02, 1.450e+02, 1.140e+02, 8.900e+01, 7.400e+01, 5.100e+01, 4.200e+01, 3.100e+01, 3.400e+01, 2.200e+01, 2.200e+01, 1.200e+01, 1.900e+01, 9.000e+00, 5.000e+00, 1.300e+01, 4.000e+00, 5.000e+00, 7.000e+00, 1.000e+00, 2.000e+00, 1.000e+00, 2.000e+00, 2.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 2.000e+00, 2.000e+00, 0.000e+00, 1.000e+00]), array([ 0. , 1.02916324, 2.05832648, 3.08748971, 4.11665295, 5.14581619, 6.17497943, 7.20414267, 8.2333059 , 9.26246914, 10.29163238, 11.32079562, 12.34995886, 13.37912209, 14.40828533, 15.43744857, 16.46661181, 17.49577505, 18.52493829, 19.55410152, 20.58326476, 21.612428 , 22.64159124, 23.67075448, 24.69991771, 25.72908095, 26.75824419, 27.78740743, 28.81657067, 29.8457339 , 30.87489714, 31.90406038, 32.93322362, 33.96238686, 34.99155009, 36.02071333, 37.04987657, 38.07903981, 39.10820305, 40.13736628, 41.16652952, 42.19569276, 43.224856 , 44.25401924, 45.28318248, 46.31234571, 47.34150895, 48.37067219, 49.39983543, 50.42899867, 51.4581619 ]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 65: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 65: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png --- Rank 75 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(439.47222222222223, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 75: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 75: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') :92: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all Axes decorations. Saved: time_component_lineplot.png Creating component weight bar plot... Text(0.5, 0, 'Component') Text(0, 0.5, 'Weight') Text(0.5, 1.0, 'Rank 75: Component Weights\n(Top 5 highlighted in coral)') [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] [Text(0, 0, 'C1'), Text(1, 0, 'C2'), Text(2, 0, 'C3'), Text(3, 0, 'C4'), Text(4, 0, 'C5'), Text(5, 0, 'C6'), Text(6, 0, 'C7'), Text(7, 0, 'C8'), Text(8, 0, 'C9'), Text(9, 0, 'C10'), Text(10, 0, 'C11'), Text(11, 0, 'C12'), Text(12, 0, 'C13'), Text(13, 0, 'C14'), Text(14, 0, 'C15'), Text(15, 0, 'C16'), Text(16, 0, 'C17'), Text(17, 0, 'C18'), Text(18, 0, 'C19'), Text(19, 0, 'C20'), Text(20, 0, 'C21'), Text(21, 0, 'C22'), Text(22, 0, 'C23'), Text(23, 0, 'C24'), Text(24, 0, 'C25'), Text(25, 0, 'C26'), Text(26, 0, 'C27'), Text(27, 0, 'C28'), Text(28, 0, 'C29'), Text(29, 0, 'C30'), Text(30, 0, 'C31'), Text(31, 0, 'C32'), Text(32, 0, 'C33'), Text(33, 0, 'C34'), Text(34, 0, 'C35'), Text(35, 0, 'C36'), Text(36, 0, 'C37'), Text(37, 0, 'C38'), Text(38, 0, 'C39'), Text(39, 0, 'C40'), Text(40, 0, 'C41'), Text(41, 0, 'C42'), Text(42, 0, 'C43'), Text(43, 0, 'C44'), Text(44, 0, 'C45'), Text(45, 0, 'C46'), Text(46, 0, 'C47'), Text(47, 0, 'C48'), Text(48, 0, 'C49'), Text(49, 0, 'C50'), Text(50, 0, 'C51'), Text(51, 0, 'C52'), Text(52, 0, 'C53'), Text(53, 0, 'C54'), Text(54, 0, 'C55'), Text(55, 0, 'C56'), Text(56, 0, 'C57'), Text(57, 0, 'C58'), Text(58, 0, 'C59'), Text(59, 0, 'C60'), Text(60, 0, 'C61'), Text(61, 0, 'C62'), Text(62, 0, 'C63'), Text(63, 0, 'C64'), Text(64, 0, 'C65'), Text(65, 0, 'C66'), Text(66, 0, 'C67'), Text(67, 0, 'C68'), Text(68, 0, 'C69'), Text(69, 0, 'C70'), Text(70, 0, 'C71'), Text(71, 0, 'C72'), Text(72, 0, 'C73'), Text(73, 0, 'C74'), Text(74, 0, 'C75')] Saved: component_weights_barplot.png Creating gene importance distribution... (array([1.800e+01, 3.200e+01, 4.890e+02, 1.766e+03, 2.148e+03, 1.615e+03, 1.137e+03, 8.320e+02, 5.460e+02, 4.540e+02, 2.800e+02, 2.360e+02, 1.590e+02, 1.300e+02, 9.700e+01, 5.900e+01, 4.700e+01, 3.600e+01, 2.400e+01, 2.100e+01, 1.200e+01, 2.200e+01, 1.500e+01, 6.000e+00, 1.100e+01, 7.000e+00, 5.000e+00, 4.000e+00, 1.000e+00, 4.000e+00, 1.000e+00, 2.000e+00, 0.000e+00, 1.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00]), array([ 0. , 0.95793285, 1.91586569, 2.87379854, 3.83173139, 4.78966423, 5.74759708, 6.70552993, 7.66346277, 8.62139562, 9.57932847, 10.53726131, 11.49519416, 12.453127 , 13.41105985, 14.3689927 , 15.32692554, 16.28485839, 17.24279124, 18.20072408, 19.15865693, 20.11658978, 21.07452262, 22.03245547, 22.99038832, 23.94832116, 24.90625401, 25.86418686, 26.8221197 , 27.78005255, 28.7379854 , 29.69591824, 30.65385109, 31.61178394, 32.56971678, 33.52764963, 34.48558248, 35.44351532, 36.40144817, 37.35938101, 38.31731386, 39.27524671, 40.23317955, 41.1911124 , 42.14904525, 43.10697809, 44.06491094, 45.02284379, 45.98077663, 46.93870948, 47.89664233]), ) Text(0.5, 0, 'Total Importance Score') Text(0, 0.5, 'Number of Genes') Text(0.5, 1.0, 'Distribution of Gene Importance Scores') [] Text(0.5, 0, 'Number of Top Genes') Text(0, 0.5, 'Cumulative Variance Explained (%)') Text(0.5, 1.0, 'Cumulative Importance by Gene Rank') Text(0.5, 1.02, 'Rank 75: Gene Importance Analysis') Saved: gene_importance_distribution.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 75: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ INDIVIDUAL RANK VISUALIZATIONS COMPLETE ============================================================ For each rank, the following plots were created in rank_XX/ directories: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. component_weights_barplot.png - Relative component importance 4. gene_importance_distribution.png - Gene importance statistics 5. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating sample-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.58159722222221, 0.5, 'Sample (Species_SampleID)') Text(0.5, 1.0, 'Rank 10: Sample Loadings Across Components\n(All 28 samples from 3 species)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints\n(Each line = one component, weighted by importance)') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmap... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes Across Components\n(Ordered by Total Importance)') Saved: gene_component_heatmap_top50.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmap... Selected 19 unique genes (top 5 per component) Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top Genes Per Component\n(5 genes per component, 19 unique genes total)\nGenes grouped by primary component') Saved: gene_component_heatmap_per_component.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmap... Selected 19 unique genes (top 5 per component) Component breakdown: Component_1: 5 genes Component_2: 5 genes Component_3: 5 genes Component_4: 5 genes Component_5: 5 genes Component_6: 5 genes Component_7: 5 genes Component_8: 5 genes Component_9: 5 genes Component_10: 5 genes Text(10.3, 2.5, '← Component_1') Text(10.3, 7.5, '← Component_2') Text(10.3, 12.5, '← Component_3') Text(10.3, 17.5, '← Component_4') Text(10.3, 22.5, '← Component_5') Text(10.3, 27.5, '← Component_6') Text(10.3, 32.5, '← Component_7') Text(10.3, 37.5, '← Component_8') Text(10.3, 42.5, '← Component_9') Text(10.3, 47.5, '← Component_10') Text(0.5, 102.72222222222219, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 5 Genes Per Component\n(19 unique genes total)\nGenes grouped and labeled by primary component') :82: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all Axes decorations. Saved: gene_component_heatmap_per_component.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmap (overall importance)... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Overall Importance\n(Genes ranked by total absolute loading across all components)') Saved: gene_component_heatmap_overall_top50.png Creating gene-component heatmap (per component)... Selected 19 unique genes (top 5 per component) Component breakdown: Component_1: 5 genes Component_2: 5 genes Component_3: 5 genes Component_4: 5 genes Component_5: 5 genes Component_6: 5 genes Component_7: 5 genes Component_8: 5 genes Component_9: 5 genes Component_10: 5 genes Text(10.3, 2.5, '← Component_1') Text(10.3, 7.5, '← Component_2') Text(10.3, 12.5, '← Component_3') Text(10.3, 17.5, '← Component_4') Text(10.3, 22.5, '← Component_5') Text(10.3, 27.5, '← Component_6') Text(10.3, 32.5, '← Component_7') Text(10.3, 37.5, '← Component_8') Text(10.3, 42.5, '← Component_9') Text(10.3, 47.5, '← Component_10') Text(0.5, 102.72222222222219, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 5 Genes Per Component\n(19 unique genes total)\nGenes grouped and labeled by their primary component') :117: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all Axes decorations. Saved: gene_component_heatmap_per_component.png Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1. gene_component_heatmap_top50.png - Top genes across components 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmaps with different selection criteria... 1A: Sum of absolute loadings (broadly active genes)... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Sum of Absolute Loadings\n(Genes that participate across multiple components)') Saved: gene_heatmap_1A_sum_top50.png 1B: Maximum absolute loading (component-specific genes)... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Maximum Loading\n(Genes highly specific to individual components)') Saved: gene_heatmap_1B_max_top50.png 1C: Mean absolute loading (consistently active genes)... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Mean Absolute Loading\n(Genes with consistent moderate activity across components)') Saved: gene_heatmap_1C_mean_top50.png 1D: Variance of loadings (component-specific markers)... Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Loading Variance\n(Genes with high specificity - strong in some components, weak in others)') Saved: gene_heatmap_1D_variance_top50.png Gene selection summary: Sum method: Favors genes active across many components Max method: Favors genes strongly specific to one component Mean method: Favors genes with consistent moderate activity Variance method: Favors genes with high component specificity Gene overlap between methods: Sum & Max: 47/50 genes in common Sum & Mean: 50/50 genes in common Max & Variance: 45/50 genes in common Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1A. gene_heatmap_1A_sum_top50.png - Broadly active genes (sum) 1B. gene_heatmap_1B_max_top50.png - Component-specific genes (max) 1C. gene_heatmap_1C_mean_top50.png - Consistently active genes (mean) 1D. gene_heatmap_1D_variance_top50.png - High specificity genes (variance) 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmaps with different selection criteria... 1A: Sum of absolute loadings (broadly active genes)... Saved data: gene_heatmap_1A_sum_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Sum of Absolute Loadings\n(Genes that participate across multiple components)') Saved plot: gene_heatmap_1A_sum_top50.png 1B: Maximum absolute loading (component-specific genes)... Saved data: gene_heatmap_1B_max_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Maximum Loading\n(Genes highly specific to individual components)') Saved plot: gene_heatmap_1B_max_top50.png 1C: Mean absolute loading (consistently active genes)... Saved data: gene_heatmap_1C_mean_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Mean Absolute Loading\n(Genes with consistent moderate activity across components)') Saved plot: gene_heatmap_1C_mean_top50.png 1D: Variance of loadings (component-specific markers)... Saved data: gene_heatmap_1D_variance_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Loading Variance\n(Genes with high specificity - strong in some components, weak in others)') Saved plot: gene_heatmap_1D_variance_top50.png Gene selection summary: Sum method: Favors genes active across many components Max method: Favors genes strongly specific to one component Mean method: Favors genes with consistent moderate activity Variance method: Favors genes with high component specificity Gene overlap between methods: Sum & Max: 47/50 genes in common Sum & Mean: 50/50 genes in common Max & Variance: 45/50 genes in common Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1A. gene_heatmap_1A_sum_top50.png - Broadly active genes (sum) 1B. gene_heatmap_1B_max_top50.png - Component-specific genes (max) 1C. gene_heatmap_1C_mean_top50.png - Consistently active genes (mean) 1D. gene_heatmap_1D_variance_top50.png - High specificity genes (variance) 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check ============================================================ CREATING RANK 10 VISUALIZATIONS ============================================================ --- Rank 10 --- Creating gene-component heatmaps with different selection criteria... 1A: Sum of absolute loadings (broadly active genes)... Saved data: gene_heatmap_1A_sum_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Sum of Absolute Loadings\n(Genes that participate across multiple components)') Saved plot: gene_heatmap_1A_sum_top50.png 1B: Maximum absolute loading (component-specific genes)... Saved data: gene_heatmap_1B_max_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Maximum Loading\n(Genes highly specific to individual components)') Saved plot: gene_heatmap_1B_max_top50.png 1C: Mean absolute loading (consistently active genes)... Saved data: gene_heatmap_1C_mean_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Mean Absolute Loading\n(Genes with consistent moderate activity across components)') Saved plot: gene_heatmap_1C_mean_top50.png 1D: Variance of loadings (component-specific markers)... Saved data: gene_heatmap_1D_variance_top50_data.csv Text(0.5, 80.7222222222222, 'Components') Text(120.72222222222221, 0.5, 'Gene ID') Text(0.5, 1.0, 'Rank 10: Top 50 Genes by Loading Variance\n(Genes with high specificity - strong in some components, weak in others)') Saved plot: gene_heatmap_1D_variance_top50.png Gene selection summary: Sum method: Favors genes active across many components Max method: Favors genes strongly specific to one component Mean method: Favors genes with consistent moderate activity Variance method: Favors genes with high component specificity Gene overlap between methods: Sum & Max: 47/50 genes in common Sum & Mean: 50/50 genes in common Max & Variance: 45/50 genes in common Exporting top 500 genes per component... Saved top 500 genes for each of 10 components Files: top_500_genes_Component_X.csv Creating time-component line plot... [] [] [] [] [] [] [] [] [] [] Text(0.5, 0, 'Timepoint') Text(0, 0.5, 'Component Loading') Text(0.5, 1.0, 'Rank 10: Component Loadings Across Timepoints') Saved: time_component_lineplot.png Creating sample-component heatmap... Performing hierarchical clustering on samples... Text(0.5, -10.652777777777798, 'Components') Text(1196.0277777777778, 0.5, 'Sample (Species_SampleID)') Text(0.5, 0.98, 'Rank 10: Sample Loadings Across Components\n(Hierarchically clustered by component loading similarity)') Saved: sample_component_heatmap.png Creating component correlation heatmap... Text(0.5, 1.0, 'Rank 10: Component Correlation Matrix\n(Based on gene loadings - low correlation = good separation)') Saved: component_correlation_heatmap.png ============================================================ RANK 10 VISUALIZATIONS COMPLETE ============================================================ The following plots were created in rank_10/ directory: 1A. gene_heatmap_1A_sum_top50.png - Broadly active genes (sum) 1B. gene_heatmap_1B_max_top50.png - Component-specific genes (max) 1C. gene_heatmap_1C_mean_top50.png - Consistently active genes (mean) 1D. gene_heatmap_1D_variance_top50.png - High specificity genes (variance) 2. time_component_lineplot.png - Component patterns over time 3. sample_component_heatmap.png - Individual samples across components 4. component_correlation_heatmap.png - Component independence check