Open jackscanlan opened 4 months ago
There was a little bug in the error handling you added which caused it to stop when any samples were below min_sample_reads, addressed in https://github.com/AVR-biosecurity-bioinformatics/freyr/commit/cf917fbf3d9aab66a2cb2f35a34db7edfa06aeb5
Not sure there will be a way to generate an empty phyloseq object, with the way phyloseq::otu_table() is set up.
It may be worth just using base R to filter the matrices, rather than relying on phyloseq. The guts of the phyloseq function are doing this anyway: https://github.com/joey711/phyloseq/blob/master/R/transform_filter-methods.R
Why this matters
min_sample_reads
too high and need to know this is why the run failsIdeal behaviour
Would be good if
PHYLOSEQ_FILTER
still produces the expected output files when all samples are removed from a locus, but they're just empty filesDetail
Error currently occurs when
params.subsample = 1
usingtest_data/dual
(-profile test
), asmin_sample_reads = 1000
:This occurs because the following code does not produce an "empty" phyloseq object when pruning out all samples, instead returning an error:
Have added a more informative error to
phyloseq_filter.R
, but this doesn't really solve the issue (ie. produce empty outputs and allow the run to continue):To-do:
Need a way to either: