biocore / metagenomics_pooling_notebook

Jupyter notebooks to assist with sample processing
MIT License
8 stars 16 forks source link

Catch spaces in project name/abbreviation #240

Open cbrenchy opened 1 month ago

cbrenchy commented 1 month ago

The wet lab ran into an issue when a project name contained a space it broke the notebook. To prevent this in the future, the notebook should produce a warning to state something like "The project name should not contain any spaces before moving forward".

AmandaBirmingham commented 1 month ago

I think we're going to need more info than "broke the notebook" here :). Are we talking about the situation in which the wet lab chose a two-word project abbreviation and entered it into the notebook separated by an underscore? If not, can you provide details?

cbrenchy commented 1 month ago

Screenshot 2024-09-19 at 12 09 54 PM

cbrenchy commented 1 month ago

The SPP threw this error because of the space between Wellcome Leap. The project name is added by the technician in the compression form section of the notebook. The project name is then used to generate the BLANK names. An underscore between Welcome and Leap would have solved this.

AmandaBirmingham commented 1 month ago

Thanks, the error trace is useful. That item with the space in it ("Wellcome Leap") that is incorporated into the blank sample name is the project abbreviation, not the project name (see below).

Unfortunately, putting an underscore in it would NOT have solved the problem; this was apparently also tried (maybe after this? :) and failed because the exact provided project abbreviation is what is incorporated into the sample names ...and underscores aren’t allowed in sample names.

I have spoken with Maddy and asked the wet lab to just smush multiple words together in project abbreviations in the future ("MyProject" instead of "My Project" or "My_Project"). However, I agree that the notebook should have some input validation to enforce this.

https://github.com/biocore/metagenomics_pooling_notebook/blob/ff2260e2db8584f654c199a8a8b993f8dfb74dae/metapool/metapool.py#L1893-L1906

cbrenchy commented 1 month ago

Ah, ok thank you for pointing that out!