def test_map_sequence_to_gene_expression_chry(self):
     gene_expression_manager = GeneExpressionManager()
     gene_expression_manager.load_gene_expression_data()
     # retrieve first row as expected row
     expected_row = gene_expression_manager.iso_gene_expression_data[1][None, :]
     # pass expected row sequence no to function
     sequence_no = expected_row[0][0]
     result_row = gene_expression_manager.map_sequence_to_gene_expression(sequence_no)
     self.assertEqual(expected_row.tolist(), result_row.tolist())
 def test_load_gene_expression_data_ehux(self):
     gene_expression_manager = GeneExpressionManager()
     gene_expression_manager.load_gene_expression_data()
     ehux_result_count = len(gene_expression_manager.ehux_gene_expression_data)
     expected_count = 24203
     self.assertEqual(ehux_result_count, expected_count)
 def test_load_gene_expression_data_for_geph(self):
     gene_expression_manager = GeneExpressionManager()
     gene_expression_manager.load_gene_expression_data()
     geph_result_count = len(gene_expression_manager.geph_gene_expression_data)
     expected_count = 24552
     self.assertEqual(geph_result_count, expected_count)
 def test_load_gene_expression_data_for_iso(self):
     gene_expression_manager = GeneExpressionManager()
     gene_expression_manager.load_gene_expression_data()
     iso_result_count = len(gene_expression_manager.iso_gene_expression_data)
     expected_count = 14703
     self.assertEqual(iso_result_count, expected_count)
            ax1.legend()
            if len(self.network_geph_gene_expression) > 0:
                ax3.errorbar(self.network_iso_gene_expression[:, 1], self.network_iso_gene_expression[:, 4],
                         xerr=self.network_iso_gene_expression[:, 3], yerr=self.network_iso_gene_expression[:, 6],
                         linestyle='None', fmt='o', label="Iso")
                ax3.legend()
            fig.subplots_adjust(hspace=0)
        # show all plots
        plt.show()


if __name__ == "__main__":
    # Instantiate Gene Expression Manager object
    gene_expression_manager = GeneExpressionManager()
    # LOAD Gene Expression data
    gene_expression_manager.load_gene_expression_data()

    # Create Object of Class
    objNwGE = SilixNetworkGeneExpression(gene_expression_manager)
    # Provide Network File path and output folder path
    objNwGE.silix_nw_file_path = "../data/additiona_analysis/hapto_networks_components.txt"
    objNwGE.output_silix_nw_exp_data_folder_path = "../output/hapto_networks/gene_expr/"
    #objNwGE.silix_nw_file_path = "../output/silix/more_than_six_nodes/node_data_geph_ehux.txt"
    #objNwGE.output_silix_nw_exp_data_folder_path = "../output/silix_more_than_six_nodes/gene_expr/"

    # LOAD Network Cluster data
    objNwGE.load_network_data()

    # MAP Network sequences to gene expression sequences
    objNwGE.map_network_to_gene_expression()