GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
384 stars 137 forks source link

TileMatrix #330

Closed rojinsafavi closed 4 years ago

rojinsafavi commented 4 years ago

I was wondering if you could explain what are the row names of the tilematrix? I assume that it is the :

TileMatrix@elementMetadata
DataFrame with 6062095 rows and 3 columns
        seqnames     idx     start
           <Rle> <array>   <array>
1           chr1       1         0
2           chr1       2       500
3           chr1       3      1000
4           chr1       4      1500
5           chr1       5      2000
...          ...     ...       ...
6062091     chrX  312078 156038500
6062092     chrX  312079 156039000
6062093     chrX  312080 156039500
6062094     chrX  312081 156040000
6062095     chrX  312082 156040500

But I was wondering if you could explain what idx and start is? How can I retrieve the bins coordinate for the tile matrix?

rcorces commented 4 years ago

I believe that idx is the index of the tile on that particular chromosome and start is the starting coordinate of the bin. The bin coordinates would then be start + bin_size -1

jzw1999 commented 1 month ago

Is this still a feature for ArchR now? I get the tile matrix using assays(getMatrixFromProject(archr.obj, useMatrix = "TileMatrix", binarize = T))$TileMatrix but it is a dgCMatrix and doesn't have a metadata slot accessible using @elementMetadata.