I'm a newbie to the world of coding/programming. Loving the challenge so far but I've hit a bit of a roadblock.
I'm attempting to automate genotyping preparation for my job as a lab technician.
Unnecessary background:
I take care of a colony of 500-600 mice with 40-50 given genotype constructs at any given time. Whenever I get new litters (depending on the genotype of the parents) I have to extract DNA and confirm the genotype of the offspring. The task and the challenge of trouble-shooting the process were fun at first but it's getting very mundane and repetitive now. So I've started using R to automate certain parts of my job.
TL/DR: My job is getting repetitive, I want R to help out with that.
So, in essence, I have an archive of mice as follows. I grouped them by the temperature requirements for the genotyping process and by the number of times I need to genotype the DNA samples.
Mouse ID Genotype Gender Age Litter_ID PCR_Temp Rxns
ZDP658 zDC.Cre F 4.9 B23844-1 Z 1
ZDP659 zDC.Cre F 4.9 B23844-1 Z 1
ZDP631 Villin.Cre F 4.9 B23745-2 Y 1
ZDP575 K14.CreER M 5.3 B23744-2 Z 1
ZDO931 K14.CreER M 8.6 B23744-1 Z 1
ZDO932 K14.CreER M 8.6 B23744-1 Z 1
ZDO933 K14.CreER M 8.6 B23744-1 Z 1
ZDQ31 Rosa.TSLP M 3.4 B23701-2 Z 2
ZDQ32 Rosa.TSLP M 3.4 B23701-2 Z 2
My goal is to receive an output of the individual Mouse_ID's in an 8x6 grid grouped by their "PCR_Temps" and multiplied by their "Rxns" in a zigzag order if possible with two extra spaces per genotype group.
My vision of the output is as follows. I would want to input the Litter_ID of the litters that need genotyping and receive the following.
The honeycomb structure is not necessary. A simple rectangular grid works perfectly fine. The same goes for the zigzag format. Both of those aspects of the output format would be nice but aren't a requirement.
Every group of genotypes would need one space for positive control samples and one space for Wild type/Neg control samples. The genotypes that have a value of "2" or more would be repeated as many times as their "Rxns" value states.
I'm sorry if this question is too dense to follow or code for. I have so far been working with dplyr and ggplot to manipulate and visualize my mouse archives but this particular problem has me at a loss.
If anyone could even point me in the direction of a package that could get me started I would really appreciate it.
So far I have tried some combinations of dplyr and purrr with no success. I have thought of ways to use for loops but have come up empty.
Thank you in advance for any advice.

