Skip to content

Commit

Permalink
update treatment remove pr
Browse files Browse the repository at this point in the history
  • Loading branch information
dippindots committed Dec 19, 2019
1 parent 4e17332 commit f1d5990
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,15 @@ public static GeneticProfile loadGeneticProfile(File file) throws IOException, D
if (geneticProfile.getGeneticAlterationType() == GeneticAlterationType.GENERIC_ASSAY) {
validateGenericAssay(geneticProfile, file);
geneticProfile.setGenericAssayType(geneticProfile.getOtherMetaDataField("generic_assay_type"));
// if genericAssayType is TREATMENT_RESPONSE, validate and set pivotThreshold and sortOrder
// if genericAssayType is TREATMENT_RESPONSE, validate if pivotThreshold and sortOrder exist
if (geneticProfile.getGenericAssayType().equals("TREATMENT_RESPONSE")) {
validateTreatmentResponse(geneticProfile, file);
}
// add pivotThreshold and sortOrder if exist
if (geneticProfile.getOtherMetaDataField("pivot_threshold_value") != null) {
geneticProfile.setPivotThreshold(Float.parseFloat(geneticProfile.getOtherMetaDataField("pivot_threshold_value")));
}
if (geneticProfile.getOtherMetaDataField("value_sort_order") != null) {
geneticProfile.setSortOrder(geneticProfile.getOtherMetaDataField("value_sort_order"));
}
}
Expand Down
11 changes: 5 additions & 6 deletions core/src/main/scripts/importer/validateData.py
Original file line number Diff line number Diff line change
Expand Up @@ -3814,7 +3814,7 @@ def parseFeatureColumns(self, nonsample_col_vals):

feature_id = nonsample_col_vals[0].strip()

# Check if feature is present
# Check if genetic entity is present
if feature_id == '':
# Validator already gives warning for this in checkLine method
pass
Expand All @@ -3825,12 +3825,12 @@ def parseFeatureColumns(self, nonsample_col_vals):
else:
# Check if this is the second data file
if self.get_prior_validated_feature_ids() is not None:
# Check if feature is in the first data file
# Check if genetic entity is in the first data file
if feature_id not in self.get_prior_validated_feature_ids():
self.logger.error('Feature id cannot be found in other data file',
extra={'line_number': self.line_number,
'cause': feature_id})
# Add feature to list of features of current data file
# Add genetic entity to list of entities of current data file
self.feature_ids.append(feature_id)
return feature_id

Expand Down Expand Up @@ -3970,12 +3970,11 @@ class GenericAssayValidator(GenericAssayWiseFileValidator):
"""

# (1) Natural positive number (not 0)
# (2) Number may be prefixed by ">" or "<"; f.i. ">n" means that the data was ineffective at the highest tested concentration of n.
# (2) Number may be prefixed by ">" or "<"; f.i. ">n" means that the real value lies beyond value n.
# (3) NA cell value is allowed; means value was not tested on a sample
# (4) Is an empty cell value allowed? (meaning data was not tested on a sample)
#
# Warnings for values:
# (1) Cell contains a value without decimals and is not prependend by ">"; value appears to be truncated but lacks ">" truncation indicator
# (1) Cell contains a value without decimals and is not prefixed by ">"; value appears to be truncated but lacks ">" truncation indicator
def checkValue(self, value, col_index):
"""Check a value in a sample column."""

Expand Down

0 comments on commit f1d5990

Please sign in to comment.