sritchie73 / ukbnmr

Tools for processing Nightingale NMR biomarker data in UK Biobank
Other
26 stars 1 forks source link

´Inf´ input to sequence error #8

Open denvdm opened 9 months ago

denvdm commented 9 months ago

Hi, I´m getting the below error after about 5 minutes of running the remove_technical_variation() function. I´ve followed the steps as outlined in the readme to the letter; it doesnt happen with the toy data, but only with the full UKB dataset. This data has however been decoded using the standard steps, nothing custom. Any idea what step/input this involves, and maybe how to resolve this? Thanks. Best, Dennis

Error in seq.int(rx[1L], rx[2L], length.out = nb) : 'from' must be a finite number In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf

sritchie73 commented 9 months ago

Hi @denvdm ,

Sorry to hear you're getting an error.

It's not obvious to me where that error would be arising, so I will need some help tracking down the culprit. I've created a new branch for debugging this issue, in which I've injected progress messages into the remove_technical_variation() function.

Can you re-install the ukbnmr package using remotes::install_github("sritchie73/ukbnmr", ref = "issue8"), then rerun the remove_technical_variation() function on your data, and let me know the last progress message printed before you get the error?

This will help me track down where in the process the error is arising.

denvdm commented 9 months ago

Hi, thank you so much, very helpful. The progress messages are handy and nice, perhaps even consider making this part of the main branch? In any case, we have the classic embarrassing situation where the error disappears right after I cry for help. Terribly sorry about that. When I first ran this branch, I got up to 'Processing sample processing fields for QC procedure...' when the error appeared. However, I then decided to re-create the input dataframe (with same code, just out of desperation), and now it does run all the way! I assume the earlier dataframe had some sort of issue that wrote an incomplete file, causing missingness that in turn caused the 'Inf' error. Still not sure how or where though, as I did check whether all columns contained at least some non-missing data. So, all good now and again apologies for wasting your time. Best, Dennis

sritchie73 commented 9 months ago

Hi Dennis,

Great to hear it ended up working for you! It's always challenging to diagnose bugs that come from changes to input data :)

Best wishes,