|
8 | 8 |
|
9 | 9 | from genie.example_filetype_format import FileTypeFormat |
10 | 10 | from genie import load, process_functions, validate |
11 | | -from synapseclient.models import query |
12 | 11 |
|
13 | 12 | LOGGER = logging.getLogger(__name__) |
14 | 13 |
|
@@ -513,6 +512,7 @@ def _process(self, beddf, seq_assay_id, newpath, parentid, create_panel=True): |
513 | 512 | """ |
514 | 513 | seq_assay_id = seq_assay_id.upper() |
515 | 514 | seq_assay_id = seq_assay_id.replace("_", "-") |
| 515 | + |
516 | 516 | # Add in 6th column which is the clinicalReported |
517 | 517 | if len(beddf.columns) > 5: |
518 | 518 | if all(beddf[5].apply(lambda x: x in [True, False])): |
@@ -548,8 +548,9 @@ def _process(self, beddf, seq_assay_id, newpath, parentid, create_panel=True): |
548 | 548 | # Change all start and end to int |
549 | 549 | beddf["Start_Position"] = beddf["Start_Position"].apply(int) |
550 | 550 | beddf["End_Position"] = beddf["End_Position"].apply(int) |
551 | | - gene_position_table = query("SELECT * FROM syn11806563") |
552 | | - gene_positiondf = gene_position_table.convert_dtypes() |
| 551 | + |
| 552 | + gene_position_table = self.syn.tableQuery("SELECT * FROM syn11806563") |
| 553 | + gene_positiondf = gene_position_table.asDataFrame() |
553 | 554 | beddf["ID"] = beddf["Hugo_Symbol"] |
554 | 555 | # The apply function of a DataFrame is called twice on the first |
555 | 556 | # row (known pandas behavior) |
@@ -685,11 +686,12 @@ def _validate(self, beddf): |
685 | 686 | total_error += error |
686 | 687 |
|
687 | 688 | if to_validate_symbol: |
688 | | - gene_position_table = query("SELECT * FROM syn11806563") |
689 | | - gene_positiondf = gene_position_table.convert_dtypes() |
| 689 | + gene_position_table = self.syn.tableQuery("SELECT * FROM syn11806563") |
| 690 | + gene_positiondf = gene_position_table.asDataFrame() |
690 | 691 | # The apply function of a DataFrame is called twice on the first row (known |
691 | 692 | # pandas behavior) |
692 | 693 | beddf = beddf.apply(lambda x: remap_symbols(x, gene_positiondf), axis=1) |
| 694 | + |
693 | 695 | if any(beddf["Hugo_Symbol"].isnull()): |
694 | 696 | warning += ( |
695 | 697 | "BED file: " |
|
0 commit comments