Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grabMzxmlBPC still uses old method to determine RT unit #28

Closed
wkumler opened this issue Jan 13, 2024 · 1 comment
Closed

grabMzxmlBPC still uses old method to determine RT unit #28

wkumler opened this issue Jan 13, 2024 · 1 comment

Comments

@wkumler
Copy link
Owner

wkumler commented Jan 13, 2024

grabMzxmlBPC <- function(xml_data, TIC=FALSE, rtrange, incl_polarity){
  scan_nodes <- xml2::xml_find_all(
    xml_data, '//d1:scan[@msLevel="1"]'
  )
  rt_chrs <- xml2::xml_attr(scan_nodes, "retentionTime")
  rt_vals <- as.numeric(gsub(pattern = "PT|S", replacement = "", rt_chrs))
  if(any(rt_vals>150)){rt_vals <- rt_vals/60}

  int_attr <- ifelse(TIC, "totIonCurrent", "basePeakIntensity")
  int_vals <- as.numeric(xml2::xml_attr(scan_nodes, int_attr))
  if(!is.null(rtrange)){
    int_vals <- int_vals[rt_vals%between%rtrange]
    rt_vals <- rt_vals[rt_vals%between%rtrange]
  }


  return(data.table(rt=rt_vals, int=int_vals))
}

Should instead be the method that was patched in another PR I don't have the brainspace to find right now

@wkumler wkumler mentioned this issue Feb 25, 2024
9 tasks
@wkumler
Copy link
Owner Author

wkumler commented Mar 3, 2024

Fixed with #33

@wkumler wkumler closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant