Skip to content

Commit

Permalink
fix: .rt_model only use 2 columns instead of all
Browse files Browse the repository at this point in the history
  • Loading branch information
philouail committed Oct 30, 2024
1 parent 66687ae commit 7c9e7d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion R/do_adjustRtime-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ NULL
resid_ratio = 3,
zero_weight = 10,
bs = "tp"){
rt_map <- rt_map[order(rt_map$obs), ]
rt_map <- rt_map[order(rt_map$obs), c("ref", "obs")]
# add first row of c(0,0) to set a fix timepoint.
rt_map <- rbind(c(0,0), rt_map)
weights <- rep(1, nrow(rt_map))
Expand Down
12 changes: 4 additions & 8 deletions vignettes/xcms.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1203,17 +1203,13 @@ f[f != "QC"] <- NA
f <- sampleData(faahko)$sample_type
f[f == "QC"] <- NA
missing_filter <- PercentMissingFilter(threshold = 30,
f = f)
missing_filter <- PercentMissingFilter(threshold = 30, f = f)
# Apply the filter to faakho object
filtered_faahko <- filterFeatures(object = faahko,
filter = missing_filter)
filtered_faahko <- filterFeatures(object = faahko, filter = missing_filter)
# Apply the filter to res object
missing_filter <- PercentMissingFilter(threshold = 30,
f = f)
filtered_res <- filterFeatures(object = res,
filter = missing_filter)
missing_filter <- PercentMissingFilter(threshold = 30, f = f)
filtered_res <- filterFeatures(object = res, filter = missing_filter)
```

Here, no feature was removed, meaning that all the features had less than 30%
Expand Down

0 comments on commit 7c9e7d3

Please sign in to comment.