gexijin / idepGolem

16 stars 11 forks source link

Enhanced Number Parsing & Handling of NA Values #574

Closed EricTulowetzke closed 11 months ago

EricTulowetzke commented 11 months ago

Description:

Improved the ability to read strings like "1,120" as numbers. This enhancement has been applied to both CSV and tab formats to maintain consistency across workflows.

Resolved the issue reported in #569

Handling of NA Values:

Proposed Approach: If a cell contains an NA value, we should consider removing the corresponding gene (row). The user will be informed that a cell had an NA value, leading to the removal of the associated row.

To provide transparency, I've integrated a table that displays rows removed due to values that couldn't be interpreted as numbers (resulting in NA). This feature will be especially useful in cases where the input file might contain unexpected content, such as a stray word.

Addressed an edge case where the 'remove data' dataframe might have 0 rows. Implemented a check to handle this scenario gracefully.

Introduced a user-friendly message to indicate when no rows are removed.

Documentation:

Updated documentation to reflect these changes.

Testing:

Verified the changes using demo data and the dataset from issue #569.

Written by ChatGPT cause work smarter not harder.

EricTulowetzke commented 11 months ago

I have added a fix to #572 and tested the file.

EricTulowetzke commented 11 months ago

@gexijin

File Size Limit Enhancement

To enhance user experience and ensure optimal performance, we've introduced a file size limit of 5 MB. If a user attempts to upload a file exceeding this limit, they will be unable to proceed.

This enhancement addresses Issue #480. We've also incorporated a user-friendly message to guide users in case they encounter the size limit.

For those interested in the technical details:

We attempt to read the file size limit from an environment variable named IDEP_FILE_SIZE_LIMIT. If this environment variable is not set or contains an invalid value, the system defaults to a file size limit of 5 MB. Feedback is welcome! If you believe there's a need to adjust the wording or the default size limit, please let us know.

Once get feedback will update the readme and do the testing

Here is the wording for the message:

"File size exceeds the limit of", FILE_SIZE_LIMIT_MB, "MB. Please upload a smaller file. Look on GitHub how to run locally and change file size limit."

gexijin commented 11 months ago

Hi Eric, Thank for helping out. It seems to work if I upload an expression file. But when I click on Load Demo, it give me errors: Warning: Error in if: argument is of length zero 71: input_data [C:/work/idepGolem/R/fct_01_load_data.R#156] 70: [C:/work/idepGolem/R/mod_01_load_data.R#617] 54: loaded_data 47: observe [C:/work/idepGolem/R/mod_01_load_data.R#553] 46: 3: runApp 2: print.shiny.appobj 1:

EricTulowetzke commented 11 months ago

@gexijin I added a check for when expression_file is null, I thought this was ready being done earlier in the function. I have added a commit to this PR and tested load demo