Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addGCBias Error in value[[3L]](cond) - truncaded file #102

Open
artsvendsen opened this issue Oct 12, 2022 · 0 comments
Open

addGCBias Error in value[[3L]](cond) - truncaded file #102

artsvendsen opened this issue Oct 12, 2022 · 0 comments

Comments

@artsvendsen
Copy link

Hi,

I'm using chromVAR to analyze bulk ATAC-seq samples where I merge both bam and peakcalled files.
For the FASTA reference I'm using a FaFILE since my samples where aligned to Ensembl 106 release, which is generated with the following lines:

indexFa("~/human/Ensembl_106/Homo_sapiens.GRCh38.dna.primary_assembly.fa")
FaFile.HSapiens.Ensembl.106 <-FaFile("~/human/Ensembl_106/Homo_sapiens.GRCh38.dna.primary_assembly.fa")

(the primary FASTA was downloaded from Ensembl FTP server http://ftp.ensembl.org/pub/release-106/fasta/homo_sapiens/dna/)

When running the analysis with broad peaks, I do not get any issues and the results looks like what we are expecting, however I am now trying to do the same analysis for narrow peaks (same BAM files, same FaFILE, just different MACS2 files), with a small addition of filtering the narrow peaks:

peaks <- readNarrowpeaks(peakfile, width = 500, non_overlapping = TRUE)

but I'm getting an error when running the addGCBias step:

sample_counts <- addGCBias(fragment_counts,
                           genome = FaFile.HSapiens.Ensembl.106)


Error in value[[3L]](cond) :  record 78540 (MT:-33-466) was truncated
  _file: ~/human/Ensembl_106/Homo_sapiens.GRCh38.dna.primary_assembly.fa_

It feels like there might be something wrong with my FASTA file, but since I ran this analysis with broad peaks and it was fine, I assume there's something wrong with the narrow peak analysis, specifically.

I was wondering if you can help me solve this issue. I've attached the narrow peak MACS2 output (there's a .txt at the end so I can properly upload it).

Thanks in advance!

Art.
03_merged_test_full.narrowPeak.txt

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] ggrepel_0.9.1        ggplot2_3.3.6        Rsamtools_2.10.0     Biostrings_2.62.0    XVector_0.34.0       GenomicRanges_1.46.1
 [7] GenomeInfoDb_1.30.1  IRanges_2.28.0       S4Vectors_0.32.4     BiocGenerics_0.40.0  BiocParallel_1.28.3  Matrix_1.5-1        
[13] TFBSTools_1.32.0     motifmatchr_1.16.0   chromVAR_1.16.0     

loaded via a namespace (and not attached):
  [1] bitops_1.0-7                matrixStats_0.62.0          DirichletMultinomial_1.36.0 bit64_4.0.5                 httr_1.4.4                 
  [6] tools_4.1.2                 utf8_1.2.2                  R6_2.5.1                    DT_0.25                     KernSmooth_2.23-20         
 [11] lazyeval_0.2.2              seqLogo_1.60.0              DBI_1.1.3                   colorspace_2.0-3            withr_2.5.0                
 [16] tidyselect_1.2.0            bit_4.0.4                   compiler_4.1.2              cli_3.4.1                   Biobase_2.54.0             
 [21] plotly_4.10.0               DelayedArray_0.20.0         labeling_0.4.2              rtracklayer_1.54.0          caTools_1.18.2             
 [26] scales_1.2.1                readr_2.1.3                 stringr_1.4.1               digest_0.6.29               R.utils_2.12.0             
 [31] pkgconfig_2.0.3             htmltools_0.5.3             MatrixGenerics_1.6.0        fastmap_1.1.0               BSgenome_1.62.0            
 [36] htmlwidgets_1.5.4           rlang_1.0.6                 rstudioapi_0.14             RSQLite_2.2.18              shiny_1.7.2                
 [41] farver_2.1.1                BiocIO_1.4.0                generics_0.1.3              jsonlite_1.8.2              vroom_1.6.0                
 [46] gtools_3.9.3                R.oo_1.25.0                 dplyr_1.0.10                RCurl_1.98-1.9              magrittr_2.0.3             
 [51] GO.db_3.14.0                GenomeInfoDbData_1.2.7      Rcpp_1.0.9                  munsell_0.5.0               fansi_1.0.3                
 [56] R.methodsS3_1.8.2           lifecycle_1.0.3             stringi_1.7.8               yaml_2.3.5                  SummarizedExperiment_1.24.0
 [61] zlibbioc_1.40.0             gplots_3.1.3                plyr_1.8.7                  grid_4.1.2                  blob_1.2.3                 
 [66] parallel_4.1.2              promises_1.2.0.1            crayon_1.5.2                miniUI_0.1.1.1              CNEr_1.30.0                
 [71] lattice_0.20-45             annotate_1.72.0             KEGGREST_1.34.0             hms_1.1.2                   pillar_1.8.1               
 [76] rjson_0.2.21                reshape2_1.4.4              TFMPvalue_0.0.8             XML_3.99-0.11               glue_1.6.2                 
 [81] data.table_1.14.2           png_0.1-7                   vctrs_0.4.2                 tzdb_0.3.0                  httpuv_1.6.6               
 [86] tidyr_1.2.1                 purrr_0.3.5                 gtable_0.3.1                poweRlaw_0.70.6             assertthat_0.2.1           
 [91] cachem_1.0.6                mime_0.12                   xtable_1.8-4                restfulr_0.0.15             pracma_2.4.2               
 [96] later_1.3.0                 viridisLite_0.4.1           tibble_3.1.8                GenomicAlignments_1.30.0    AnnotationDbi_1.56.2       
[101] memoise_2.0.1               ellipsis_0.3.2             
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant