cafferychen777 / ggpicrust2

Make Picrust2 Output Analysis and Visualization Easier
https://cafferychen777.github.io/ggpicrust2/
MIT License
102 stars 11 forks source link

A bug in the function pathway_errorbar() #9

Closed lixiaopi1985 closed 1 year ago

lixiaopi1985 commented 1 year ago

Hi,

Thank you for developing this package.

As I ran through the workflow, I got an error with the funciton pathway_errorbar() Error in daa_results_df$pathway_name$description : $ operator is invalid for atomic vectors

The problem comes from this line of code in the function:

      if (is.null(daa_results_df$pathway_name)&is.null(daa_results_df$pathway_name$description)){
        message("Please use pathway_annotation to annotate the daa_results_df")
      }

precisely: is.null(daa_results_df$pathway_name$description)

The output of daa_results_df has a description column but not under pathway_name.

This will work if I change it to is.null(daa_results_df$description).

Hope you can fix this.

Thanks,

cafferychen777 commented 1 year ago

Hello,

Thank you for bringing this to my attention and I apologize for any inconvenience it may have caused. I appreciate your feedback and I will make the necessary changes to the pathway_errorbar() function to resolve this issue.

You are correct, the line of code in question should be changed to "is.null(daa_results_df$description)" to check for the presence of the description column. Thank you for pointing that out.

If you have any further questions or concerns, please don't hesitate to let me know.

Best regards, Chen YANG

Xiaoping Li @.***>于2023年4月5日 周三00:03写道:

Hi,

Thank you for developing this package.

As I ran through the workflow, I got an error with the funciton pathway_errorbar()

Error in daa_results_df$pathway_name$description : $ operator is invalid for atomic vectors

The problem comes from this line of code in the function:

  if (is.null(daa_results_df$pathway_name)&is.null(daa_results_df$pathway_name$description)){
    message("Please use pathway_annotation to annotate the daa_results_df")
  }

precisely: is.null(daa_results_df$pathway_name$description)

The output of daa_results_df has a description column but not under pathway_name.

This will work if I change it to is.null(daa_results_df$description).

Hope you can fix this.

Thanks,

— Reply to this email directly, view it on GitHub https://github.com/cafferychen777/ggpicrust2/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZEQTSN4JEBGGY7ZUEU6NDW7RA6BANCNFSM6AAAAAAWS5MPDM . You are receiving this because you are subscribed to this thread.Message ID: @.***>