Turn off fitlering in anpan_repeated_measures

I’m using anpan_repeated_measures on presence-absence data with multiple samples per individual. I’ve run the profiles through other filtering pipelines, so I’ve turned anpan filtering off with filtering_method = “none”, but I see that in the function, kmeans filtering seems to be hardcoded here:

  purrr::walk(bug_files, read_filter_write, metadata = metadata, 
    genomes_dir = genomes_dir, covariates = covariates, 
    outcome = outcome, filtering_method = "kmeans", minmax_thresh = minmax_thresh, 
    sample_wise_filter_stats_dir = sample_wise_filter_stats_dir, 
    plot_ext = "pdf")

and again in read_filter_write :

  read_res = read_and_filter(bug_file         = .x,
                             metadata         = metadata,
                             genomes_file     = genomes_file,
                             covariates       = covariates,
                             outcome          = outcome,
                             filtering_method = "kmeans",
                             minmax_thresh    = minmax_thresh,
                             filter_stats_dir = sample_wise_filter_stats_dir,
                             plot_ext         = "pdf")

would it be possible to turn this filtering off?

Good catch - I fixed it in the latest commit :+1:

Thanks!

I found another bug, when running anpan_batch with the horseshoe model and plot_result = T, the line

hit_df = all_bug_terms[q_global < q_threshold & abs(estimate) >  beta_threshold] doesn’t work with the horseshoe model, as q_global and estimate only exists for the fastglm model.

Also the value of plot_result doesn’t get passed on to anpan_batch

Hi there - I think the hit_df bug with the horseshoe model you mentioned is fixed as of this commit a couple months ago, are you sure you’re on the latest version?

But your note on plot_result not getting passed looks correct, I’ll fix that momentarily.

Oh, yes, sorry, I was still using an older version.