Designed with package integration in mind, the remove bins function allows you to remove bins from a strollur object
Arguments
Value
an updated strollur object
Examples
data <- strollur::new_dataset(dataset_name = "my_dataset")
bin_names <- c("bin1", "bin2", "bin3")
abundances <- c(110, 525, 80)
strollur::xdev_assign_bins(data,
table = data.frame(bin_name = bin_names,
abundance = abundances),
bin_type = "otu")
#> Assigned 3 otu bins.
#> my_dataset:
#>
#>
#> Number of unique seqs: 3
#> Total number of seqs: 715
#>
#> Total number of otus: 3
#>
strollur::count(data,
type = "bin",
bin_type = "otu")
#> [1] 3
bins_to_remove <- c("bin1")
trash_tag <- c("bad_bin")
strollur::xdev_remove_bins(data,
bin_names = bins_to_remove,
trash_tags = trash_tag)
#> my_dataset:
#>
#>
#> scrap_summary:
#> type trash_code unique total
#> 1 sequence bad_bin 1 110
#> 2 otu bad_bin 1 110
#>
#> Number of unique seqs: 2
#> Total number of seqs: 605
#>
#> Total number of otus: 2
#>
strollur::count(data,
type = "bin",
bin_type = "otu")
#> [1] 2
