hw538 / cfdnapro Goto Github PK
View Code? Open in Web Editor NEWcfDNAPro specializes in standardized and robust cfDNA fragmentomic analysis
License: GNU General Public License v3.0
cfDNAPro specializes in standardized and robust cfDNA fragmentomic analysis
License: GNU General Public License v3.0
Hi,
First of all, thank you for your contribution. I am following the demo described in https://bioconductor.org/packages/release/bioc/vignettes/cfDNAPro/inst/doc/cfDNAPro.html and is not working for me. Sorry but I'm very new to bioinformatics.
I have a folder called bam_metrics_cfDNA where I have two subfolders: cohort_1 and cohort_2. They both have different .txt files generated using picard CollectInsertSizeMetrics
(the input for cfDNAPro).
First, when I run the code for plotting only one plot for cohort_1:
data_path <- "/Users/abelgd/Desktop/training_bioinfo/cfDNAs/bam_metrics_cfDNA"
cohort1_plot <- cfDNAPro::callSize(path = data_path) %>%
dplyr::filter(group == as.character("cohort_1")) %>%
cfDNAPro::plotSingleGroup()
I get this error:
cohort1_plot
$prop_plot
Error in draw_axis(break_positions = guide$key[[aesthetic]], break_labels = guide$key$.label, :
lazy-load database '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gtable/R/gtable.rdb' is corrupt
In addition: Warning messages:
1: In draw_axis(break_positions = guide$key[[aesthetic]], break_labels = guide$key$.label, :
restarting interrupted promise evaluation
2: In draw_axis(break_positions = guide$key[[aesthetic]], break_labels = guide$key$.label, :
internal error -3 in R_decompress1
I read that cohort1_plot is an S3 object with 3 ggplot objects so, how can I plot the data within it?
Building the vignettes on windows appears to fail:
── R CMD build ───────────────────────────────────────────────────────────────
✔ checking for file 'C:\Users\XXXXXX\AppData\Local\Temp\RtmpWCknBL\remotes43486a6b318f\hw538-cfDNAPro-e11dd61/DESCRIPTION' (537ms)
─ preparing 'cfDNAPro': (1.5s)
✔ checking DESCRIPTION meta-information ...
─ installing the package to build vignettes
E creating vignettes (55.5s)
--- re-building 'cfDNAPro.Rmd' using rmarkdown
Loading required package: magrittr
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
Loading required package: ggplot2
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Scale for y is already present.
Adding another scale for y, which will replace the existing scale.
Quitting from lines 277-295 (cfDNAPro.Rmd)
Error: processing vignette 'cfDNAPro.Rmd' failed with diagnostics:
Problem while computing count = n()
.
ℹ The error occurred in group 1: group = "cohort_1", insert_size = 142.
Caused by error in n()
:
! This function should not be called directly
--- failed re-building 'cfDNAPro.Rmd'
SUMMARY: processing the following file failed:
'cfDNAPro.Rmd'
Error: Vignette re-building failed.
Execution halted
Error: Failed to install 'cfDNAPro' from GitHub:
! System command 'Rcmd.exe' failed
sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.utf8
[2] LC_CTYPE=English_United Kingdom.utf8
[3] LC_MONETARY=English_United Kingdom.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_2.4.5 usethis_2.1.6
loaded via a namespace (and not attached):
[1] tidyselect_1.2.0 remotes_2.4.2 purrr_0.3.5 carData_3.0-5
[5] colorspace_2.0-3 vctrs_0.5.1 generics_0.1.3 miniUI_0.1.1.1
[9] htmltools_0.5.3 utf8_1.2.2 rlang_1.0.6 pkgbuild_1.4.0
[13] urlchecker_1.0.1 ggpubr_0.5.0 pillar_1.8.1 later_1.3.0
[17] withr_2.5.0 glue_1.6.2 DBI_1.1.3 sessioninfo_1.2.2
[21] lifecycle_1.0.3 stringr_1.5.0 munsell_0.5.0 ggsignif_0.6.4
[25] gtable_0.3.1 htmlwidgets_1.5.4 memoise_2.0.1 callr_3.7.3
[29] fastmap_1.1.0 httpuv_1.6.6 ps_1.7.2 curl_4.3.3
[33] fansi_1.0.3 broom_1.0.1 Rcpp_1.0.9 xtable_1.8-4
[37] backports_1.4.1 scales_1.2.1 promises_1.2.0.1 cachem_1.0.6
[41] desc_1.4.2 pkgload_1.3.2 abind_1.4-5 mime_0.12
[45] fs_1.5.2 ggplot2_3.4.0 digest_0.6.30 stringi_1.7.8
[49] rstatix_0.7.1 processx_3.8.0 dplyr_1.0.10 shiny_1.7.3
[53] rprojroot_2.0.3 cowplot_1.1.1 grid_4.2.2 cli_3.4.1
[57] tools_4.2.2 magrittr_2.0.3 tibble_3.1.8 profvis_0.3.7
[61] crayon_1.5.2 car_3.1-1 tidyr_1.2.1 pkgconfig_2.0.3
[65] ellipsis_0.3.2 prettyunits_1.1.1 assertthat_0.2.1 rstudioapi_0.14
[69] R6_2.5.1 compiler_4.2.2
Following the explanation in https://bioconductor.org/packages/release/bioc/vignettes/cfDNAPro/inst/doc/cfDNAPro.html I got an error when plotting the multiplex. I have previously organized the .txt files generated with picard CollectInsertSizeMetrics
into a folder containing two subfolders: cohort_1 and cohort_2. They both are in:
data_path <- '/Users/abelgd/Desktop/training_bioinfo/cfDNAs/bam_metrics_cfDNA'
When running this:
grp_list<-list("cohort_1"="cohort_1",
"cohort_2"="cohort_2")
result<-sapply(grp_list, function(x){
result <-callSize(path = data_path) %>%
dplyr::filter(group==as.character(x)) %>%
plotSingleGroup()
}, simplify = FALSE)
I got the following error:
Error in plotSingleGroup(.) : could not find function "plotSingleGroup"
Also it gives me the option to Show Traceback or Rerun with Debug.
Does anyone know what happening here?
I am trying to run cfNDAPro on data aligned to a "synthetic" genome containing puc and lambda sequences to check for methylation conversion.
I am trying to only look at reads aligned to 1:22 and X and Y however I struggle to read the bam file into cfDNAPro:
read_bam_insert_metrics(bamfile = file.bam, genome_label="hg38-NCBI",chromosome_to_keep =append(1:22,c("X","Y")))
bamfile
was supplied.
Reading bam into galp...
Curating seqnames and strand information...
Removing outward facing fragments ...
Correcting start and end coordinates of fragments ...
Error in .normarg_seqlengths(value, seqnames(x)) :
the length of the supplied 'seqlengths' vector must be equal to the
number of sequences
Calls: read_bam_insert_metrics ... seqlengths<- -> seqlengths<- -> .normarg_seqlengths
In addition: Warning message:
In .merge_two_Seqinfo_objects(x, y) :
Each of the 2 combined objects has sequence levels not in the other:
I get the same error when I subset the bam file to only the relevant chromosomes using
samtools view
then re-index. I believe this is because the header retains the old chromosome names:
…
9 138394717 1374698 0
MT 16569 0 0
X 156040895 1739164 0
Y 57227415 7892 0
KI270728.1 1872759 0 0
KI270727.1 448248 0 0
KI270442.1 392061 0 0
…
Is there a way around this?
many thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.