wbaopaul / scATAC-pro

A comprehensive tool for processing, analyzing and visulizing single cell chromatin accessibility sequencing data
MIT License
70 stars 24 forks source link

Motif analysis error and Seurat metadata #24

Closed AnjaliC4 closed 3 years ago

AnjaliC4 commented 4 years ago

Hi, sometimes when I run motif analysis,I get this error: Loading required package: rtracklayer Error in loadFUN(x, seqname, ranges) : trying to load regions beyond the boundaries of non-circular sequence "chr1" Calls: run_chromVAR ... loadSubseqsFromStrandedSequence -> loadFUN -> loadFUN Execution halted Motif analysis done! Could you please tell me what this error might be related to and how to resolve it? In addition, my log files often say: No methods found in package ‘IRanges’ for request: ‘score’ when loading ‘TFBSTools’ but then it loads all the packages just fine. This is a warning not an error, would this might change the output in anyway?

Finally, I was wondering if it maybe possible for you to show me how to generate metadata (equivalent to SingleCell.csv file) produced by 10x cellranger. There is a file outputted by scATAC-pro called "atac.qc_per_barcode.txt" which has similar information to singlecell.csv but not all of it. The reason it would be beneficial to have this metadata file is that it would be compatible with Seurat Vignettes like the ones involving the integration of scATAC-seq with scRNA-seq data. I know you guys have provided a tutorial to do custom clustering with Seurat, but it doesn't work when integrating with previously generated scRNA-seq data. It specifically fails at "FindTransferAnchror" step, so if you could either show me a way to generate that metafile it would be great if one needs to apply any Seurat analyses.

Thanks a lot!!

wbaopaul commented 4 years ago
  1. The chromVAR issue may due to the coordinate of some peaks. Can you check whether the peak coordinates is greater than the length of chr1? (I forced each peak to be at least 500bp in length). I will fix this anyway. If this is not the case, what's the version of your chromVAR package? BTW, the warning is not an issue at all and it will not change the output. I frequently got that kind of warning.

  2. I am not sure what exact extra metadata you mean. I think the metadata will not affect your integration analysis with scRNA-seq data (I will upload those metadata in qc_per_barcode.txt file into the seurat obj for next update of scATAC-pro). As for the issue of integration with scRNA-seq data: the rowname of the seurat object generated by scATAC-pro is annotated with gene name (like chr1-xxx-xxx,gene1), which may lead to an error when you directly follow the standard tutorial of integration with seurat scRNA data. You can rename the scATAC-pro seurat or matrix obj and redo the integration analysis. I will write an tutorial section about how to integrate scATAC-pro seurta object with scRNA seurat obj soon.

Hope it helps. (Next time, could you please ask questions one by one ^^)

AnjaliC4 commented 4 years ago

Hi , sorry about the questions, will keep that in mind :) To answer your questions:

I am using chromVar version ‘1.8.0’. I was actually using another peak calling algorithm (HMMR-ATAC), not an option in scATAC-pro, do you think that maybe the problem? Not sure how to check peak coordinates greater than chr1 length, sorry if you could let me know that would be very helpful.

Thanks for your help!

wbaopaul commented 4 years ago

I don't know whether using other peak calling algorithm is a problem or not; once the rowname is in the same format, it should be no problem. You need first confim this. Second, you have peak file right, which should give you peak coordinates and just check it with the chrom size file (which can be found in https://github.com/wbaopaul/scATAC-pro/tree/master/annotation).

wbaopaul commented 3 years ago

For the current release (v1.2.0), the QC per barcode statistics were uploaded to Seurat Object as metadata.

wbaopaul commented 3 years ago

Since no feedback for this issue for a while, I will close it.