knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
twopointzerothree
is motivated by an expression of concern concerning a paper coauthored by Dr Pruitt following the discovery, amongst other issues, that
Seven consecutive values from Theridon agressiveness assay #1 differ exactly by + 2.03 from another exact sequence in aggressiveness assay #1 in a different treatment group
I wanted to know how this could be done. As far as I know, standard tools (n-grams) only detect duplicate sequences, not duplicate sequences with an offset.
twopointzerothree
develops a method for detecting duplicate offset sequences by searching for repeat sequences of perfectly correlated numbers.
These repeat sequences are either duplicates or offset duplicates.
twopointzerothree
can be installed with
remotes::install_github("Sorbus-torminalis/twopointzerothree.git")
twopointzerothree
requires a vector of numbers as input.
library(twopointzerothree) data("kp2014")# part of the data from Keiser & Pruitt 2014 sequence_find_all(vec = kp2014$`Theridion murarium Aggressiveness...4`)
The result give the position and values of the first and second sets of duplicated values and any offset.
If data in several columns need to be checked, they should be appended into one vector.
sequence_find_all( vec = c(kp2014$`Theridion murarium Aggressiveness...4`, kp2014$`Theridion murarium Aggressiveness...5`, kp2014$`Theridion murarium Aggressiveness...6`))
To see the duplicate sequences in situ, use sequence_show
.
sequence_show(kp2014, meta_cols = 1:3, test_cols = starts_with("Theridion"))
twopointzerothree
will report the all the duplicate sequences it can find.
twopointzerothree
will not report sequences of identical values as duplicates as cor(rep(1, 3), rep(2, 3))
returns NA.
If very short sequences (e.g. length 3) are searched for, there is a high risk of false positives. These can be identified by having offset values that are not consistent.
twopointzerothree
reports duplicate values.
It does not report why.
If you find this package useful or have ideas about how it could be improve, please leave a message in the issues tab.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.