示例#1
0
def create_slide(spec, slide_id):
    """
    Find data related to a slide_Id in Spectrum DB
    and create a new Slide.
    """
    slide_data = db.get_slide_data(slide_id)
    genotype = slide_data['genotype']
    stain = slide_data['stain']
    disease = slide_data['diagnosis']
    image_id = slide_data['image_id']
    thumb_url = slide_data['thumb_url']
    thumb_url_lrg = slide_data['thumb_url_lrg']

    s = Slide(genotype=genotype, stain=stain, disease=disease,
              specimen=spec, slide_id=slide_id, image_id=image_id,
              thumbnail_url=thumb_url, thumbnail_url_lrg=thumb_url_lrg)
    s.save()
    create_thumbnail_file(s)
示例#2
0
def create_slide(spec, slide_id):
	"""
	Find data related to a slide_Id in Spectrum DB
	and create a new Slide.
	"""
	slide_data = db.get_slide_data(slide_id)
	genotype = slide_data['genotype']
	stain = slide_data['stain']
	diagnosis = slide_data['diagnosis']
	image_id = slide_data['image_id']
	image_url = slide_data['image_url']
	thumb_url = slide_data['thumb_url']
	filename = slide_data['filename']
	large_thumb_url = slide_data['large_thumb_url']
	sis_url = slide_data['sis_url']
	s = Slide(genotype=genotype, stain=stain, diagnosis=diagnosis, 
		specimen=spec, slide_id=slide_id, image_id=image_id,
		image_url=image_url, thumbnail_url=thumb_url, large_thumbnail_url=large_thumb_url,
		sis_url=sis_url, filename=filename)
	s.save()