Extract reads for each cell within a given genomic region or set of regions
GetReadsInRegion( object, region, assay = NULL, tabix.file = NULL, group.by = NULL, cells = NULL, verbose = TRUE, ... )
object | A Seurat object |
---|---|
region | A genomic region, specified as a string in the format 'chr:start-end'. Can be a vector of regions. |
assay | Name of assay to use |
tabix.file | A TabixFile object. If NULL, the file specified in
|
group.by | Cell grouping information to add |
cells | Cells to include. Default is all cells present in the object. |
verbose | Display messages |
... | Additional arguments passed to |
Returns a data frame
fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac") atac_small <- SetFragments(object = atac_small, file = fpath) region <- StringToGRanges(regions = "chr1-10245-762629") GetReadsInRegion(object = atac_small, region = region)#>#> chr start end cell count ident length group #> 1: chr1 10245 10302 AAAGATGAGGCTAAAT-1 1 1 57 0 #> 2: chr1 55313 55699 AAACTCGTCTGGCACG-1 2 1 386 1 #> 3: chr1 56455 56658 AAACTCGTCTGGCACG-1 1 1 203 1 #> 4: chr1 60687 60726 AAACTGCAGTCTGTGT-1 1 1 39 1 #> 5: chr1 235723 235936 AAACTGCTCCTATCCG-1 1 1 213 0 #> 6: chr1 237741 237772 AAAGGATTCCTTACGC-1 1 1 31 0 #> 7: chr1 241022 241062 AAAGATGAGAAGGGCG-1 1 1 40 0 #> 8: chr1 526949 527161 AAACGAAGTGCCCGAT-1 2 1 212 1 #> 9: chr1 565296 565351 AAACTGCAGTCTGTGT-1 1 1 55 1 #> 10: chr1 712868 713146 AAACGAAAGGCTTCGC-1 1 1 278 1 #> 11: chr1 713591 714040 AAACTCGCAGCGTCGT-1 1 1 449 1 #> 12: chr1 713684 714108 AAACGAAGTGCCCGAT-1 1 1 424 1 #> 13: chr1 713734 714120 AAACGAATCCTTACGC-1 2 1 386 1 #> 14: chr1 713751 714035 AAAGGATCATGGAGGT-1 6 1 284 1 #> 15: chr1 713752 713990 AAACTGCTCCTATCCG-1 3 1 238 0 #> 16: chr1 713780 713992 AAAGATGCACGTTACA-1 3 1 212 0 #> 17: chr1 713783 714025 AAAGATGTCCACACCT-1 2 1 242 1 #> 18: chr1 713783 714045 AAACGAAAGGCTTCGC-1 2 1 262 1 #> 19: chr1 713832 714003 AAACTGCAGAATCAAC-1 1 1 171 0 #> 20: chr1 713856 714048 AAACTCGGTTTGATCG-1 1 1 192 0 #> 21: chr1 713934 714035 AAAGATGCAAGTCTGT-1 3 1 101 1 #> 22: chr1 713934 714176 AAACTCGTCAGGTCTA-1 3 1 242 0 #> 23: chr1 713944 713997 AAACGAAAGGCTTCGC-1 1 1 53 1 #> 24: chr1 713989 714247 AAACTGCGTGCATTCA-1 2 1 258 0 #> 25: chr1 713990 714322 AAACTGCTCCTATCCG-1 1 1 332 0 #> 26: chr1 714017 714043 AAACTGCCATGTATCG-1 1 1 26 1 #> 27: chr1 714017 714092 AAAGGATTCCTTACGC-1 2 1 75 0 #> 28: chr1 714017 714213 AAACTGCCAAGCCAGA-1 1 1 196 0 #> 29: chr1 714022 714182 AAACTCGAGTACTCTG-1 1 1 160 1 #> 30: chr1 714027 714214 AAACTGCTCGTTCAGA-1 4 1 187 0 #> 31: chr1 714028 714144 AAAGGATGTCGTAATC-1 1 1 116 0 #> 32: chr1 714028 714145 AAAGGATTCTATGAGC-1 1 1 117 0 #> 33: chr1 714040 714108 AAACGAAGTCAGGCTC-1 1 1 68 1 #> 34: chr1 714043 714148 AAACTGCAGCTCCATA-1 8 1 105 1 #> 35: chr1 714043 714178 AAAGATGAGTCCAGAG-1 9 1 135 1 #> 36: chr1 714114 714207 AAAGATGTCCACACCT-1 1 1 93 1 #> 37: chr1 714125 714193 AAAGATGTCCACACCT-1 2 1 68 1 #> 38: chr1 714131 714186 AAACTGCTCATTCATC-1 1 1 55 0 #> 39: chr1 714140 714174 AAACGAAAGCGAGCTA-1 1 1 34 0 #> 40: chr1 714140 714241 AAACTCGGTGGATTCT-1 3 1 101 1 #> 41: chr1 714144 714209 AAACGAAAGGCTTCGC-1 3 1 65 1 #> 42: chr1 714182 714284 AAACTCGTCTGGCACG-1 1 1 102 1 #> 43: chr1 714183 714221 AAAGATGTCTAGCAGT-1 2 1 38 1 #> 44: chr1 714190 714335 AAAGGATCAGATGGCA-1 1 1 145 0 #> 45: chr1 714241 714345 AAACTGCGTACTAGAA-1 4 1 104 1 #> 46: chr1 714263 714732 AAACGAAAGGCTTCGC-1 1 1 469 1 #> 47: chr1 714289 714339 AAAGATGAGGCTAAAT-1 2 1 50 0 #> 48: chr1 714454 714485 AAAGATGAGGCTAAAT-1 1 1 31 0 #> 49: chr1 714464 714573 AAACTCGAGTACTCTG-1 1 1 109 1 #> 50: chr1 714464 714777 AAAGATGTCCTGAAAC-1 2 1 313 1 #> 51: chr1 714597 715147 AAAGGATCAAGGGAGG-1 1 1 550 1 #> 52: chr1 722942 723275 AAAGATGCAGCACATT-1 1 1 333 1 #> 53: chr1 738117 738167 AAACTCGGTTTGATCG-1 1 1 50 0 #> 54: chr1 752259 752335 AAACTCGGTGGATTCT-1 1 1 76 1 #> 55: chr1 752435 752819 AAACTCGCAAAGAGAG-1 1 1 384 1 #> 56: chr1 752651 752827 AAAGATGAGTCGACCC-1 3 1 176 0 #> 57: chr1 752660 752875 AAACTCGCATCACAGT-1 3 1 215 0 #> 58: chr1 752682 752837 AAAGGATTCTATGAGC-1 1 1 155 0 #> 59: chr1 752684 752825 AAAGGATGTCCCTTTG-1 1 1 141 0 #> 60: chr1 752688 752772 AAACTGCCAACAAACA-1 1 1 84 0 #> 61: chr1 752699 752877 AAAGATGCATGACTGT-1 3 1 178 0 #> 62: chr1 752702 752831 AAAGATGAGAAGGGCG-1 1 1 129 0 #> 63: chr1 753227 753684 AAACTCGTCCACTAGA-1 1 1 457 1 #> 64: chr1 754851 755017 AAAGATGCACGTTACA-1 1 1 166 0 #> 65: chr1 755549 755587 AAAGATGCAGCGTCGT-1 1 1 38 0 #> 66: chr1 757378 757538 AAACGAAAGGCTTCGC-1 2 1 160 1 #> 67: chr1 762083 762426 AAAGGATGTCTAAGAA-1 1 1 343 0 #> 68: chr1 762180 762568 AAACGAAGTTGTATCG-1 1 1 388 1 #> 69: chr1 762450 762501 AAAGGATAGAACCATA-1 1 1 51 1 #> 70: chr1 762531 762907 AAACTCGCATGTGGGA-1 1 1 376 0 #> chr start end cell count ident length group