oxymetag 1.1.2__tar.gz → 1.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {oxymetag-1.1.2/oxymetag.egg-info → oxymetag-1.1.3}/PKG-INFO +1 -1
  2. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/__init__.py +1 -1
  3. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/scripts/predict_oxygen.R +10 -3
  4. {oxymetag-1.1.2 → oxymetag-1.1.3/oxymetag.egg-info}/PKG-INFO +1 -1
  5. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag.egg-info/SOURCES.txt +1 -0
  6. {oxymetag-1.1.2 → oxymetag-1.1.3}/setup.py +1 -1
  7. oxymetag-1.1.3/tests/__init__.py +0 -0
  8. {oxymetag-1.1.2 → oxymetag-1.1.3}/LICENSE +0 -0
  9. {oxymetag-1.1.2 → oxymetag-1.1.3}/MANIFEST.in +0 -0
  10. {oxymetag-1.1.2 → oxymetag-1.1.3}/README.md +0 -0
  11. {oxymetag-1.1.2 → oxymetag-1.1.3}/environment.yml +0 -0
  12. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/cli.py +0 -0
  13. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/core.py +0 -0
  14. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/.DS_Store +0 -0
  15. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/Oxygen_pfams.csv +0 -0
  16. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/VTML20.out +0 -0
  17. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/nucleotide.out +0 -0
  18. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxygen_model.rds +0 -0
  19. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams.dmnd +0 -0
  20. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117.dmnd +0 -0
  21. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db +0 -0
  22. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db.dbtype +0 -0
  23. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db.index +0 -0
  24. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db.lookup +0 -0
  25. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db.source +0 -0
  26. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db_h +0 -0
  27. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db_h.dbtype +0 -0
  28. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/oxymetag_pfams_n117_db_h.index +0 -0
  29. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/pfam_headers_table.txt +0 -0
  30. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/data/pfam_lengths.tsv +0 -0
  31. /oxymetag-1.1.2/tests/__init__.py → /oxymetag-1.1.3/oxymetag/scripts/.Rhistory +0 -0
  32. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag/utils.py +0 -0
  33. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag.egg-info/dependency_links.txt +0 -0
  34. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag.egg-info/entry_points.txt +0 -0
  35. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag.egg-info/requires.txt +0 -0
  36. {oxymetag-1.1.2 → oxymetag-1.1.3}/oxymetag.egg-info/top_level.txt +0 -0
  37. {oxymetag-1.1.2 → oxymetag-1.1.3}/requirements.txt +0 -0
  38. {oxymetag-1.1.2 → oxymetag-1.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oxymetag
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: Oxygen metabolism profiling from metagenomic data
5
5
  Home-page: https://github.com/cliffbueno/oxymetag
6
6
  Author: Clifton P. Bueno de Mesquita
@@ -2,7 +2,7 @@
2
2
  OxyMetaG: Oxygen metabolism profiling from metagenomic data
3
3
  """
4
4
 
5
- __version__ = "1.1.2"
5
+ __version__ = "1.1.3"
6
6
  __author__ = "Clifton P. Bueno de Mesquita"
7
7
  __email__ = "cliff.buenodemesquita@colorado.edu"
8
8
 
@@ -180,7 +180,7 @@ predict_oxygen <- function(input_dir, output_file, package_data_dir, mode, idcut
180
180
  anaerobe_rpk <- oxygen_rpk$RPKsum[oxygen_rpk$Oxygen == "anaerobic"]
181
181
 
182
182
  if (length(anaerobe_rpk) == 0 || anaerobe_rpk == 0) {
183
- results$ratio[i] <- ifelse(length(aerobe_rpk) > 0 && aerobe_rpk > 0, Inf, 0)
183
+ results$ratio[i] <- ifelse(length(aerobe_rpk) > 0 && aerobe_rpk > 0, Inf, NA)
184
184
  } else {
185
185
  results$ratio[i] <- aerobe_rpk / anaerobe_rpk
186
186
  }
@@ -188,11 +188,18 @@ predict_oxygen <- function(input_dir, output_file, package_data_dir, mode, idcut
188
188
  message("Processed sample ", i, "/", length(files), ": ", sample_id)
189
189
  }
190
190
 
191
- # Make predictions using the GAM model
191
+ # Make predictions using the GAM model, ratio NA are Per_anaerobe NA
192
+ results <- results %>%
193
+ mutate(ratio = ifelse(is.infinite(ratio), NA, ratio))
192
194
  new_data <- data.frame(ratio = results$ratio)
193
- results$Per_aerobe <- predict(oxygen_model, newdata = new_data, type = "response")
195
+ results$Per_aerobe <- predict(oxygen_model,
196
+ newdata = new_data,
197
+ type = "response",
198
+ na.action = na.exclude)
194
199
 
195
200
  # Constrain predictions to 0-100% and set to 100% if ratio > 35
201
+ # If NA, that means there were 0 aerobe or anaerobe genes found
202
+ # You can look at the gene counts to learn something about oxygen, but not calculate the Per_aerobe
196
203
  results <- results %>%
197
204
  mutate(Per_aerobe = pmax(0, pmin(100, Per_aerobe))) %>%
198
205
  mutate(Per_aerobe = ifelse(ratio > 35, 100, Per_aerobe))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oxymetag
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: Oxygen metabolism profiling from metagenomic data
5
5
  Home-page: https://github.com/cliffbueno/oxymetag
6
6
  Author: Clifton P. Bueno de Mesquita
@@ -31,5 +31,6 @@ oxymetag/data/oxymetag_pfams_n117_db_h.dbtype
31
31
  oxymetag/data/oxymetag_pfams_n117_db_h.index
32
32
  oxymetag/data/pfam_headers_table.txt
33
33
  oxymetag/data/pfam_lengths.tsv
34
+ oxymetag/scripts/.Rhistory
34
35
  oxymetag/scripts/predict_oxygen.R
35
36
  tests/__init__.py
@@ -8,7 +8,7 @@ with open("requirements.txt", "r", encoding="utf-8") as fh:
8
8
 
9
9
  setup(
10
10
  name="oxymetag",
11
- version="1.1.2",
11
+ version="1.1.3",
12
12
  author="Clifton P. Bueno de Mesquita",
13
13
  author_email="cliff.buenodemesquita@colorado.edu",
14
14
  description="Oxygen metabolism profiling from metagenomic data",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes