Skip to content

Starcode issue with CellTag object of 12 samples and binarization error #25

@FengHuu

Description

@FengHuu

I have 12 different samples generated from the same starting pool of cells (same CellTag V1 labeling). I created the CellTag object by reading the 12 bam files in the correct order and proceeded to the starcode step.

Issue 1:
12 collapsing files with suffix Sample-1, Sample-2, ...., Sample-12 were generated and I starcoded them one-by-one and put the resulting files in one folder:
collapsing_result_Sample-1.txt
collapsing_result_Sample-2.txt
collapsing_result_Sample-3.txt
collapsing_result_Sample-4.txt
collapsing_result_Sample-5.txt
collapsing_result_Sample-6.txt
collapsing_result_Sample-7.txt
collapsing_result_Sample-8.txt
collapsing_result_Sample-9.txt
collapsing_result_Sample-10.txt
collapsing_result_Sample-11.txt
collapsing_result_Sample-12.txt

However, when doing
My.obj <- CellTagDataPostCollapsing(celltag.obj = My.obj, collapsed.rslt.file = list.files(collapsed.rslt.dir, full.names = T))
The collapsing result files were processed in the wrong order as:
collapsing_result_Sample-1.txt
collapsing_result_Sample-10.txt
collapsing_result_Sample-11.txt
collapsing_result_Sample-12.txt
collapsing_result_Sample-2.txt
collapsing_result_Sample-3.txt
collapsing_result_Sample-4.txt
collapsing_result_Sample-5.txt
collapsing_result_Sample-6.txt
collapsing_result_Sample-7.txt
collapsing_result_Sample-8.txt
collapsing_result_Sample-9.txt

which gave me different sample order in the collapsed.count matrix, following Sample-1 is Sample-10 but not Sample-2.
Screenshot 2024-03-27 at 12 22 00 PM

I tried rename the collapsing result files for the code to process from 1-10, still, however, after collapsing, the order in collasped.count matrix is still the same wrong order (as the picture shown above).

Issue 2:

I tried to skip starcode and proceeded to binarization
My.obj <- SingleCellDataBinarization(My.obj, 2)
which give me this error:

Error in if (any(i < 0L)) { : missing value where TRUE/FALSE needed
In addition: Warning message:
In int2i(as.integer(i), n) : NAs introduced by coercion to integer range

This error also showed up when I did binarization with the collapsed.count matrix though the order is wrong.

Please indicate:

  1. does it matter that the collapsed.count matrix order is not strictly from 1 to 12? If it matters, how to correct this?
  2. How to fix the binarization error?

Many thanks!
Feng

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions