Skip to content

Commit

Permalink
added column to feature metadata retaining RT in seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazz Mack Smith committed Dec 6, 2023
1 parent ef4134e commit 0c8fed7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Tests/test_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

coverage erase
coverage run -m unittest discover
coverage report
coverage report --sort=Cover
coverage html
coverage xml
#coverage xml
open htmlcov/index.html
4 changes: 3 additions & 1 deletion nPYc/objects/_msDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,9 @@ def _loadXCMSDataset(self, path, noFeatureParams=14):
# Tidy formatting
featureMetadata.drop(list(featureMetadata.filter(regex='Unnamed')), axis=1, inplace=True)
featureMetadata.rename(columns={"name": "Feature Name", "mz": "m/z", "rt": "Retention Time"}, inplace=True)
featureMetadata['Retention Time'] = featureMetadata['Retention Time'].astype(float) / 60.0
# Jazz adding extra column to retain RT in seconds as well as minutes
featureMetadata['Retention Time (seconds)'] = featureMetadata['Retention Time'].astype(float)
featureMetadata['Retention Time'] = featureMetadata['Retention Time (seconds)'] / 60.0
featureMetadata['m/z'] = featureMetadata['m/z'].astype(float)

self.featureMetadata = featureMetadata
Expand Down

0 comments on commit 0c8fed7

Please sign in to comment.