A method for determining the presence or absence of a genetic variant in an analyte at a spatial location in a biological sample, wherein the biological sample is a tissue sample, comprising: (a) contacting the biological sample with a first probe oligonucleotide and a second probe oligonucleotide, wherein the first probe oligonucleotide and the second probe oligonucleotide each comprise a sequence that is substantially complementary to adjacent sequences of the analyte; wherein the first probe oligonucleotide and the second probe oligonucleotide are capable of forming an invasive cleavage structure in the presence of the genetic variant; and wherein: (i) the first probe oligonucleotide further comprises at least one nucleotide that is complementary to a wild-type sequence of the genetic variant; and (ii) the second probe oligonucleotide further comprises: a sequence of non-complementary nucleotides, wherein the sequence of non-complementary nucleotides is a 5' Flap; a nucleotide complementary to the genetic variant; and a capture probe binding domain; (b) hybridizing the first probe oligonucleotide and the second probe oligonucleotide to the analyte; (c) cleaving the 5' Flap of the second probe oligonucleotide when the genetic variant is present, wherein the cleaving step comprises providing an endonuclease, wherein the endonuclease cleaves the 5' Flap of the second probe oligonucleotide; (d) ligating the first probe oligonucleotide and the second probe oligonucleotide, thereby creating a ligated probe; (e) releasing the ligated probe from the analyte; (f) contacting the ligated probe with a substrate comprising a plurality of capture probes, wherein a capture probe of the plurality comprises a spatial barcode and the capture domain; (g) hybridizing the ligated probe to the capture domain; and (h) determining (i) all or a part of the sequence of the ligated probe specifically hybridized to the capture domain, or a complement thereof, and (ii) the sequence of the spatial barcode, or a complement thereof, and using the determined sequence of (i) and (ii) to identify the spatial location of the analyte in the biological sample. (a) contacting the biological sample with a first probe oligonucleotide and a second probe oligonucleotide, wherein the first probe oligonucleotide and the second probe oligonucleotide each comprise a sequence that is substantially complementary to adjacent sequences of the analyte; wherein the first probe oligonucleotide and the second probe oligonucleotide are capable of forming an invasive cleavage structure in the presence of the genetic variant; and wherein: (i) the first probe oligonucleotide further comprises at least one nucleotide that is complementary to a wild-type sequence of the genetic variant; and (ii) the second probe oligonucleotide further comprises: a sequence of non-complementary nucleotides, wherein the sequence of non-complementary nucleotides is a 5' Flap; a nucleotide complementary to the genetic variant; and a capture probe binding domain; (i) the first probe oligonucleotide further comprises at least one nucleotide that is complementary to a wild-type sequence of the genetic variant; and (ii) the second probe oligonucleotide further comprises: a sequence of non-complementary nucleotides, wherein the sequence of non-complementary nucleotides is a 5' Flap; a nucleotide complementary to the genetic variant; and a capture probe binding domain; a sequence of non-complementary nucleotides, wherein the sequence of non-complementary nucleotides is a 5' Flap; a nucleotide complementary to the genetic variant; and a capture probe binding domain; (b) hybridizing the first probe oligonucleotide and the second probe oligonucleotide to the analyte; (c) cleaving the 5' Flap of the second probe oligonucleotide when the genetic variant is present, wherein the cleaving step comprises providing an endonuclease, wherein the endonuclease cleaves the 5' Flap of the second probe oligonucleotide; (d) ligating the first probe oligonucleotide and the second probe oligonucleotide, thereby creating a ligated probe; (e) releasing the ligated probe from the analyte; (f) contacting the ligated probe with a substrate comprising a plurality of capture probes, wherein a capture probe of the plurality comprises a spatial barcode and the capture domain; (g) hybridizing the ligated probe to the capture domain; and (h) determining (i) all or a part of the sequence of the ligated probe specifically hybridized to the capture domain, or a complement thereof, and (ii) the sequence of the spatial barcode, or a complement thereof, and using the determined sequence of (i) and (ii) to identify the spatial location of the analyte in the biological sample.