crisprVerse / crisprDesign

Comprehensive design of CRISPR gRNAs for nucleases and base editors
MIT License
16 stars 5 forks source link

what's the meaning of "alignments" in GuideSet object ? #9

Closed panxiaoguang closed 1 year ago

panxiaoguang commented 1 year ago

For example, I will type some codes like this:

library(crisprDesign)
data(guideSetExampleWithAlignments, package="crisprDesign")
test<-guideSetExampleWithAlignments
unlist(mcols(test)["spacer_10",]$alignments)

then I can got

GRanges object with 28 ranges and 15 metadata columns:
                         seqnames    ranges strand |               spacer          protospacer
                            <Rle> <IRanges>  <Rle> |       <DNAStringSet>       <DNAStringSet>
  spacer_524.spacer_1019    chr12 101842137      + | TGCTTTCCAGATTACTCTCA TGCTTTCCAGAATACTGTCA
   spacer_524.spacer_505    chr19  51689401      + | CAGAGCCGTGGAGGAGGAGA CAGAGCCGGGGAGGAGGTGA
   spacer_524.spacer_505    chr11  48066239      - | CAGAGCCGTGGAGGAGGAGA CAGAGCACTGGAGGAGGAGT
   spacer_524.spacer_505    chr12  78501961      - | CAGAGCCGTGGAGGAGGAGA CAGAGACAGGGAGGAGGAGA
   spacer_524.spacer_505     chr1 227493027      - | CAGAGCCGTGGAGGAGGAGA CACAGCCGAGGAGGAGGAGG
                     ...      ...       ...    ... .                  ...                  ...
    spacer_524.spacer_10    chr14 105159879      - | GGGTGTGGATGAGGCTCTGC GGGTGTGGATGGAGCTCTGG
    spacer_524.spacer_10    chr16  49657876      - | GGGTGTGGATGAGGCTCTGC GGCTGTGGAGGAGGCTATGC
   spacer_524.spacer_965     chrX 103979982      - | GGCTGCAGCACACCAGGCGG GGCTGCAGCAGCCCAGGCTG
   spacer_524.spacer_965    chr17  41047092      + | GGCTGCAGCACACCAGGCGG GGTCGCAGCACACCGGGCGG
   spacer_524.spacer_503    chr12    138847      - | AGGAGGAGACGGATATGTTC AGGAGGAGACGGATATGTTC
...

So why the alignments for spacer_10 have many aligned results from another spacers?

Jfortin1 commented 1 year ago

Hi @panxiaoguang, I'll take a look at this; this seems to be a bug

Jfortin1 commented 1 year ago

@panxiaoguang Thanks again for reporting this; the object was outdated and the alignments was shuffled due to an earlier bug. Pushed fixed to v.1.1.17