qiime2 / q2-diversity

BSD 3-Clause "New" or "Revised" License
4 stars 45 forks source link

Bioenv fails if 0 variance columns are left after dropping rows with empty cells #275

Closed Oddant1 closed 4 years ago

Oddant1 commented 4 years ago

Bug Description If bioenv gets any 0 variance numerical columns, it errors. There is currently a safeguard in place to prevent 0 variance columns from ever reaching the stage where they become an issue; however, after this safeguard we drop all rows containing any empty cells. If any column becomes 0 variance after dropping these rows, we still get the error.

Steps to reproduce the behavior

  1. Run the following commands
    
    wget \
    -O "sample-metadata.tsv" \
    "https://data.qiime2.org/2020.2/tutorials/atacama-soils/sample_metadata.tsv"

qiime metadata distance-matrix \ --m-metadata-file sample-metadata.tsv \ --m-metadata-column elevation \ --o-distance-matrix elevation-distance-matrix.qza

qiime diversity bioenv \ --i-distance-matrix elevation-distance-matrix.qza \ --m-metadata-file sample-metadata.tsv \ --o-visualization bioenv-elevation.qzv \ --verbose


2. Error

**Expected behavior**
Filter zero variance columns after removal of rows containing empty cells so this doesn't happen.

**Screenshots**
![image](https://user-images.githubusercontent.com/10642616/84188191-09fa7e80-aa48-11ea-9dae-6aab892bcc8a.png)

**Computation Environment**
- OS: Linux Mint 19.3 (forum user was using virtual box)
- QIIME 2 2020.2

**References**
1. [Forum](https://forum.qiime2.org/t/qiime-diversity-bioenv-error-when-running-through-atacama-soil-microbiome-tutorial/15272/7) post that prompted this.
2. Ancient [forum](https://forum.qiime2.org/t/diversity-bioenv-column-s-in-the-data-frame-could-not-be-scaled/58/3) post in regards to the same thing.
3. Ancient [PR](https://github.com/qiime2/q2-diversity/pull/72) discussed in that forum post that seems to have been superceded.
ChrisKeefe commented 4 years ago

Again on the forum