Skip to content

Commit

Permalink
Merge pull request #267 from isb-cgc/prod-sp
Browse files Browse the repository at this point in the history
Sprint 33
  • Loading branch information
s-paquette authored Apr 29, 2019
2 parents 5e9711c + 01d6266 commit e205014
Show file tree
Hide file tree
Showing 34 changed files with 67 additions and 23,376 deletions.
149 changes: 0 additions & 149 deletions api/isb_cgc_api/aliquots_annotations.py

This file was deleted.

16 changes: 0 additions & 16 deletions api/isb_cgc_api/message_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,3 @@ class MetadataItem(messages.Message):
weight = messages.IntegerField(101, variant=messages.Variant.INT32)
weiss_venous_invasion = messages.StringField(102)
year_of_initial_pathologic_diagnosis = messages.IntegerField(103, variant=messages.Variant.INT32)


class MetadataAnnotationItem(messages.Message):
AliquotBarcode = messages.StringField(1)
annotationCategoryId = messages.IntegerField(2, variant=messages.Variant.INT32)
annotationCategoryName = messages.StringField(3)
annotationClassification = messages.StringField(4)
annotationClassificationId = messages.IntegerField(5, variant=messages.Variant.INT32)
annotationId = messages.IntegerField(6, variant=messages.Variant.INT32)
annotationNoteText = messages.StringField(7)
itemBarcode = messages.StringField(8)
itemTypeId = messages.IntegerField(9, variant=messages.Variant.INT32)
itemTypeName = messages.StringField(10)
case_barcode = messages.StringField(11)
sample_barcode = messages.StringField(12)
disease_code = messages.StringField(13)
18 changes: 0 additions & 18 deletions api/isb_cgc_api/message_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,6 @@ def write_metadata_file(rows, write_file=False):
print item_text


def write_annotation_file(rows, write_file=False):
item_text = '\nclass MetadataAnnotationItem(messages.Message):\n '
i = 1
for row in rows:
field_type = FIELD_TYPES.get(row['DATA_TYPE'])
if field_type.lower() == 'datetime': continue
item_text += '%-30s = messages.%s(%d' % (row['COLUMN_NAME'], field_type, i)
item_text += ')\n ' if field_type is not 'IntegerField' else ', variant=messages.Variant.INT32)\n '
i += 1

if write_file is True:
with open('message_classes.py', 'a') as f:
f.write('\n\n\n')
f.write(item_text)
else:
print item_text


def main(args):
db = get_sql_connection(args)
cursor = db.cursor(MySQLdb.cursors.DictCursor)
Expand Down
144 changes: 0 additions & 144 deletions api/isb_cgc_api/patients_annotations.py

This file was deleted.

5 changes: 3 additions & 2 deletions api/isb_cgc_api/patients_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ def get(self, request):
sample_list = [row['sample_barcode'] for row in cursor.fetchall()]

# get list of aliquots
cursor.execute(aliquot_query_str, query_tuple)
aliquot_list = [row['AliquotBarcode'] for row in cursor.fetchall()]
# cursor.execute(aliquot_query_str, query_tuple)
# aliquot_list = [row['AliquotBarcode'] for row in cursor.fetchall()]
aliquot_list = []

return PatientDetails(clinical_data=clinical_data_item, samples=sample_list, aliquots=aliquot_list)

Expand Down
Loading

0 comments on commit e205014

Please sign in to comment.