86fa89f0f50e153d625108d93f1f9eb8ee59719e,workers/data_refinery_workers/processors/create_compendia.py,,_create_result_objects,#Any#,364
Before Change
// Save the related metadata file
organism = job_context["samples"][organism_key][0].organism
try:
last_compendia = ComputedFile.objects.filter(
is_compendia=True,
compendia_organism=organism).order_by("-compendia_version")[-1]
compendia_version = last_compendia.compendia_version + 1
except Exception as e:
// This is the first compendia for this Organism
compendia_version = 1
archive_computed_file = ComputedFile()
archive_computed_file.absolute_file_path = archive_path
archive_computed_file.filename = archive_path.split("/")[-1]
archive_computed_file.calculate_sha1()
After Change
// Compendia Result Helpers
primary_organism = job_context["samples"][organism_key][0].organism
organisms = [primary_organism]
compendia_version = CompendiaResult.objects.annotate(
organism_count=Count("organisms")
).filter(
primary_organism=primary_organism,
organisms__in=organisms,
organism_count=len(organisms)
).count() + 1
// Save Compendia Results
compendia_result = CompendiaResult()
compendia_result.primary_organism = primary_organism
compendia_result.organisms.set(organisms)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: AlexsLemonade/refinebio
Commit Name: 86fa89f0f50e153d625108d93f1f9eb8ee59719e
Time: 2019-11-01
Author: davidsmejia@gmail.com
File Name: workers/data_refinery_workers/processors/create_compendia.py
Class Name:
Method Name: _create_result_objects
Project Name: AlexsLemonade/refinebio
Commit Name: ce380e58d567ff1966eed4a5c144b29f80759773
Time: 2017-06-02
Author: kurt.wheeler91@gmail.com
File Name: workers/data_refinery_workers/processors/utils.py
Class Name:
Method Name: start_job
Project Name: EpistasisLab/tpot
Commit Name: ef7e473d04352059c33af7bef48321e5dec7b3da
Time: 2015-11-13
Author: rso@randalolson.com
File Name: setup.py
Class Name:
Method Name: calculate_version