I'm sorry for posting this again. I've posting bits and pieces of my workflow, masked, here, for help, and I'm still struggling. I have difficulty checking responses as I have had bad experiences on StackOverflow being yelled at and such for no real reason. I'm sure the scars will heal with time. Anyway, I'm around and I will get to your responses eventually.
To get to the technical point:
I'm trying to copy the dates some samples were run (each sample should have been run on 3 separate occasions assuming everything went well during the lab portion of the project, which I was not around for) into three separate columns of a manifest file which keeps track of ongoing metadata for our project, from what I have gleaned, such that each column is one instance of data collection. There are multiple donors each with a donor ID, and some redundancy in the data like multiple collection channels on the instrument for the "same data point" (depends on how you look at it), though I think that should be it.
Here is my pseudocode I have been trying to work off of and it has been rough so far. I don't know why. I'm not a seasoned computer scientist, developer, or software engineer. Any help is appreciated.
DataTypes:
(associative array) DonorID{
(key) Month1: (value) date1 (empty at start)
(key) Month2: (value) date2 (empty at start)
(key) Month3: (value) date3 (empty at start)
}
find unique donor IDs in data
for each donor ID{
get (i.e. subset) data keyed on donor ID;
for Month in 1, 2, 3 (strings){
if no date in donorID associative array{
add date from data;
}else if date already{
is the date in the data table cell the same as in the associative array entry?
if yes, do nothing (indicates different target channel)
if no, ping user
Multiple run dates for same data point is a problem.
}
}
}
Copy from data to manifest:
loop over DonorID associative array:
for each donorID:
in Month 1, 2, or 3:
add date1 2 or 3 to "Actual Month [1, 2, or 3] Stability Test Date" in manifest
donorID is still row identifier
date (1, 2, or 3) is now column identifier