-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #247 from opencb/TASK-1111
TASK-1111 Add Pharmagenomics data to CellBase
- Loading branch information
Showing
23 changed files
with
2,398 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
191 changes: 191 additions & 0 deletions
191
biodata-models/src/main/java/org/opencb/biodata/models/pharma/PharmaChemical.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
package org.opencb.biodata.models.pharma; | ||
|
||
import org.opencb.biodata.models.core.Xref; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class PharmaChemical { | ||
private String id; | ||
private String source; | ||
private String name; | ||
private List<String> genericNames; | ||
private List<String> tradeNames; | ||
private List<String> tradeMixtures; | ||
private List<String> types; | ||
private List<Xref> xrefs; | ||
private String smiles; | ||
private String inChI; | ||
private List<PharmaVariantAnnotation> variants; | ||
private List<PharmaGeneAnnotation> genes; | ||
|
||
private Map<String, Object> attributes; | ||
|
||
public PharmaChemical() { | ||
this.genericNames = new ArrayList<>(); | ||
this.tradeNames = new ArrayList<>(); | ||
this.tradeMixtures = new ArrayList<>(); | ||
this.types = new ArrayList<>(); | ||
this.xrefs = new ArrayList<>(); | ||
this.variants = new ArrayList<>(); | ||
this.genes = new ArrayList<>(); | ||
this.attributes = new HashMap<>(); | ||
} | ||
|
||
public PharmaChemical(String id, String source, String name, List<String> genericNames, List<String> tradeNames, | ||
List<String> tradeMixtures, List<String> types, List<Xref> xrefs, String smiles, String inChI, | ||
List<PharmaVariantAnnotation> variants, List<PharmaGeneAnnotation> genes, Map<String, Object> attributes) { | ||
this.id = id; | ||
this.source = source; | ||
this.name = name; | ||
this.genericNames = genericNames; | ||
this.tradeNames = tradeNames; | ||
this.tradeMixtures = tradeMixtures; | ||
this.types = types; | ||
this.xrefs = xrefs; | ||
this.smiles = smiles; | ||
this.inChI = inChI; | ||
this.variants = variants; | ||
this.genes = genes; | ||
this.attributes = attributes; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("PharmaChemical{"); | ||
sb.append("id='").append(id).append('\''); | ||
sb.append(", source='").append(source).append('\''); | ||
sb.append(", name='").append(name).append('\''); | ||
sb.append(", genericNames=").append(genericNames); | ||
sb.append(", tradeNames=").append(tradeNames); | ||
sb.append(", tradeMixtures=").append(tradeMixtures); | ||
sb.append(", types=").append(types); | ||
sb.append(", xrefs=").append(xrefs); | ||
sb.append(", smiles='").append(smiles).append('\''); | ||
sb.append(", inChI='").append(inChI).append('\''); | ||
sb.append(", variants=").append(variants); | ||
sb.append(", genes=").append(genes); | ||
sb.append(", attributes=").append(attributes); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public PharmaChemical setId(String id) { | ||
this.id = id; | ||
return this; | ||
} | ||
|
||
public String getSource() { | ||
return source; | ||
} | ||
|
||
public PharmaChemical setSource(String source) { | ||
this.source = source; | ||
return this; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public PharmaChemical setName(String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public List<String> getGenericNames() { | ||
return genericNames; | ||
} | ||
|
||
public PharmaChemical setGenericNames(List<String> genericNames) { | ||
this.genericNames = genericNames; | ||
return this; | ||
} | ||
|
||
public List<String> getTradeNames() { | ||
return tradeNames; | ||
} | ||
|
||
public PharmaChemical setTradeNames(List<String> tradeNames) { | ||
this.tradeNames = tradeNames; | ||
return this; | ||
} | ||
|
||
public List<String> getTradeMixtures() { | ||
return tradeMixtures; | ||
} | ||
|
||
public PharmaChemical setTradeMixtures(List<String> tradeMixtures) { | ||
this.tradeMixtures = tradeMixtures; | ||
return this; | ||
} | ||
|
||
public List<String> getTypes() { | ||
return types; | ||
} | ||
|
||
public PharmaChemical setTypes(List<String> types) { | ||
this.types = types; | ||
return this; | ||
} | ||
|
||
public List<Xref> getXrefs() { | ||
return xrefs; | ||
} | ||
|
||
public PharmaChemical setXrefs(List<Xref> xrefs) { | ||
this.xrefs = xrefs; | ||
return this; | ||
} | ||
|
||
public String getSmiles() { | ||
return smiles; | ||
} | ||
|
||
public PharmaChemical setSmiles(String smiles) { | ||
this.smiles = smiles; | ||
return this; | ||
} | ||
|
||
public String getInChI() { | ||
return inChI; | ||
} | ||
|
||
public PharmaChemical setInChI(String inChI) { | ||
this.inChI = inChI; | ||
return this; | ||
} | ||
|
||
public List<PharmaVariantAnnotation> getVariants() { | ||
return variants; | ||
} | ||
|
||
public PharmaChemical setVariants(List<PharmaVariantAnnotation> variants) { | ||
this.variants = variants; | ||
return this; | ||
} | ||
|
||
public List<PharmaGeneAnnotation> getGenes() { | ||
return genes; | ||
} | ||
|
||
public PharmaChemical setGenes(List<PharmaGeneAnnotation> genes) { | ||
this.genes = genes; | ||
return this; | ||
} | ||
|
||
public Map<String, Object> getAttributes() { | ||
return attributes; | ||
} | ||
|
||
public PharmaChemical setAttributes(Map<String, Object> attributes) { | ||
this.attributes = attributes; | ||
return this; | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
biodata-models/src/main/java/org/opencb/biodata/models/pharma/PharmaClinicalAllele.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package org.opencb.biodata.models.pharma; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class PharmaClinicalAllele { | ||
private String allele; | ||
private String annotation; | ||
private String description; | ||
|
||
private Map<String, Object> attributes; | ||
|
||
public PharmaClinicalAllele() { | ||
this.attributes = new HashMap<>(); | ||
} | ||
|
||
public PharmaClinicalAllele(String allele, String annotation, String description, Map<String, Object> attributes) { | ||
this.allele = allele; | ||
this.annotation = annotation; | ||
this.description = description; | ||
this.attributes = attributes; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("PharmaClinicalAllele{"); | ||
sb.append("allele='").append(allele).append('\''); | ||
sb.append(", annotation='").append(annotation).append('\''); | ||
sb.append(", description='").append(description).append('\''); | ||
sb.append(", attributes=").append(attributes); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
|
||
public String getAllele() { | ||
return allele; | ||
} | ||
|
||
public PharmaClinicalAllele setAllele(String allele) { | ||
this.allele = allele; | ||
return this; | ||
} | ||
|
||
public String getAnnotation() { | ||
return annotation; | ||
} | ||
|
||
public PharmaClinicalAllele setAnnotation(String annotation) { | ||
this.annotation = annotation; | ||
return this; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public PharmaClinicalAllele setDescription(String description) { | ||
this.description = description; | ||
return this; | ||
} | ||
|
||
public Map<String, Object> getAttributes() { | ||
return attributes; | ||
} | ||
|
||
public PharmaClinicalAllele setAttributes(Map<String, Object> attributes) { | ||
this.attributes = attributes; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.