Skip to content

Commit

Permalink
fixed SampleClass designation in nmrDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinesands committed Aug 7, 2024
1 parent 70a6c44 commit 47e737a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nPYc/objects/_nmrDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def _matchDatasetToLIMS(self, pathToLIMSfile):
# Define `SampleClass` - standardised NPC types based on SampleType/AssayRole combinations
self.sampleMetadata.loc[:,'SampleClass'] = 'Study Sample'
self.sampleMetadata.loc[self.sampleMetadata.loc[:, 'Status'].str.match('Study Reference', na=False).astype(bool), 'SampleClass'] = 'Study Reference'
self.sampleMetadata.loc[self.sampleMetadata.loc[:, 'Status'].str.match('Long Term Reference', na=False).astype(bool), 'AssayRole'] = 'Long-Term Reference'
self.sampleMetadata.loc[self.sampleMetadata.loc[:, 'Status'].str.match('Long Term Reference', na=False).astype(bool), 'SampleClass'] = 'Long-Term Reference'

# Update Sampling ID values using new 'SampleType', special case for Study Pool, External Reference and Procedural Blank
self.sampleMetadata.loc[(((self.sampleMetadata['Sample ID'] == 'Not specified') | (self.sampleMetadata['Sample ID'] == 'Present but undefined in the LIMS file')) & (self.sampleMetadata['SampleType'] == SampleType.StudyPool)).tolist(), 'Sample ID'] = 'Study Pool Sample'
Expand Down

0 comments on commit 47e737a

Please sign in to comment.