def import_data_stage02_isotopomer_fittedNetFluxDifferences_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_data_stage02_isotopomer_fittedNetFluxDifferences(data.data);
     data.clear_data();
 def import_standards_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_standards(data.data);
     data.clear_data();
 def import_dataStage01IsotopomerAveragesNormSum_updateUsedAndComment(self,filename):
     '''table updates'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage01IsotopomerAveragesNormSum_usedAndComment(data.data);
     data.clear_data();
 def import_MSComponents_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_MSComponents(data.data);
     data.clear_data();
 def import_dataStage03QuantificationMetabolomicsData_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage03MetabolomicsData(data.data);
     data.clear_data();
 def import_biologicalMaterialGeneReferences_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_biologicalMaterialGeneReferences(data.data);
     data.clear_data();
 def import_biologicalMaterialDescription_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_biologicalMaterialDescription(data.data);
     data.clear_data();
 def import_dataStage01ResequencingLineage_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_dataStage01ResequencingLineage(data.data);
     data.clear_data();
 def import_dataStage01Normalized_update_unique(self,filename):
     '''table updates'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage01Normalized_unique(data.data);
     data.clear_data();
 def import_data_stage02_physiology_pairWiseTest_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_data_stage02_physiology_pairWiseTest(data.data);
     data.clear_data();
 def import_quantitationMethod_add(self,QMethod_id_I, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_quantitationMethod(QMethod_id_I, data.data);
     data.clear_data();
 def import_dataStage01RNASequencingGenesFpkmTracking_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage01RNASequencingGenesFpkmTracking(data.data);
     data.clear_data();
 def import_mutations(self,filenames_I=[]):
     """import mutations for multiple experiments/samples"""
     io = base_importData();
     for filename in filenames_I:
         io.read_csv(filename);
         self.mutations.extend(self.format_mutationData(io.data));
         io.clear_data();
 def import_dataStage02PhysiologySamplingParameters_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_dataStage02PhysiologySamplingParameters(data.data);
     data.clear_data();
 def import_data_stage03_quantification_analysis_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_data_stage03_quantification_analysis(data.data);
     data.clear_data();
 def import_dataStage01Normalized_update_id(self,filename):
     '''table updates'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage01Normalized_id(data.data,used_comment_only_I=True);
     data.clear_data();
 def import_dataStage03QuantificationSimulatedData_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_dataStage03QuantificationSimulatedData(data.data);
     data.clear_data();
    def import_geneExpDiff(
        self,
        filename_I,
        experiment_id_1_I=None,
        experiment_id_2_I=None,
        sample_name_abbreviation_1_I=None,
        sample_name_abbreviation_2_I=None,
    ):
        """import geneExpDiff
        INPUT:
        filename_I = input filename
        
        OPTIONAL INPUT:
        the following are optional for analyzing a single sample,
        but required when analyzing multiple samples

        experiment_id_1_I = string, name of the experiment that generated the samples
        experiment_id_I = string, name of the experiment that generated the samples
        sample_name_abbreviation_1_I = string, name of the sample
        sample_name_abbreviation_2_I = string, name of the sample
        """
        io = base_importData()
        io.read_tab(filename_I)
        geneExpDiff = self.format_geneExpDiff(io.data)
        for d in geneExpDiff:
            d["experiment_id_1"] = experiment_id_1_I
            d["experiment_id_2"] = experiment_id_2_I
            d["sample_name_abbreviation_1"] = sample_name_abbreviation_1_I
            d["sample_name_abbreviation_2"] = sample_name_abbreviation_2_I
        self.geneExpDiff = geneExpDiff
 def import_biologicalMaterialMassVolumeConversion_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_biologicalMaterialMassVolumeConversion(data.data);
     data.clear_data();
Example #20
0
 def import_sampleDescription_update(self, filename):
     '''table updates'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_sampleDescription(data.data);
     data.clear_data();
Example #21
0
 def import_MSSourceParameters_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_MSSourceParameters(data.data);
     data.clear_data();
 def import_dataStage01PhysiologyData_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage01PhysiologyData(data.data);
     data.clear_data();
 def import_data_stage02_isotopomer_tracers_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_data_stage02_isotopomer_tracers(data.data);
     data.clear_data();
 def import_dataStage01ResequencingHistogram_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage01ResequencingHistogram(data.data);
     data.clear_data();
 def import_standardsOrdering_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_standardsOrdering(data.data);
     data.clear_data();
 def import_dataStage01MQResultsTable_update(self,filename):
     '''table updates'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_dataStage01MQResultsTable(data.data);
     data.clear_data();
 def import_calibrationFile_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     # split into seperate data structures based on the destined table add
     sample_data = [];
     experiment_data = [];
     for d in data.data:
         sample_data.append({'sample_name':d['sample_name'],
                                     'sample_type':d['sample_type'],
                                     'calibrator_id':d['calibrator_id'],
                                     'calibrator_level':d['calibrator_level'],
                                     'sample_id':d['sample_id'],
                                     'sample_dilution':d['sample_dilution']});
         experiment_data.append({'exp_type_id':d['exp_type_id'],
                                     'id':d['experiment_id'],
                                     'sample_name':d['sample_name'],
                                     'experimentor_id':d['experimentor_id'],
                                     'extraction_method_id':d['extraction_method_id'],
                                     'acquisition_method_id':d['acquisition_method_id'],
                                     'quantitation_method_id':d['quantitation_method_id'],
                                     'internal_standard_id':d['is_id']});
     # add data to the database:
     self.add_sample(sample_data);
     self.add_experiment(experiment_data);
     # deallocate memory
     data.clear_data();
 def import_visualizationUser_update(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.update_visualizationUser(data.data);
     data.clear_data();
 def import_dataStage02PhysiologySimulation_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_dataStage02PhysiologySimulation(data.data);
     data.clear_data();    
 def import_visualizationProject_add(self, filename):
     '''table adds'''
     data = base_importData();
     data.read_csv(filename);
     data.format_data();
     self.add_visualizationProject(data.data);
     data.clear_data();