Error of makeTechTrend() of Scran
1
0
Entering edit mode
@guangshuai-jia-16949
Last seen 6.3 years ago

Hi, 

I am using Scran and the tutorial as below to analyze singe-cell ATAC-seq data from 10x. https://www.bioconductor.org/packages/devel/workflows/vignettes/simpleSingleCell/inst/doc/work-3-tenx.html#7_modelling_the_mean-variance_trend

When using the example data, I could run it without any issue.

But when using my own data, at the step of fitting I got the following error:

>new.trend <- makeTechTrend(x=sce)
Error in seq.default(from = 0, to = upper.value, length.out = 100) : 
  'to' must be a finite number

Could anyone kindly help me on this? Thank you very much! My sessionInfo() is:

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] scran_1.9.16                EnsDb.Mmusculus.v79_2.99.0  ensembldb_2.5.4            
 [4] AnnotationFilter_1.5.2      GenomicFeatures_1.33.2      AnnotationDbi_1.43.1       
 [7] scater_1.9.14               ggplot2_3.0.0               DropletUtils_1.1.8         
[10] SingleCellExperiment_1.3.10 SummarizedExperiment_1.11.6 DelayedArray_0.7.28        
[13] matrixStats_0.54.0          Biobase_2.41.2              GenomicRanges_1.33.13      
[16] GenomeInfoDb_1.17.1         IRanges_2.15.16             S4Vectors_0.19.19          
[19] BiocGenerics_0.27.1         BiocParallel_1.15.8        

scran single-cell seq.default • 1.1k views
ADD COMMENT
0
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 9 hours ago
The city by the bay

The upper.value refers to the maximum of the per-row average of the log-normalized values in logcounts(sce). The error is telling you that upper.value is not finite, which suggests that you have NA values in logcounts(sce). How these came about is anyone's guess, though the most likely explanation is that there are non-positive size factors somewhere in your analysis.

I haven't dealt with scATAC-seq data so I wouldn't know its peculiarities. But, I have worked with both ChIP-seq and scRNA-seq, and both of them require some care when performing scaling normalization. I would imagine that scATAC-seq "inherits" both sets of difficulties from the two technologies.

ADD COMMENT
0
Entering edit mode

Thank you very much! It seems that it is because of the negative size factor as a similar question here: Warning: negative size factors

I have not fixed this problem yet, but it seems that I need to find a way to deal with such zeros in my data. 

ADD REPLY
0
Entering edit mode

I would suggest filtering more aggressively during size factor calculation, and then applying the size factors to the unfiltered data. Of course, this assumes that high-count regions in ATAC-seq exhibit the same biases as low-count regions, and I know for a fact that's not true for certain types of ChIP-seq data, so YMMV.

ADD REPLY

Login before adding your answer.

Traffic: 867 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