ATAC-Seq peaks quality control with ChIPQC package, but getting error
0
0
Entering edit mode
@subinoy-biswas-6708
Last seen 5.8 years ago

I am doing a quality check of my ATAC-Seq peaks with ChIPQC package but I am getting an error.

Error in names(res) <- c("Reads", "Map%", "Filt%", "Dup%", "ReadL", "FragL",  : 
  'names' attribute [9] must be the same length as the vector [7]

So, I need help to solve the issue. Below is my sample sheet.

> sampleid  Tissue  Factor  Condition   Treatment   Replicate   bamReads    ControlID   bamControl  Peaks   PeakCaller

> BD24  Tumor       Eight   2018    1   bam_reads/BD24_bam.bam  BD03    bam_reads/BD03_bam.bam  peaks_BD03_ref_data/q_05/BD24_peaks.narrowPeak  macs

> BD28  Tumor       Eight   2018    2   bam_reads/BD28_bam.bam  BD031   bam_reads/BD03_bam.bam  peaks_BD03_ref_data/q_05/BD28_peaks.narrowPeak  macs

> BD07  Tumor       Twelve  2016    1   bam_reads/BD07_bam.bam  BD032   bam_reads/BD03_bam.bam  peaks_BD03_ref_data/q_05/BD07_peaks.narrowPeak  macs

> BD11  Tumor       Twelve  2017    2   bam_reads/BD11_bam.bam  BD033   bam_reads/BD03_bam.bam  peaks_BD03_ref_data/q_05/BD11_peaks.narrowPeak  macs

Here is my code

    library(DiffBind)
    library(ChIPseeker)
    library(org.Mm.eg.db)
    library(bedr)
    library(ChIPQC)
    library(BiocParallel)
    register(SerialParam())
    samples <- read.csv("cd4_meta_8_12_BD03_q_05_test.csv", header = T)
    proj1 = ChIPQC(samples,annotation = 'mm10',chromosomes = "chrY")
    proj1

proj1 = ChIPQC(samples,annotation = 'mm10',chromosomes = "chrY")

1 Tumor  Eight 2018 1 macs


2 Tumor  Eight 2018 2 macs

3 Tumor  Twelve 2016 1 macs

4 Tumor  Twelve 2017 2 macs

Compiling annotation...
Computing metrics for 5 samples...
list
Bam file has 138 contigs
Calculating coverage histogram for chrY

Calculating SSD for chrY

Calculating unique positions per strand for chrY

Calculating shift for chrY

 300 / 300
Counting reads in features for chrY

Signal over peaks for chrY

done
Calculating coverage
Calculating Summits on  chrY  ..[1] 1
list
Bam file has 138 contigs
Calculating coverage histogram for chrY

Calculating SSD for chrY

Calculating unique positions per strand for chrY

Calculating shift for chrY

 300 / 300
Counting reads in features for chrY

Signal over peaks for chrY

done
Calculating coverage
Calculating Summits on  chrY  ..[1] 1
list
Bam file has 138 contigs
Calculating coverage histogram for chrY

Calculating SSD for chrY

Calculating unique positions per strand for chrY

Calculating shift for chrY

 300 / 300
Counting reads in features for chrY

Signal over peaks for chrY

done
Calculating coverage
Calculating Summits on  chrY  ..[1] 1
list
Bam file has 138 contigs
Calculating coverage histogram for chrY

Calculating SSD for chrY

Calculating unique positions per strand for chrY

Calculating shift for chrY

 300 / 300
Counting reads in features for chrY

Signal over peaks for chrY

done
Calculating coverage
Calculating Summits on  chrY  ..[1] 1
list
Bam file has 138 contigs
Calculating coverage histogram for chrY

Calculating SSD for chrY

Calculating unique positions per strand for chrY

Calculating shift for chrY

 300 / 300
Counting reads in features for chrY

[1] 1
**Warning messages:**

1: In if is.na(peaks)) peaks = NULL :
  the condition has length > 1 and only the first element will be used

2: In if is.na(peaks)) peaks = NULL :
  the condition has length > 1 and only the first element will be used

