Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

include.lowest = FALSE in mp_filter_taxa seems not work

Open
#86 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start by inspecting the mp_filter_taxa implementation and comparing the reported calls with the mouse.time.mpse example dataset. Reproduce the include.lowest behavior with a suitable test case, accounting for the exact argument spelling shown in the report; done means TRUE and FALSE produce the intended distinct filtering results.

Written by the indexing model from the issue text.

Description

When I use the mp_filter_taxa function, I found that include.lowest seems not work, which always return the include.lowest=False reuslt. However, when try it using example dataset mouse.time.mpse, it works fine. I could not figure out why but I think this is very important, because many users may not notice this.
My dataset is unpublic, so if you need it to test, welcome to contact me.

> mp_filter_taxa(mp_raw, .abundance = Abundance, min.abun = 1, min.prop = 0.1, iclude.lowest=FALSE)
# A MPSE-tibble (MPSE object) abstraction: 825,086 × 15
# OTU=6763 | Samples=122 | Assays=Abundance | Taxonomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
   OTU    Sample Abundance origin suborigin bioreptype biotype oritype Kingdom     Phylum      Class Order Family Genus Species
   <chr>  <chr>      <int> <chr>  <chr>     <chr>      <chr>   <chr>   <chr>       <chr>       <chr> <chr> <chr>  <chr> <chr>  
 1 OTU_1  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__E… f__Ye… g__S… s__Ser…
 2 OTU_2  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__Par…
 3 OTU_3  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
 4 OTU_4  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__S… f__Sp… g__S… s__un_…
 5 OTU_5  JLBX1E        11 JL     BX        1          E       JLE     k__Bacteria p__Bactero… c__B… o__F… f__We… g__C… s__Chr…
 6 OTU_6  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__R… f__Rh… g__P… s__Phy…
 7 OTU_7  JLBX1E         4 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__un_…
 8 OTU_8  JLBX1E        27 JL     BX        1          E       JLE     k__Bacteria p__Actinob… c__A… o__M… f__Mi… g__M… s__un_…
 9 OTU_9  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
10 OTU_10 JLBX1E         2 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Ox… g__C… s__Col…
# ℹ 825,076 more rows
# ℹ Use `print(n = ...)` to see more rows
> 
> mp_filter_taxa(mp_raw, .abundance = Abundance, min.abun = 1, min.prop = 0.1, iclude.lowest=TRUE)
# A MPSE-tibble (MPSE object) abstraction: 825,086 × 15
# OTU=6763 | Samples=122 | Assays=Abundance | Taxonomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
   OTU    Sample Abundance origin suborigin bioreptype biotype oritype Kingdom     Phylum      Class Order Family Genus Species
   <chr>  <chr>      <int> <chr>  <chr>     <chr>      <chr>   <chr>   <chr>       <chr>       <chr> <chr> <chr>  <chr> <chr>  
 1 OTU_1  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__E… f__Ye… g__S… s__Ser…
 2 OTU_2  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__Par…
 3 OTU_3  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
 4 OTU_4  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__S… f__Sp… g__S… s__un_…
 5 OTU_5  JLBX1E        11 JL     BX        1          E       JLE     k__Bacteria p__Bactero… c__B… o__F… f__We… g__C… s__Chr…
 6 OTU_6  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__R… f__Rh… g__P… s__Phy…
 7 OTU_7  JLBX1E         4 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__un_…
 8 OTU_8  JLBX1E        27 JL     BX        1          E       JLE     k__Bacteria p__Actinob… c__A… o__M… f__Mi… g__M… s__un_…
 9 OTU_9  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
10 OTU_10 JLBX1E         2 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Ox… g__C… s__Col…
# ℹ 825,076 more rows
# ℹ Use `print(n = ...)` to see more rows
> mp_filter_taxa(mp_raw, .abundance = Abundance, min.abun = 2, min.prop = 0.1, iclude.lowest=TRUE)
# A MPSE-tibble (MPSE object) abstraction: 545,462 × 15
# OTU=4471 | Samples=122 | Assays=Abundance | Taxonomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
   OTU    Sample Abundance origin suborigin bioreptype biotype oritype Kingdom     Phylum      Class Order Family Genus Species
   <chr>  <chr>      <int> <chr>  <chr>     <chr>      <chr>   <chr>   <chr>       <chr>       <chr> <chr> <chr>  <chr> <chr>  
 1 OTU_1  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__E… f__Ye… g__S… s__Ser…
 2 OTU_2  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__Par…
 3 OTU_3  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
 4 OTU_4  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__S… f__Sp… g__S… s__un_…
 5 OTU_5  JLBX1E        11 JL     BX        1          E       JLE     k__Bacteria p__Bactero… c__B… o__F… f__We… g__C… s__Chr…
 6 OTU_6  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__R… f__Rh… g__P… s__Phy…
 7 OTU_7  JLBX1E         4 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__un_…
 8 OTU_8  JLBX1E        27 JL     BX        1          E       JLE     k__Bacteria p__Actinob… c__A… o__M… f__Mi… g__M… s__un_…
 9 OTU_9  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
10 OTU_10 JLBX1E         2 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Ox… g__C… s__Col…
# ℹ 545,452 more rows
# ℹ Use `print(n = ...)` to see more rows
> mp_filter_taxa(mp_raw, .abundance = Abundance, min.abun = 2, min.prop = 0.1, iclude.lowest=FALSE)
# A MPSE-tibble (MPSE object) abstraction: 545,462 × 15
# OTU=4471 | Samples=122 | Assays=Abundance | Taxonomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
   OTU    Sample Abundance origin suborigin bioreptype biotype oritype Kingdom     Phylum      Class Order Family Genus Species
   <chr>  <chr>      <int> <chr>  <chr>     <chr>      <chr>   <chr>   <chr>       <chr>       <chr> <chr> <chr>  <chr> <chr>  
 1 OTU_1  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__E… f__Ye… g__S… s__Ser…
 2 OTU_2  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__Par…
 3 OTU_3  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
 4 OTU_4  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__S… f__Sp… g__S… s__un_…
 5 OTU_5  JLBX1E        11 JL     BX        1          E       JLE     k__Bacteria p__Bactero… c__B… o__F… f__We… g__C… s__Chr…
 6 OTU_6  JLBX1E         0 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__A… o__R… f__Rh… g__P… s__Phy…
 7 OTU_7  JLBX1E         4 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Bu… g__B… s__un_…
 8 OTU_8  JLBX1E        27 JL     BX        1          E       JLE     k__Bacteria p__Actinob… c__A… o__M… f__Mi… g__M… s__un_…
 9 OTU_9  JLBX1E         1 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__X… f__Rh… g__u… s__un_…
10 OTU_10 JLBX1E         2 JL     BX        1          E       JLE     k__Bacteria p__Proteob… c__G… o__B… f__Ox… g__C… s__Col…
# ℹ 545,452 more rows
# ℹ Use `print(n = ...)` to see more rows
Dominant language
R
Stars
195
Forks
36
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from YuLab-SMU/MicrobiotaProcess

All issues in YuLab-SMU/MicrobiotaProcess

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.