Skip to content
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

New function to convert isoscapes from sources to tissues #191

Open
courtiol opened this issue Sep 12, 2024 · 0 comments
Open

New function to convert isoscapes from sources to tissues #191

courtiol opened this issue Sep 12, 2024 · 0 comments
Assignees
Labels

Comments

@courtiol
Copy link
Owner

courtiol commented Sep 12, 2024

For assignments, IsoriX converts the isotopic signature of the samples to assign (e.g. animal tissue) into the isotopic signature of the sources (e.g. precipitation), and not the other way around.

Yet, it can still be useful for people to convert the precipitation isoscapes into animal tissue isoscapes for the study of these isoscapes.

We would need for that a function that rescales a produced set of precipitation isoscapes; perhaps called:
rescalescape(), scalescape(), transcape(), isotranscape(), isoshift(), isoscale(), isorescale(), isorescalescape() ... ? (winner seems to be isotranscape())

Input should be: isoscape and calibfit.

Internally, we should call .invert_reg to invert the calibration fit and rescale the mean isoscape value using the obtained intercept and slope.

It is not immediately clear how to rescale the prediction variance and the residual variance since the rescaled isoscapes should ideally be influenced by the variances of the calibration fit and thus depend on which calibration method has been used.

Perhaps as a first step, we should only output the mean isoscape which is anyhow the one that users request.

The class of the output should be c("ISOSCAPE", "ISORESCALED", "list").
We should make sure that the object of class ISORESCALED cannot be used for assignment.
We should also detect this class and adapt things (title and isoscape not possible to draw) based on that class element.

@courtiol courtiol added the api label Sep 12, 2024
@courtiol courtiol added this to the more_flexible_isoscapes milestone Sep 12, 2024
@courtiol courtiol self-assigned this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant