MonashBioinformaticsPlatform / polyApipe

polyApipe
GNU Lesser General Public License v2.1
13 stars 6 forks source link

Error in .local(x, ...) : size factors should be positive #3

Closed cihaterdogan closed 1 year ago

cihaterdogan commented 1 year ago

Hello,

First of all, thank you for such a great tool.

When I run the polyApiper:::do_pipeline() function, I get the error I've shared below. I would be glad if you have any suggestions about the error.

Thanks!

Loading required package: SingleCellExperiment
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: ‘MatrixGenerics’

The following objects are masked from ‘package:matrixStats’:

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, aperm, append, as.data.frame, basename, cbind,
    colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
    get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
    Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
    table, tapply, union, unique, unsplit, which.max, which.min

Loading required package: S4Vectors

Attaching package: ‘S4Vectors’

The following objects are masked from ‘package:base’:

    expand.grid, I, unname

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Attaching package: ‘Biobase’

The following object is masked from ‘package:MatrixGenerics’:

    rowMedians

The following objects are masked from ‘package:matrixStats’:

    anyMissing, rowMedians

snapshotDate(): 2022-10-31
snapshotDate(): 2022-10-31
snapshotDate(): 2022-10-31
snapshotDate(): 2022-10-31
downloading 1 resources
retrieving 1 resource
loading from cache
require(“ensembldb”)
-- 1/4 load --
Loading /N/Pool5_1/Pool-5-1_counts.tab.gz
Loaded 2021065 x 44787 matrix of counts
-- 2/4 assign --
-- 3/4 weitrices --
2024274 peaks in 44787 cells
Kept 1075099 peaks in 44787 cells
11 genes
5 genes with two or more peaks
Compute normalized, log transformed counts
Preclustering
**Error in .local(x, ...) : size factors should be positive**
Calls: <Anonymous> ... .quick_cluster -> normalizeCounts -> normalizeCounts -> .local
In addition: Warning messages:
1: call dbDisconnect() when finished working with a connection 
2: In .merge_two_Seqinfo_objects(x, y) :
  Each of the 2 combined objects has sequence levels not in the other:
  - in 'x': chr1, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr2, chr20, chr21, chr22, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chrM, chrX, chrY, GL000008.2, GL000208.1, GL000214.1, GL000221.1, GL000224.1, KI270320.1, KI270322.1, KI270330.1, KI270384.1, KI270388.1, KI270392.1, KI270435.1, KI270438.1, KI270448.1, KI270468.1, KI270512.1, KI270519.1, KI270538.1, KI270589.1, KI270706.1, KI270707.1, KI270708.1, KI270709.1, KI270712.1, KI270714.1, KI270715.1, KI270716.1, KI270717.1, KI270718.1, KI270719.1, KI270720.1, KI270722.1, KI270723.1, KI270724.1, KI270725.1, KI270729.1, KI270737.1, KI270738.1, KI270740.1, KI270741.1, KI270742.1, KI270743.1, KI270745.1, KI270746.1, KI270747.1, KI270749.1, KI270751.1, KI270755.1, KI270757.1
  - in 'y': CHR_HG107_PATCH, CHR_HG109_PATCH, CHR_HG126_PATCH, CHR_HG1277_PATCH, CHR_HG1298_PATCH, CHR_HG1309_PATCH, CHR_HG1311_PATCH, CHR_HG1320_PATCH, CHR_HG1342_HG228 [... truncated]
Execution halted
pfh commented 1 year ago

Hi @cihaterdogan.

I notice that while you have a massive number of peaks, they have only been associated with 11 genes. This doesn't seem right. I also notice a warning about some chromosome names. Warnings about "patch" sequences, etc, aren't a problem, but the warnings about chr1, chr2, etc definitely are. I strongly suspect the chromosome names in your BAM file aren't matching what polyApiper is expecting, i.e. ENSEMBL style chromosome names.

cihaterdogan commented 1 year ago

Thank you for your response.

And, you're right, in the bam file I'm using, the chromosome names start with "chr" characters.

Best!