3: In if is.na(peaks)) peaks = NULL :
  the condition has length > 1 and only the first element will be used

4: In if is.na(peaks)) peaks = NULL :
  the condition has length > 1 and only the first element will be used

 **proj1**

> Samples: 5 : 1 2 3 4 BD03 

>  Tissue Condition Treatment Control Replicate Peaks

> 1  Tumor     Eight      2018    BD03         1 14156

> 2  Tumor     Eight      2018   BD031         2  4052

> 3  Tumor    Twelve      2016   BD032         1  3968

> 4  Tumor    Twelve      2017   BD033         2 14339




**Error in names(res) <- c("Reads", "Map%", "Filt%", "Dup%", "ReadL", "FragL",  : 
  'names' attribute [9] must be the same length as the vector [7]**
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.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.5/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] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] org.Mm.eg.db_3.7.0          AnnotationDbi_1.44.0        ChIPQC_1.18.0               ggplot2_3.1.0              
 [5] bindrcpp_0.2.2              bedr_1.0.6                  ChIPseeker_1.18.0           TCseq_1.6.0                
 [9] rmarkdown_1.11              DiffBind_2.10.0             SummarizedExperiment_1.12.0 DelayedArray_0.8.0         
[13] BiocParallel_1.16.2         matrixStats_0.54.0          Biobase_2.42.0              GenomicRanges_1.34.0       
[17] GenomeInfoDb_1.18.1         IRanges_2.16.0              S4Vectors_0.20.1            BiocGenerics_0.28.0        

loaded via a namespace (and not attached):
  [1] R.utils_2.7.0                             tidyselect_0.2.5                         
  [3] RSQLite_2.1.1                             htmlwidgets_1.3                          
  [5] grid_3.5.1                                BatchJobs_1.7                            
  [7] munsell_0.5.0                             units_0.6-2                              
  [9] systemPipeR_1.16.0                        withr_2.1.2                              
 [11] colorspace_1.4-0                          GOSemSim_2.8.0                           
 [13] Category_2.48.0                           knitr_1.21                               
 [15] rstudioapi_0.9.0                          DOSE_3.8.0                               
 [17] labeling_0.3                              urltools_1.7.1                           
 [19] GenomeInfoDbData_1.2.0                    hwriter_1.3.2                            
 [21] bit64_0.9-7                               farver_1.1.0                             
 [23] pheatmap_1.0.12                           TxDb.Rnorvegicus.UCSC.rn4.ensGene_3.2.2  
 [25] lambda.r_1.2.3                            xfun_0.4                                 
 [27] R6_2.3.0                                  locfit_1.5-9.1                           
 [29] bitops_1.0-6                              fgsea_1.8.0                              
 [31] gridGraphics_0.3-0                        assertthat_0.2.0                         
 [33] scales_1.0.0                              ggraph_1.0.2                             
 [35] nnet_7.3-12                               enrichplot_1.2.0                         
 [37] gtable_0.2.0                              rlang_0.3.1                              
 [39] genefilter_1.64.0                         BBmisc_1.11                              
 [41] splines_3.5.1                             rtracklayer_1.42.1                       
 [43] lazyeval_0.2.1                            acepack_1.4.1                            
 [45] europepmc_0.3                             brew_1.0-6                               
 [47] checkmate_1.9.0                           yaml_2.2.0                               
 [49] reshape2_1.4.3                            TxDb.Dmelanogaster.UCSC.dm3.ensGene_3.2.2
 [51] GenomicFeatures_1.34.1                    backports_1.1.3                          
 [53] qvalue_2.14.0                             Hmisc_4.1-1                              
 [55] RBGL_1.58.1                               tools_3.5.1                              
 [57] ggplotify_0.0.3                           gridBase_0.4-7                           
 [59] gplots_3.0.1                              RColorBrewer_1.1-2                       
 [61] ggridges_0.5.1                            Rcpp_1.0.0                               
 [63] plyr_1.8.4                                base64enc_0.1-3                          
 [65] progress_1.2.0                            zlibbioc_1.28.0                          
 [67] purrr_0.2.5                               RCurl_1.95-4.11                          
 [69] prettyunits_1.0.2                         rpart_4.1-13                             
 [71] viridis_0.5.1                             cowplot_0.9.4                            
 [73] chipseq_1.32.0                            ggrepel_0.8.0                            
 [75] cluster_2.0.7-1                           magrittr_1.5                             
 [77] TxDb.Hsapiens.UCSC.hg18.knownGene_3.2.2   data.table_1.12.0                        
 [79] futile.options_1.0.1                      DO.db_2.9                                
 [81] triebeard_0.3.0                           amap_0.8-16                              
 [83] TxDb.Mmusculus.UCSC.mm9.knownGene_3.2.2   hms_0.4.2                                
 [85] evaluate_0.12                             xtable_1.8-3                             
 [87] XML_3.98-1.16                             VennDiagram_1.6.20                       
 [89] gridExtra_2.3                             testthat_2.0.1                           
 [91] compiler_3.5.1                            biomaRt_2.38.0                           
 [93] tibble_2.0.1                              KernSmooth_2.23-15                       
 [95] crayon_1.3.4                              R.oo_1.22.0                              
 [97] htmltools_0.3.6                           GOstats_2.48.0                           
 [99] Formula_1.2-3                             geneplotter_1.60.0                       
