WindowOffset=0# Offset to start scoring guides. Some of the features will depend of the target sequence context upstream. Without the offset, NAs will be assigned for the respective feature
# it ran into an error if the taregt was < 100bp due to a combination of the position j and the window size w (specifically, if j < w and length < 2*w)
# Instead, i greatly simplified it by extracting first the single relevant row, and then the values relative to the matchpos
# The extracted values were exaclty the same for at least 1 tested sequence
# slice the nucleotide density matrix for each guide to obtain a window of +/- the window size (default 50nt) centered on guide match position 1
Log10_Unpaired<-GetUnpairedProbSimple(x=dat,MA=log10(UnpairedProbabilities.tranformed))# in use
# Log10_Unpaired <- GetUnpairedProb(x=dat , MA = log10(UnpairedProbabilities.tranformed), W=50, X=40 , Y=23) # using slice matrix and created errors for seqs < 100nt, got replaced by function above