def searchImages(allele_id=None, limit=None): query = Image.query molimages = [] phenoimagesbyallele = [] phenoimagesbygenotype = [] # for this allele, use it's allele assoc objects to gather images if allele_id: allele = getModelByMGIID(Allele, allele_id) for molecularimagepane in allele.molecularimagepanes: molimages.append(molecularimagepane.image) for phenoimagepane in allele.phenoimagepanes: phenoimagesbyallele.append(phenoimagepane.image) # images associated to this allele's genotypes for genotype in allele.genotypes: for pane in genotype.imagepanes: phenoimagesbygenotype.append(pane.image) return molimages, phenoimagesbyallele, phenoimagesbygenotype
def getAssayByMGIID(id): id = id.upper() #return Assay.query.filter_by(mgiid=id).first() return getModelByMGIID(Assay, id)
def getImageByMGIID(id): id = id.upper() #image = Image.query.filter_by(mgiid=id).first() image = getModelByMGIID(Image, id, 'acc_mgitype_key') return image
def getExperimentByMGIID(id): id = id.upper() #marker = Marker.query.filter_by(mgiid=id).first() experiment = getModelByMGIID(MappingExperiment, id) _prepExperiment(experiment) return experiment
def getMarkerByMGIID(id): id = id.upper() #marker = Marker.query.filter_by(mgiid=id).first() marker = getModelByMGIID(Marker, id) _prepMarker(marker) return marker
def getProbeByMGIID(id): id = id.upper() #marker = Marker.query.filter_by(mgiid=id).first() probe = getModelByMGIID(Probe, id) _prepProbe(probe) return probe
def getAlleleByMGIID(id): id = id.upper() #allele = Allele.query.filter_by(mgiid=id).first() allele = getModelByMGIID(Allele, id) return allele
def getAntibodyByMGIID(id): id = id.upper() antibody = getModelByMGIID(Antibody, id) _prepAntibody(antibody) return antibody