[101] sendmailR_1.2-1                           DBI_1.0.0                                
[103] tweenr_1.0.1                              formatR_1.5                              
[105] MASS_7.3-51.1                             boot_1.3-20                              
[107] ShortRead_1.40.0                          Matrix_1.2-15                            
[109] R.methodsS3_1.7.1                         gdata_2.18.0                             
[111] bindr_0.1.1                               igraph_1.2.2                             
[113] pkgconfig_2.0.2                           TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2  
[115] rvcheck_0.1.3                             GenomicAlignments_1.18.0                 
[117] foreign_0.8-71                            TxDb.Celegans.UCSC.ce6.ensGene_3.2.2     
[119] xml2_1.2.0                                annotate_1.60.0                          
[121] XVector_0.22.0                            AnnotationForge_1.24.0                   
[123] stringr_1.3.1                             digest_0.6.18                            
[125] graph_1.60.0                              Biostrings_2.50.1                        
[127] fastmatch_1.1-0                           htmlTable_1.13.1                         
[129] edgeR_3.24.2                              GSEABase_1.44.0                          
[131] Rsamtools_1.34.0                          gtools_3.8.1                             
[133] rjson_0.2.20                              jsonlite_1.6                             
[135] futile.logger_1.4.3                       viridisLite_0.3.0                        
[137] limma_3.38.3                              pillar_1.3.1                             
[139] Nozzle.R1_1.1-1                           lattice_0.20-38                          
[141] httr_1.4.0                                plotrix_3.7-4                            
[143] survival_2.43-3                           GO.db_3.7.0                              
[145] glue_1.3.0                                UpSetR_1.3.3                             
[147] bit_1.1-14                                Rgraphviz_2.26.0                         
[149] ggforce_0.1.3                             class_7.3-15                             
[151] stringi_1.2.4                             blob_1.1.1                               
[153] TxDb.Mmusculus.UCSC.mm10.knownGene_3.4.4  DESeq2_1.22.1                            
[155] latticeExtra_0.6-28                       caTools_1.17.1.1                         
[157] memoise_1.1.0                             dplyr_0.7.8                              
[159] e1071_1.7-0
--------------------

Please suggest me how to solve this error.

Thanks, SB

ATAC-Seq ChIPQC • 2.0k views
ADD COMMENT
0
Entering edit mode

Thanks, @James W. MacDonald for properly formatting the query.

ADD REPLY
0
Entering edit mode

Got the same error. Is there any update?

ADD REPLY
0
Entering edit mode

Got the same error. Any resolution?

ADD REPLY
0
Entering edit mode

The problem is caused by single end data which would not return fragment length. I fixed it in my fork project. And I contacted the author and hope they will fix it in their next release.

https://github.com/shengqh/ChIPQC

ADD REPLY

Login before adding your answer.

Traffic: 542 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6