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

Add windowed profiles #22

Open
cells2numbers opened this issue Mar 13, 2019 · 0 comments
Open

Add windowed profiles #22

cells2numbers opened this issue Mar 13, 2019 · 0 comments

Comments

@cells2numbers
Copy link
Owner

Add functionality to calculate the migration parameter on a windowed frame. This allows quantifying the change of migration over time.

Sample code:

create_windowed_migration_profiles <- function(df_temp, t1, offset = 20) {
  df_temp %<>% 
    filter(Metadata_frame > t1) %>% 
    filter(Metadata_frame < (t1 + offset) ) 
  
  tracks <- migrationminer::track(
      df_temp, 
      c("TrackObjects_Label"),
      t_var = "Metadata_frame"
    )  %>% 
    filter(complete.cases(.)) %>% 
    filter(Track_Length > offset/2) %>% 
    summarise_all( mean) %>% 
    mutate(Metadata_Frame_Subset = t1) %>% 
    mutate(Metadata_offset = offset) 
    
  return(tracks)
} 

Temporal change of the migration parameter 'speed' over time. Different window sizes (offsets) were chosen. The shown data belongs to an experiment that is characterized by a strong flow
image

@cells2numbers cells2numbers changed the title Add Add windowed profiles Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant