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

switching file info inside a run to account for injection skips #167

Open
sebkopf opened this issue May 20, 2021 · 1 comment
Open

switching file info inside a run to account for injection skips #167

sebkopf opened this issue May 20, 2021 · 1 comment

Comments

@sebkopf
Copy link
Contributor

sebkopf commented May 20, 2021

This issue happens quite frequently. Ideally provide a suite of functions (with audit trail) that makes it easy to fix the metadata in case of injection skips or in case of user error entering the sequence details.

Proposed:

  • iso_swap_file_info to swap any 2 file_info sets with parameters select = c() to indicate which fields to swap and file_a and file_b as filter expressions that must identify exactly one file each (e.g. filter_a = Analysis == 5234)
  • iso_shift_file_info to shift along an entire range of analyses with parameters select = c() to indicate which fields to swap, range as a filter expression that must identify a list of files to shift the file info (e.g. range = Analysis < 5234), arrange = file_datetime to indicate the proper order of the files (default should work most of the time), shift as an integer to indicate how much to shift by (can be negative or positive, e.g. -1 to shift file info forward by one and +2 to shift file info backward by 2), as well as discard = T/F and loop = T/F to indicate whether the files that wouldn't be changed by a simple shift (e.g. the first two files if the shift is +2) are discarded (discard = T), stay unchanged (discard = F, loop = F) or get the file info from the last files in the shift (discard = F, loop = T).

All of these operations will report in detail what info exactly is being switched/shifted around unless explicitly told to be quiet = TRUE.

Questions:

  • is it allowed to shift the file_id?
  • what's the default for discard and loop? what's the most common scenario @brettdavidheiser ?
@cubessil
Copy link

cubessil commented May 20, 2021

I don't like the idea of changing file_id as it is what points us back to the location that data came from.
I would think loop should be false by default as I can't even think of when I would use true at the moment.
discard should also be false by default as there are times the data would be of value and a mutate with ifelse would be used just to change the one or two files. I see it being set to true regularly as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants