isoverse / isoorbi Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://www.isoverse.org/isoorbi
License: Other
Home Page: https://www.isoverse.org/isoorbi
License: Other
currently it exports only 3 decimals (0.001) but some scans seem to record data on higher frequency. this leads to time stamps between consecutive scans that appear identical but are likely not
analyze_shotnoise (data, compound, num, denom, ratio_method)
orbi_filter_flagged_data()
and other new functionsorbi_calculate_ratio()
to orbi_calculate_summarized_ratio()
calculate_ratios
function that doesn't do any grouping, just calculates ratios (and can be used standalone)without grouping - that way easy single ratio calculations are possible (make calculate_ratio() internal only) -> the summarize_results calls this but with grouping functions prependedorbi_read_isox()
orbi_flag_satellite_peaks()
, orbi_flag_weak_isotopocules()
and orbi_flag_outliers(intensity_window = c(2, 98))
as well as a orbi_remove_flagged_data()
function> orbi_read_isox("paper/data/tfa/TFA_M0_1uscan_120kRes.isox") |> orbi_define_basepeak("M0")
orbi_read_isox() is loading .isox data from 1 files:
- paper/data/tfa/TFA_M0_1uscan_120kRes.isox
orbi_define_basepeak() is setting the M0 isotopocule as the ratio denominator...
Error in `dplyr::mutate()` at isoorbi/R/utility_functions.R:440:2:
ℹ In argument: `basepeak_ions = .data$ions.incremental[.data$isotopocule == "M0"]`.
ℹ In group 3: `filename = TFA_M0_1uscan_120kRes`, `compound = TFA`, `scan.no = 3`.
Caused by error:
! `basepeak_ions` must be size 4 or 1, not 2.
This is because there are not the same number of basepeak ions for all peaks.
running it with satellite peak removal first works:
> orbi_read_isox("paper/data/tfa/TFA_M0_1uscan_120kRes.isox") |> orbi_filter_satellite_peaks() |> orbi_define_basepeak("M0")
orbi_read_isox() is loading .isox data from 1 files:
- paper/data/tfa/TFA_M0_1uscan_120kRes.isox
orbi_filter_satellite_peaks() is removing minor signals (e.g., satellite peaks) that were reported by IsoX...
orbi_define_basepeak() is setting the M0 isotopocule as the ratio denominator...
currently this is tricky because segmenting requires blocks definition first and ratio calculations require more than 1 values please chime in @brettdavidheiser how you would ideally like to have this implemented
orbi_segment(n = INTEGER; by = c("scan", "time")) => add column "segment"
adjust other functions to use "segments" as a grouping variable
should this function be exported by isoorbi or should forcats
instead be a suggested package in the DESCRIPTION (so we can use forcats::in_order()
in vignettes? I'm leaning towards the latter but implemented the prior for now. What do you all think?
First release:
usethis::use_cran_comments()
Title:
and Description:
@return
and @examples
Authors@R:
includes a copyright holder (role 'cph')Prepare for release:
git pull
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
git push
Submit to CRAN:
usethis::use_version('major')
devtools::submit_cran()
Wait for CRAN...
git push
usethis::use_github_release()
usethis::use_dev_version()
usethis::use_news_md()
git push
It would be nice if you could pass more columns through the summarize function. For example I parsed the file name into additional columns and would like the parts to be within the summarized results. Another example is the mean of of the tic
or mean of the ions.incremental
if you want to make a plot showing the concentration vs ratio.
The work around right now is to summaries the results separately and then do a join call.
Should this be renamed to orbi_calculate_ratio()
as it does calculate a single value ratio?
If you have lot of isotopocules the shot noise plots get very busy, especially when facet_wrap. It might be nice to have a built in filter like as in the fuction call orbi_plot_raw_data(isotopocules = c("13C"), y= ratio)
. Of course it can be done with a filter call before hand.
flageddata_w_ratios |> orbi_analyze_shot_noise() |> dplyr::filter(isotopocule %in% c("13C", "18O")) |> orbi_plot_shot_noise()
If you set set_end_time.min to 0 or negative you get a dplyr::filter() error. Need to add check.
we discussed that the following parameters would be useful for defining the data block in flow injenctions (in addition to the time window definitions) by basically providing a way to more automatically detect peak maxima:
intensity_setpoint = 95
intensity_cutoff = 10
--> this basically selects the peak by taking only everything above 10% of the 95% percentile of the data inside the time window
please correct me if that's wrong @NilsKuhlbusch
note that this is planned for v1.4 at the earliest
so user can get a sense what happened - e.g. x% records filtered, etc.
could also be included in the simplify function
Prepare for release:
git pull
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('minor')
- careful: this changes the version automatically one minor level up!devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version(push = TRUE)
currently only works for time.min x axes
use try_catch_all
Replace extdata/testfile_DualInlet.isox
with a smaller version (e.g. 10 microscans) to meet CRAN file size limits (package total max 5MB)
several of the utility functions do default groupings that might be good to include as a paramter
some functions could probably be optimized a bit for speed - for example, orbi_define_basepeak()
could potentially be implemented with a grouped mutate instead of a full join for speed increases
for example something modelled after https://github.com/isoverse/isoprocessor/blob/812646ebab0faff38c30ace78be82a16704aed66/R/calculations.R#L221 except it can be for all ratios at once given the base peak structure
aim for v. 1.4? ideally for flow injections AND dual inlet samples
important decisions to make:
note issue #46 is also relevant for this as more automated sequence information is very useful to include
Can we allow calculating and plotting multiple ratios in shot noise analysis?
Once all new features are implemented and issues are addressed, prepare for release:
git pull
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('minor')
- careful: this changes the version automatically one minor level up!devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version(push = TRUE)
Prepare for release:
git pull
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('minor')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version(push = TRUE)
potentially with time elapsed info
either have an orbi_add_sequence_file_information function or incorporate it somewhere during the orbi_read_isox already
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.