New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent flow - proper support #131
Comments
I wonder if you could also segment the data using just a threshold. The data I'm working with has the probe taken out at various times, at which point the concentration measurement drops noticeably. If the user could just say "when the concentration drops below 10 umol/L, the probe isn't in anymore", it would be quite intuitive to work with. Of course this would only work for a certain subset of experiments, but it could be an option. |
Thanks for the suggestion. Ok, that is one option to keep in mind. Have only the starting ideas of how it will work, but basically there will be lots of ways the user can specify the structure, as well as automatic detection. |
Another older suggestion. Here so we don't forget |
Also I had a look into some regression changepoint tools like |
Thanks for the suggestion - i'll definitely check out that package. Honestly, to build in support for data like this - unlikely. The vast majority of intermittent-flow respirometry data is very regular, both in period and oxygen range. We are concentrating on ease of use for typical use cases. Anything as idiosyncratic and unique as this is best left to individuals to wrangle themselves. I am envisioning an input of replicate locations as row numbers and/or time values, so one you have them, however you choose to get them, you should be able to enter them and the function will loop through the data. For actual automatic or assisted location detection though, we will be concentrating on regular structures. It's early days though, so we'll see. |
Added in v2.1 |
Nice! How did you implement it? |
Quite simple when you look at it but very complicated to implement. Sorry, no automatic rep detection. Maybe in the future. https://januarharianto.github.io/respR/articles/calc_rate.int.html |
Ok, time to start thinking about supporting this properly. Big intermittent flow experiments, and looping
inspect
,calc_rate
, etc. through a big dataset at regular (or irregular) intervals.Maybe not for 2.0, but let's aim for 2.1.
How i see it working:
Specialised loop fns for
calc_rate
,auto_rate
etc. withstarts
andends
andby
inputs. These will be vectors of start and end locations of replicates inby = "time"
or"row"
. For very regular experiments, no real need for these, just need ainterval
or something input to indicate the regularity or length of each rep. Although it would need astart
point...?Also add
buffer
inputs to exclude period of time at starts/ends of each rep to excludeUser can create the rep locations themselves using usual R syntax, or we build in some sort of identification of reps. My
peaks
function would be ideal for this. Make it into arep_id
function, output location vectors go into the loop functions.Have some error catching so that an error doesn't stop the whole loop. This is a pain when running
auto_rate
across huge numbers of reps, and i have had quite a few people getting in touch with this specific problem.Output will be some sort of summary list. Probably no need to save every object, just extract the rate(s), locations, coefficients etc. Basically each loop is a row of the summary table.
Although, what if you want to plot a particular one? Maybe make saving every object an option, or just have a simple output.
Add in
subset_rate
for subsetting this object, or some sort of other summary function.The text was updated successfully, but these errors were encountered: