TobiTekath / DTUrtle

Perform differential transcript usage (DTU) analysis of bulk or single-cell RNA-seq data. See documentation at:
https://tobitekath.github.io/DTUrtle
GNU General Public License v3.0
17 stars 3 forks source link

plot_proportion_barplot #16

Closed VeDe91 closed 7 months ago

VeDe91 commented 1 year ago

Hello, when running the plot_proportion_barplot function I keep getting the following error: Creating 166 plots: |==============================================================================| 100%

Error: BiocParallel errors 4 remote errors, element index: 1, 43, 85, 127 162 unevaluated and other errors first remote error: Error in xtfrm.data.frame(x): cannot xtfrm data frames

Any idea on how to solve it?

R version 4.3.1 (2023-06-16) DTUrtle_1.0.2

TobiTekath commented 1 year ago

Hi @VeDe91 , thank you for using DTUrlte an reaching out.

Hmm, your error message looks like a basic data.frame manipulation does not seem to work. Unfortunately, I am not able to diagnose this without any further information.

Can you try to supply BPPARAM = BiocParallel::SerialParam() to the plot_proportion_barplot() (to get the parallelization out of the way) and then debug through the call to find the line of code that throws the error?

You could debug for example like this:

  1. Run:

    trace(plot_proportion_barplot, edit=TRUE)
  2. Add a browser() to the first line of the function (but after the function definition) and save.

  3. Run your plot_proportion_barplot() call with BPPARAM = BiocParallel::SerialParam().

  4. Step though the code line-by-line, till the error is thrown.

  5. When done, call untrace(plot_proportion_barplot)

I hope this helps to identify the problem.

Best, Tobi

sshen82 commented 1 year ago

Hi, I met the same problem, and the problem is caused by this line: o <- order(group, -prop_samp[feature_levels[1], -1]) Here, "-prop_samp[feature_levels[1], -1]" is a data frame, so you need to use as.numeric() to make it into a vector. Then it will work.

Yours sincerely, Siqi Shen

GaryWang7 commented 1 year ago

Hi, thank you so much Tobi and Siqi!

To add a bit more details to Siqi's comment, in line 98, I made this change by adding as.numeric(): o <- order(group, as.numeric(-prop_samp[feature_levels[1], -1])) Then it worked for me.

R version 4.3.1 (2023-06-16) DTUrtle_1.0.2 Thanks again!

TobiTekath commented 7 months ago

Thank you very much, @sshen82 and @GaryWang7 - the issue is fixed in the just pushed version 1.0.3 of DTUrtle.