Skip to content

Commit

Permalink
Merge pull request #64 from PDXFinder/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
CsabaHalmagyi committed Apr 2, 2019
2 parents 123568a + d63a62e commit 2be96a9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
Expand Up @@ -152,7 +152,7 @@ public static String getSampleID(JSONObject data,String ds) throws Exception {
sampleID = data.getString("Sample ID");
}

if (ds.equals(irccCrc) || ds.equals(mdAnderson) || ds.equals(jax) || ds.equals(pdmr)){
if (ds.equals(irccCrc) || ds.equals(mdAnderson) || ds.equals(jax) || ds.equals(pdmr) || ds.equals(wustl)){
sampleID = data.getString("Model ID");
}

Expand Down
Expand Up @@ -571,7 +571,6 @@ public Set<ModelForQuery> search(Map<SearchFacetName, List<String>> filters){
result = breastCancerMarkersSearch.search(filters.get(SearchFacetName.breast_cancer_markers), result, ModelForQuery::addBreastCancerMarkers);
break;


default:
//undexpected filter option
log.warn("Unrecognised facet {} passed to search, skipping", facet.getName());
Expand Down Expand Up @@ -696,6 +695,13 @@ private void initializeModels() {

}

if(j.has("accessModalities")){
mfq.setAccessModalities(j.getString("accessModalities"));
}
else{
mfq.setAccessModalities("");
}


this.models.add(mfq);
}
Expand Down
Expand Up @@ -20,7 +20,8 @@ public enum SearchFacetName {
drug,
project,
data_available,
breast_cancer_markers;
breast_cancer_markers,
access_modalities;

public String getName() {
return name();
Expand Down
Expand Up @@ -12,6 +12,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.security.spec.ECField;
import java.util.ArrayList;

/**
Expand Down Expand Up @@ -82,12 +83,20 @@ public static String getAge(String age){

public static String getValue(String name, JSONObject j){
String value = NOT_SPECIFIED;
try{
value = j.getString(name);
if(value.trim().length()==0){
value = NOT_SPECIFIED;

if(j.has(name)){
try {
value = j.getString(name);
if(value.trim().length()==0) {
value = NOT_SPECIFIED;
}
}
catch (Exception e){
e.printStackTrace();
}
}catch(Exception e){}

}

return value;
}

Expand Down

0 comments on commit 2be96a9

Please sign in to comment.