Search in sources :

Example 1 with Samples

use of io.swagger.model.Samples in project ImmunogeneticDataTools by nmdp-bioinformatics.

the class GenotypesApiController method submitGenotypes.

@Override
public ResponseEntity<Samples> submitGenotypes(@ApiParam(value = "Genotypes", required = true) @Valid @RequestBody Genotypes genotypes) {
    List<Genotype> genotypeList = genotypes.getGenotype();
    Samples samples = new Samples();
    SampleData sampleData = null;
    for (Genotype genotype : genotypeList) {
        LinkageDisequilibriumGenotypeList linkedGLString = GLStringUtilities.inflateGenotypeList(genotype.getId(), genotype.getGlString(), null);
        Sample sample = LinkageDisequilibriumAnalyzer.detectLinkages(linkedGLString);
        sampleData = populateSwaggerObject(sample);
        samples.addSampleItem(sampleData);
    }
    return ResponseEntity.ok(samples);
}
Also used : LinkageDisequilibriumGenotypeList(org.dash.valid.gl.LinkageDisequilibriumGenotypeList) Samples(io.swagger.model.Samples) SampleData(io.swagger.model.SampleData) Sample(org.dash.valid.Sample) Genotype(io.swagger.model.Genotype)

Aggregations

Genotype (io.swagger.model.Genotype)1 SampleData (io.swagger.model.SampleData)1 Samples (io.swagger.model.Samples)1 Sample (org.dash.valid.Sample)1 LinkageDisequilibriumGenotypeList (org.dash.valid.gl.LinkageDisequilibriumGenotypeList)1