Error: package 'FracFixR' is not available
Solution:
# Check your R version
R.version.string # Should be >= 4.0.0
# Try different CRAN mirror
chooseCRANmirror()
install.packages("FracFixR")
# Or install from GitHub
devtools::install_github("Arnaroo/FracFixR")
Error: dependency 'EnhancedVolcano' is not available
Solution:
# EnhancedVolcano is from Bioconductor
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("EnhancedVolcano")
# Then retry FracFixR installation
install.packages("FracFixR")
Diagnosis:
# Check for mismatches
setdiff(colnames(counts), annotation$Sample) # Shows columns not in annotation
setdiff(annotation$Sample, colnames(counts)) # Shows annotations without data
Solutions:
# Fix whitespace issues
colnames(counts) <- trimws(colnames(counts))
annotation$Sample <- trimws(annotation$Sample)
# Fix case sensitivity
colnames(counts) <- gsub("sample", "Sample", colnames(counts))
# Check exact matches
all(colnames(counts) %in% annotation$Sample) # Should be TRUE
Solution:
# Check Type values
unique(annotation$Type)
# Common fixes:
# 1. Case sensitivity
annotation$Type <- gsub("total", "Total", annotation$Type)
# 2. Whitespace
annotation$Type <- trimws(annotation$Type)
# 3. Typos
annotation$Type[annotation$Type == "Totla"] <- "Total"
# Verify
any(annotation$Type == "Total") # Should be TRUE
Solution:
# Convert data.frame to matrix
counts <- as.matrix(counts)
# Ensure numeric
counts <- apply(counts, 2, as.numeric)
# Check for non-numeric values
which(is.na(counts), arr.ind = TRUE) # Shows problematic cells
# Remove non-numeric rows/columns if needed
numeric_cols <- sapply(counts, is.numeric)
counts <- counts[, numeric_cols]
Diagnosis:
# Check transcript abundance distribution
total_samples <- annotation$Type == "Total" & annotation$Condition == "X"
total_counts <- rowSums(counts[, total_samples, drop = FALSE])
hist(log10(total_counts + 1), breaks = 50)
quantile(total_counts, c(0.7, 0.96)) # Default selection range
Solutions:
# 1. Check if you have enough expressed genes
sum(total_counts > 0) # Should be > 10
# 2. Check for sample swaps
# Ensure Total samples have higher counts than fractions
# 3. If legitimate low expression, contact maintainers for guidance
Solution:
# Check your annotation structure
table(annotation$Replicate, annotation$Type)
# Each replicate should have Total + at least one fraction
# Fix by ensuring complete experimental design
Solutions:
# 1. Try Wald test (more robust to extreme values)
diff_results <- DiffPropTest(results,
Conditions = c("A", "B"),
Types = "Fraction",
Test = "Wald")
# 2. Filter genes with very low counts
min_count_threshold <- 10
keep <- rowSums(counts) >= min_count_threshold
filtered_counts <- counts[keep, ]
# 3. Check for outlier samples
boxplot(log10(colSums(counts) + 1), las = 2)
Diagnosis:
# Check if you have replicates
table(annotation$Condition, annotation$Replicate)
# Check for zero counts in tested fractions
fraction_samples <- annotation$Type == "YourFraction"
sum(rowSums(counts[, fraction_samples]) > 0)
Solution: - Ensure at least 2 replicates per condition - Check that the tested fraction has non-zero counts - Verify fraction names match exactly
Checks:
# 1. Verify biological variability exists
# Plot PCA of your fractions
pca_data <- prcomp(t(log10(counts + 1)))
plot(pca_data$x[,1], pca_data$x[,2])
# 2. Check proportion distributions
hist(diff_results$mean_diff, breaks = 50)
# 3. Try less stringent threshold
sum(diff_results$pval < 0.05, na.rm = TRUE) # Before multiple testing
This is expected! The tests have different assumptions: - GLM: Assumes binomial distribution, most powerful - Logit: Uses transformation, faster but less powerful - Wald: Accounts for overdispersion, more conservative
Solutions:
# 1. Reduce parallel workers
library(future)
plan(multisession, workers = 2) # Use only 2 cores
# 2. Pre-filter genes
keep <- rowSums(counts) >= 10 # Minimum total count
filtered_counts <- counts[keep, ]
# 3. Process in batches (contact maintainers for scripts)
Solutions:
# 1. Check parallel processing is working
future::availableCores()
# 2. Use Logit test for initial exploration
diff_quick <- DiffPropTest(results,
Conditions = c("A", "B"),
Types = "Fraction",
Test = "Logit") # Faster
# 3. Reduce gene number for testing
test_counts <- counts[1:1000, ] # Subset for testing
The lost fraction includes: - RNA lost during fractionation procedure - RNA in fractions not sequenced (e.g., free RNA in polysome profiling) - Technical losses during library preparation - Degraded or damaged RNA
High lost fraction (>50%) may indicate technical issues.
Example:
mean_diff = 0.15, padj < 0.01
→ Gene has 15% higher proportion in condition 2 (significant)
No! FracFixR requires raw counts because: - It performs its own compositional normalization - Standard normalizations assume independence between samples - Fractions are compositionally related (parts of a whole)
Power depends on: - Effect size (proportion changes) - Technical variability - Number of genes tested
Currently, DiffPropTest compares exactly 2 conditions at a time.
For multiple conditions:
# Pairwise comparisons
diff_AvsB <- DiffPropTest(results, Conditions = c("A", "B"), ...)
diff_AvsC <- DiffPropTest(results, Conditions = c("A", "C"), ...)
diff_BvsC <- DiffPropTest(results, Conditions = c("B", "C"), ...)
Check documentation:
r
?FracFixR
vignette("FracFixR-intro")
Reproducible example:
r
# Create minimal example
set.seed(123)
mini_counts <- matrix(rpois(100, 50), nrow = 10)
# ... show the error
Report issues:
Include: sessionInfo(), error message, minimal example
Contact maintainers:
Analysis will run but with limited statistical power
"Only X transcripts selected for condition Y"
Check your data if X < 10
"Converting 0 p-values"
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.