Beispiel #1
0
 def read10xCountsRaw(tenx_analysis, output):
     tenx_analysis.load()
     utils = DropletUtils()
     counts = utils.read10xCounts(tenx_analysis.raw_matrices())
     sce = SingleCellExperiment.fromRS4(counts)
     sce.save(output)
     return sce
Beispiel #2
0
 def test_save_and_load_rdata(self):
     print("Reading")
     tenx = DropletUtils()
     rs4_result = tenx.read10xCounts("/home/ceglian/data/raw_gene_bc_matrices/hg19/")
     sce = SingleCellExperiment.fromRS4(rs4_result)
     print("Writing")
     sce.save("tests/sce_1.rdata")
     print("Loading...")
     sce_saved = SingleCellExperiment.fromRData("tests/sce_1.rdata")
     print(sce_saved.assays["counts"].shape)
Beispiel #3
0
 def test_symbol_retrieve(self):
     tenx = TenxAnalysis("tests/pre_igo")
     sce = TenX.read10xCounts(tenx)
     print(sce.rowData.keys())
     example_rda = os.path.join(base_dir, "tests/example_sce.rda")
     sce = SingleCellExperiment.fromRData(example_rda)
     print(sce.rowData.keys())
     tenx = DropletUtils()
     rs4_result = tenx.read10xCounts("tests/hg19/")
     sce = SingleCellExperiment.fromRS4(rs4_result)
     print(sce.rowData.keys())
     example_rda = os.path.join(base_dir, "tests/example_copy_number.rda")
     sce = SingleCellExperiment.fromRData(example_rda)
     print(sce.rowData.keys())
     print(sce.rownames)
     print(sce.colnames)
Beispiel #4
0
 def normalizeExprs(self, sce):
     res = self._normalizeExprs(sce)
     return SingleCellExperiment.fromRS4(res)
Beispiel #5
0
 def calculateQCMetrics(self, sce):
     res = self._calculateQCMetrics(sce)
     return SingleCellExperiment.fromRS4(res)
Beispiel #6
0
 def read10xCounts(path, output):
     utils = DropletUtils()
     counts = utils.read10xCounts(path)
     sce = SingleCellExperiment.fromRS4(counts)
     sce.save(output)
     return sce
Beispiel #7
0
 def test_get_assay_with_row_col_data_rs4(self):
     tenx = DropletUtils()
     rs4_results = tenx.read10xCounts(
         "/home/ceglian/data/raw_gene_bc_matrices/hg19/")
     sce_from_rs4 = SingleCellExperiment.fromRS4(rs4_results)
Beispiel #8
0
 def test_read10x_counts_load_rs4(self):
     tenx = DropletUtils()
     rs4_result = tenx.read10xCounts(
         "/home/ceglian/data/raw_gene_bc_matrices/hg19/")
     sce_from_rs4 = SingleCellExperiment.fromRS4(rs4_result)
Beispiel #9
0
 def read10xCountsFiltered(tenx_analysis, output):
     utils = DropletUtils()
     counts = utils.read10xCounts(tenx_analysis.filtered_matrices())
     sce = SingleCellExperiment.fromRS4(counts)
     sce.save(output)
     return sce
Beispiel #10
0
 def read10xCounts(tenx_analysis):
     utils = DropletUtils()
     counts = utils.read10xCounts(tenx_analysis.raw_matrices(config.build))
     sce = SingleCellExperiment.fromRS4(counts)
     return sce