biocore / LabControl

lab manager for plate maps and sequence flows
BSD 3-Clause "New" or "Revised" License
2 stars 15 forks source link

Sample plating must take in user-specified tube ids not sample_id #273

Closed AmandaBirmingham closed 6 years ago

AmandaBirmingham commented 6 years ago

Edited to reflect updated understanding of issue:

Labman expects the wet lab to put values from qiita.study_sample.sample_id into the platemap, but that the wet lab does not actually have those identifiers. Instead, they have tube identifiers which (usually but not always) are found in the anonymized_name column of the sample metadata.

NB: We need to determine which of the labman outputs need to contain tube ids and which need to contain sample_id before attempting to fix this issue.

antgonza commented 6 years ago

Perhaps the issue here is that the qiita user creates a study, adds their sample names, then we assign tube ids, which then are not sample_ids. However, these are the main ids for the web lab.

cc-ing @ackermag

ackermag commented 6 years ago

that is part of the problem. We also need to record both - the sample_name the user wants to use abd the tube_id for when we need to track down a sample e.g. when there is a possibility of mislabelling or to confirm actual sample id

On Sat, Jul 28, 2018 at 5:34 AM, Antonio Gonzalez notifications@github.com wrote:

Perhaps the issue here is that the qiita user creates a study, adds their sample names, then we assign tube ids, which then are not sample_ids. However, these are the main ids for the web lab.

cc-ing @ackermag https://github.com/ackermag

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jdereus/labman/issues/273#issuecomment-408605128, or mute the thread https://github.com/notifications/unsubscribe-auth/AB69gDf8RdgWFV8mi0Xw-cZ-w8_DgADyks5uLFpFgaJpZM4Vkxt0 .

-- Gail Ackermann Knight Lab UCSD glackermann@ucsd.edu ackermag@ucsd.edu

ElDeveloper commented 6 years ago

@AmandaBirmingham I'll start having a look at this issue. I think we can probably just make it such that the plate mapping UI does the look-ups and validations based on the anonymized_name. Internally, it would map the anonymized_name to the qiita.study_sample.sample_id. Then all output files preserve the qiita.study_sample.sample_id since that's the primary identifier for all samples.

I think we can probably get away with changing only the "presentation" but not the underlying "model". Any thoughts on this?

AmandaBirmingham commented 6 years ago

@ElDeveloper Sadly, this issue turns out to be more complicated than just using anonymized name (for example, anonymized name only exists for some studies, like human ones, but not all studies). I apologize that I had not had time to get all the relevant info into the issue here on GitHub :(

After a lengthy discussion with Austin and Gail, below is what we pitched to Greg, which he signed off on. I suggest that we meet in person to hash out the fiddly details (like where we store the name of the tube identifier column and whether it is per study or per study x plate, etc).

image001

  1. When a wet lab person is ready to start plating samples on the Plate Samples page in Labman, she first “adds” the Qiita study to which they belong (green “Add study” button)

  2. Labman then displays to her a drop-down list of the metadata fields for that study that contain unique identifiers for every sample in the study (drop down next to “Select tube identifier”)

    • For example, if Study X includes metadata fields for tube_id, treatment, old_sample_id, and subject_id, but only tube_id and old_sample_id are unique across all samples for Study X in Qiita, then the drop-down will contain only tube_id and old_sample_id
  3. She selects for the study the unique-across-samples metadata field that is actually used as the tube identifier (e.g., “subject-unique” for the core microbiome study in the screenshot)

    • Labman still won’t provide a way to VIEW the metadata for the study—that seems like it’s squarely a Qiita feature—so if she doesn’t KNOW which of the metadata fields is the one containing the tube identifier, she’ll have to find that out first by another means.
  4. She can do steps 1-3 for as many studies as she plans to plate on this plate (for example, done again as shown for the soil communities study)

  5. When she is ready to paste in samples, she first selects the study to which they belong (as indicated by blue highlight around the chosen study in screenshot)

    • This allows Labman to know which metadata field to use to deconvolve the tube identifiers she enters back into the underlying database sample_ids.
  6. If she wants to come back later and view the plate map for an existing sample plate, that plate map will be displayed using the same tube identifiers that she input originally

AmandaBirmingham commented 6 years ago

@ElDeveloper Also please note from above: "We need to determine which of the labman outputs need to contain anonymized_name and which need to contain sample_id before attempting to fix this issue" ; this may be another point you and I should discuss :)