biocore / metagenomics_pooling_notebook

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

amplicon pre-preparation file generator notebook: generate warning if invalid characters found in sample_name #119

Closed mmbryant23 closed 11 months ago

mmbryant23 commented 1 year ago

Currently when a sample_name containing a character that is not acceptable in Qiita goes through the amplicon notebook, there is no warning produced and the user can go on to making a pre-preparation file that includes invalid characters. It would be beneficial to add a warning that does not allow the user to move forward unless all sample_name characters are confirmed valid.

For example, if someone names a BLANK sample BLANK.L'OREAL.2.4E, no warning or error will appear (but ' is not an acceptable character in a sample_name).

Thanks!

mmbryant23 commented 1 year ago

Not sure if this counts as an invalid character, but it would also be beneficial if the notebook yields an error if there are spaces in the beginning or end of a sample_name (ie 'LAMI.RD317.D23.C1 ')

charles-cowart commented 11 months ago

Not sure if this counts as an invalid character, but it would also be beneficial if the notebook yields an error if there are spaces in the beginning or end of a sample_name (ie 'LAMI.RD317.D23.C1 ')

@mmbryant23 would it be preferable to automatically remove any whitespaces at the beginning or ending of a sample-name? That might be more user-friendly.

mmbryant23 commented 11 months ago

I think it would be great if it could be removed automatically but yield a note saying something along the lines of “sample ‘x ‘ contained spaces before or after the sample name. The space(s) was/were removed. OK to proceed.” Would that be possible? That way things are performed automatically, increasing user friendliness, while also letting the user know the spaces were there. Let me know what you think, and thanks for working on this!

On Monday, July 31, 2023, Charles Cowart @.***> wrote:

Not sure if this counts as an invalid character, but it would also be beneficial if the notebook yields an error if there are spaces in the beginning or end of a sample_name (ie 'LAMI.RD317.D23.C1 ')

@mmbryant23 https://github.com/mmbryant23 would it be preferable to automatically remove any whitespaces at the beginning or ending of a sample-name? That might be more user-friendly.

— Reply to this email directly, view it on GitHub https://github.com/biocore/metagenomics_pooling_notebook/issues/119#issuecomment-1659000353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVY3ITRX5XSI5RGETV4IOFTXTAA4JANCNFSM6AAAAAAXPU4YO4 . You are receiving this because you were mentioned.Message ID: @.***>

charles-cowart commented 11 months ago

Agreed! Adding now. Thanks!

charles-cowart commented 11 months ago

Tentative solution found in https://github.com/biocore/metagenomics_pooling_notebook/pull/136.