ChristofferFlensburg / superFreq

Analysis pipeline for cancer sequencing data
MIT License
110 stars 33 forks source link

Error during running the recent version #94

Closed sohyoung27 closed 2 months ago

sohyoung27 commented 2 years ago

Hi, The input data ran using the previous version without any problem (about two years ago). But when I recently reinstall superFreq and ran the program using the same input data, now the program terminated with an error message:

Here is the copy of the screen right before error: .... 13950K .......... .......... .......... .......... .......... 99% 112M 0s 14000K .......... .......... .......... ... 100% 131M=1.2s

2022-07-27 09:57:39 (11.7 MB/s) - ‘.../RData/XXXX/hg38exons.named.dn.bed’ saved [14370580/14370580]

Error in if (class(distance) != "matrix") distance = matrix(distance, : the condition has length > 1 Calls: superFreq -> superFreq -> analyse -> getStories -> mergeStories Execution halted

I tried to update all the dependent libraries and retried running the program, but it gives still the same problem.

If I invoke the old version superFreq, it runs without the above problem, but the old version fails when it accesses GitHub with the following message: ERROR: cannot verify gitlab.wehi.edu.au's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’: Issued certificate has expired.

Thank you, Sohyoung.

ChristofferFlensburg commented 2 years ago

Hi Sohyoung,

I am not sure what caused that error. I'd need the log file to understand better. Alternatively, as this seems to be a difference between version, I am in the process of testing next version of superFreq that I only have locally at this point. It should go live next week, and with some luck the error will go away again with that version...

cheers, Christoffer

WenjiaC commented 2 years ago

Hi,

I am currently using version 1.4.4 on a cohort and also ran into the same error. This error came up after finding rare germline variants. Is there a work around for this issue?

Extracting stories, comparing SNP shift directions..1 overlapping stories filtered..Error in if (class(distance) != "matrix") distance = matrix(distance, : the condition has length > 1 Calls: superFreq -> superFreq -> analyse -> getStories -> mergeStories

Thank you, Wen

mattpito commented 1 year ago

Hello there,

@ChristofferFlensburg, Thank you for the amazing work. I am following up on the same issue that WenjiaC deals with. Are there any solutions or do we have to run an older version and if so where could one find it?

Thanks for all efforts, Manthos

mattpito commented 1 year ago

Made a pull request the skips or solves the error. Unsure about the final output needs to be checked with the test data.

jlac commented 1 year ago

Hi @ChristofferFlensburg,

Has there been any progress here? This error is causing consistent issues.

Thank you!

Justin

jlac commented 1 year ago

Hi @ChristofferFlensburg,

Has there been any progress here? This error is causing consistent issues.

Thank you!

Justin

mattpito commented 1 year ago

@jlac I do not know if the problem is fixed however I did a change in the source code and was able to bypass this error. The way I worked was to fork the project to my github, do the change there and then install the package via remotes::install_github("YourRepo/superFreq") in R. This will install your "edited version". You can open the pull request in this repo to see the change and do the same. Let me know if I can help more. I am unsure if this solves the problem or if it skews the results in some way .

ChristofferFlensburg commented 1 year ago

Hi all.

I am not sure, but I think I may have finally fixed this. I know it's been ages, but that is unfortunately the nature of open source maintenance by a developer in academia. :/

I think what happened was that class() can return multiple classes, in a character vector. Which makes the if ( ) test a logical vector. That isn't great ofc, R needs a single TRUE/FALSE to know if it should carry on or not, but R throws a warning, uses the first value in the vector and then continues running which has worked well enough for superFreq.

Somewhere between R 4.1.2 and 4.2.1, they changed this behaviour, and if ( c(TRUE, FALSE) ) throws an error, not a warning. So I assume all you getting errors were just running on a newer version of R, where this happens.

I've fixed this by replacing all the class(something) == 'some_class' throughout superfreq with (i hope) more appropriate inherits(something, 'some_class') that should consistently return a single TRUE or FALSE and fix this error. I hope. I just pushed it live, if it's still relevant for anyone in this thread, try reinstalling and feel free to let me know if it fixed it.

Good luck.

maheshworpaudel5001 commented 1 year ago

Has this error been fixed in newer version? I am using version 1.3.2 in Rv4.2.2 environment and stumbled upon the same error.

ChristofferFlensburg commented 1 year ago

I believe this should be fixed in the latest version of superFreq yes, although it would be nice to hear confirmation. There might be a conflict with the latest version of MutationalPatterns though, still investigating, so maybe hold of upgrading dependencies for now, only upgrade superFreq.

ChristofferFlensburg commented 1 year ago

I fixed the conflict with R 4.2.3 dependencies. SuperFreq 1.4.5 should work with current version of R (4.2.3) and matching dependencies.