@@ -32,7 +32,7 @@ def process_file(self, conn, cursor, data_filepath, copy_statement):
32
32
"""
33
33
34
34
# Determine if we need to drop the last column (PPI network type)
35
- if self .network_mode == Constants .PPI_NETWORK_MODE and data_filepath == Constants .MISSING_PPI_GENE_DATA_FILEPATH :
35
+ if self .network_mode == Constants .PPI_NETWORK_MODE and data_filepath == Constants .GENE_DATA_FILEPATH :
36
36
print ("Dropping the regulator column from the input data..." )
37
37
processed_rows = []
38
38
@@ -72,12 +72,11 @@ class GeneDataPopulator(DataPopulator):
72
72
def __init__ (self , db_url , network_mode ):
73
73
super ().__init__ (db_url )
74
74
self .network_mode = network_mode
75
+ self .filepath = Constants .GENE_DATA_FILEPATH
75
76
if network_mode == Constants .GRN_NETWORK_MODE :
76
77
self .database_namespace = Constants .GRN_DATABASE_NAMESPACE
77
- self .filepath = Constants .MISSING_GRN_GENE_DATA_FILEPATH
78
78
elif network_mode == Constants .PPI_NETWORK_MODE :
79
79
self .database_namespace = Constants .PPI_DATABASE_NAMESPACE
80
- self .filepath = Constants .MISSING_PPI_GENE_DATA_FILEPATH
81
80
else :
82
81
raise ValueError (f"Unknown network type: { network_mode } " )
83
82
@@ -92,7 +91,7 @@ def get_copy_statement(self):
92
91
class ProteinDataPopulator (DataPopulator ):
93
92
def __init__ (self , db_url ):
94
93
super ().__init__ (db_url )
95
- self .filepath = Constants .MISSING_PROTEIN_DATA_FILEPATH
94
+ self .filepath = Constants .PROTEIN_DATA_FILEPATH
96
95
97
96
def get_copy_statement (self ):
98
97
return f"COPY { Constants .PPI_DATABASE_NAMESPACE } .protein (standard_name, gene_systematic_name, length, molecular_weight, PI, taxon_id, time_stamp, source) FROM stdin WITH CSV DELIMITER E'\\ t' HEADER;"
0 commit comments