kstierhoff / estimATM

A tool for planning, execution, analysis, and reporting of CPS biomass from surveys using the acoustic-trawl method (ATM)
Other
2 stars 0 forks source link

add duplicated DNA to checkTrawls #94

Closed bdschwartzkopf closed 1 month ago

bdschwartzkopf commented 10 months ago

It would be good to add in a check to see if there are duplicated DNA tray and vial combinations. Here is basic code I used to check this.

dna.only <- specimens %>% mutate(unqdna=paste(specimens$DNAtrayNumber,specimens$DNAvialNumber)) %>% filter(!is.na(DNAtrayNumber))

t <- as.data.frame(table(dna.only$unqdna)) tt <- subset(t, Freq==2)

dupid <- tt$Var1

dd <- dna.only[dna.only$unqdna %in% dupid,]

kstierhoff commented 8 months ago

This has been implemented as of 2307RL.

image

bdschwartzkopf commented 1 month ago

I just realized this wasn't the exact implement. This is a great addition, but the code I had used combines the DNA tray and vial number into a unique ID, and then looks for duplicates. This would be similar to what the check duplicated barcode ID's would look like.

kstierhoff commented 1 month ago

Implemented the duplicate tray code and tested with the database.