I am analyzing 4C-seq data with the FourCSeq package. It is an experiment with 1 viewpoint, 2 conditions, and 2 replicates per condition. I have read the FourCSeq documentation and adapted the example code on the vignette to my data. It worked until I encountered the following error when using the getZScores() function:
> fcf.example.u15 <- getZScores(fc.example.u15)
[1] "DMPK_u15"
gene-wise dispersion estimates
mean-dispersion relationship
-- note: fitType='parametric', but the dispersion trend was not well captured by the
function: y = a/x + b, and a local regression fit was automatically substituted.
specify fitType='local' or 'mean' to avoid this message next time.
final dispersion estimates
Error in getZScores(fc.example.u15) :
Failed to estimate the parameters of the Variance stabilizing transformation.
Here is the code I used before getZScores():
library(FourCSeq)
referenceGenomeFile.chr19 = "/Users/gus/Documents/Science/3. PhD/Resources/Sequences/Homo_sapiens.GRCh38.dna.chromosome.19.fa"
bamFilePath.u15example = "/Users/gus/Documents/Science/3. PhD/Experiments/4C/DM1/Data_analysis/FourCSeq/example_u15_bam_files"
primerFile.u15 = "/Users/gus/Documents/Science/3. PhD/Experiments/4C/DM1/Data_analysis/FourCSeq/DMPK_u15_primer_file.fa"
metadata.example.u15 <- list(projectPath = "example_u15",
fragmentDir = "example_u15_re_fragments",
referenceGenomeFile = referenceGenomeFile.chr19,
reSequence1 = "GATC",
reSequence2 = "CTAG",
primerFile = primerFile.u15,
bamFilePath = bamFilePath.u15example)
colData.example.u15 <- DataFrame(viewpoint = "DMPK_u15",
condition = factor(rep(c("GM04604", "GM06077"), each=2),
levels = c("GM04604", "GM06077")),
replicate = rep(c(2, 3), 2),
bamFile = c("DM1_2_pool_3_DMPK_u15_GM04604_filtered.bam",
"DM1_3_pool_1_DMPK_u15_GM04604_filtered.bam",
"DM1_2_pool_1_DMPK_u15_GM06077_filtered.bam",
"DM1_3_pool_2_DMPK_u15_GM06077_filtered.bam"),
sequencingPrimer = "first")
fc.example.u15 <- FourC(colData.example.u15, metadata.example.u15)
fc.example.u15 <- addFragments(fc.example.u15)
rowRanges(fc.example.u15)
findViewpointFragments(fc.example.u15)
fc.example.u15 <- addViewpointFrags(fc.example.u15)
fc.example.u15 <- countFragmentOverlaps(fc.example.u15, trim = 4, minMapq = 30)
fc.example.u15 <- combineFragEnds(fc.example.u15)
writeTrackFiles(fc.example.u15, format = 'bedGraph')
fc.example.u15 <- smoothCounts(fc.example.u15)
fcf.example.u15 <- getZScores(fc.example.u15)
traceback()
2: stop("Failed to estimate the parameters of the Variance stabilizing transformation.")
1: getZScores(fc.example.u15)
sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] C
attached base packages:
[1] splines parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] FourCSeq_1.12.0 LSD_4.0-0 DESeq2_1.18.1 SummarizedExperiment_1.8.1
[5] DelayedArray_0.4.1 matrixStats_0.53.1 Biobase_2.38.0 ggplot2_2.2.1
[9] GenomicRanges_1.30.3 GenomeInfoDb_1.14.0 IRanges_2.12.0 S4Vectors_0.16.0
[13] BiocGenerics_0.24.0 BiocInstaller_1.28.0
loaded via a namespace (and not attached):
[1] ProtGenerics_1.10.0 bitops_1.0-6 bit64_0.9-7
[4] RColorBrewer_1.1-2 progress_1.1.2 httr_1.3.1
[7] tools_3.4.4 backports_1.1.2 R6_2.2.2
[10] rpart_4.1-13 Hmisc_4.1-1 DBI_0.8
[13] lazyeval_0.2.1 colorspace_1.3-2 nnet_7.3-12
[16] gridExtra_2.3 prettyunits_1.0.2 GGally_1.3.2
[19] RMySQL_0.10.14 curl_3.2 bit_1.1-12
[22] compiler_3.4.4 graph_1.56.0 htmlTable_1.11.2
[25] rtracklayer_1.38.3 ggbio_1.26.1 scales_0.5.0
[28] checkmate_1.8.5 genefilter_1.60.0 RBGL_1.54.0
[31] stringr_1.3.0 digest_0.6.15 Rsamtools_1.30.0
[34] foreign_0.8-69 XVector_0.18.0 base64enc_0.1-3
[37] dichromat_2.0-0 htmltools_0.3.6 ensembldb_2.2.2
[40] BSgenome_1.46.0 htmlwidgets_1.0 rlang_0.2.0
[43] rstudioapi_0.7 RSQLite_2.1.0 shiny_1.0.5
[46] gtools_3.5.0 BiocParallel_1.12.0 acepack_1.4.1
[49] VariantAnnotation_1.24.5 RCurl_1.95-4.10 magrittr_1.5
[52] GenomeInfoDbData_1.0.0 Formula_1.2-2 Matrix_1.2-14
[55] Rcpp_0.12.16 munsell_0.4.3 stringi_1.1.7
[58] yaml_2.1.18 zlibbioc_1.24.0 plyr_1.8.4
[61] AnnotationHub_2.10.1 grid_3.4.4 blob_1.1.1
[64] lattice_0.20-35 Biostrings_2.46.0 GenomicFeatures_1.30.3
[67] annotate_1.56.2 locfit_1.5-9.1 knitr_1.20
[70] pillar_1.2.1 fda_2.4.7 geneplotter_1.56.0
[73] reshape2_1.4.3 biomaRt_2.34.2 XML_3.98-1.10
[76] biovizBase_1.26.0 latticeExtra_0.6-28 data.table_1.10.4-3
[79] httpuv_1.3.6.2 gtable_0.2.0 reshape_0.8.7
[82] assertthat_0.2.0 mime_0.5 xtable_1.8-2
[85] AnnotationFilter_1.2.0 survival_2.41-3 OrganismDbi_1.20.0
[88] tibble_1.4.2 GenomicAlignments_1.14.2 AnnotationDbi_1.40.0
[91] memoise_1.1.0 cluster_2.0.7-1 interactiveDisplayBase_1.16.0
Upon searching for similar questions, I found fourCseq - error getZscores. However, there doesn't seem to be a clear answer to this question. Nonetheless, I tried changing to fcf.example.u15 <- getZScores(fc.example.u15, minCount = 10), but it still didn't work.
I would greatly appreciate any suggestions/fixes for this.
Cheers,
Gustavo
