Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'omnibem' of https://github.com/CancerRxGene/gdsctools i…
…nto omnibem
- Loading branch information
Showing
6 changed files
with
127 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,41 @@ | ||
from gdsctools.omnibem import OmniBEMBuilder | ||
from gdsctools import gdsctools_data | ||
|
||
omnibem_data = gdsctools_data("test_omnibem_genomic_alteration.csv.gz") | ||
omnibem_data = gdsctools_data("test_omnibem_genomic_alterations.csv.gz") | ||
omnibem_genes = gdsctools_data("test_omnibem_genes.txt") | ||
|
||
|
||
def test_omnibem(): | ||
ob = OmniBEMBuilder(omnibem_data) | ||
ob.filter_by_gene_list(omnibem_genes) | ||
mobem = ob.get_mobem() | ||
assert mobem[mobem.columns[3:]].sum().sum() == 4971 | ||
assert mobem[mobem.columns[3:]].sum().sum() == 57678 | ||
|
||
# | ||
ob.plot_number_alteration_by_tissue() | ||
ob.plot_alterations_per_cellline() | ||
ob.get_significant_genes() | ||
|
||
|
||
# filter by cosmic id | ||
ob = OmniBEMBuilder(omnibem_data) | ||
ob.filter_by_cosmic_list([910916]) | ||
mobem = ob.get_mobem() | ||
assert mobem.shape == (1,105) | ||
assert mobem.ix[0,3:].sum() == 102 | ||
|
||
|
||
ob = OmniBEMBuilder(omnibem_data) | ||
ob.filter_by_gene_list(omnibem_genes) | ||
ob.filter_by_type_list(["Methylation"]) | ||
mobem = ob.get_mobem() | ||
assert mobem[mobem.columns[3:]].sum().sum() == 127 | ||
assert mobem[mobem.columns[3:]].sum().sum() == 12964 | ||
|
||
ob = OmniBEMBuilder(omnibem_data) | ||
ob.filter_by_gene_list(omnibem_genes) | ||
ob.filter_by_tissue_list(["HNSC"]) | ||
mobem = ob.get_mobem() | ||
assert mobem[mobem.columns[3:]].sum().sum() == 115 | ||
assert mobem[mobem.columns[3:]].sum().sum() == 4124 | ||
|
||
ob = OmniBEMBuilder(omnibem_data) | ||
ob.filter_by_gene_list(omnibem_genes) | ||
ob.filter_by_sample_list(["SNU-423"]) | ||
#mobem = ob.get_mobem() | ||
#assert mobem[mobem.columns[3:]].sum().sum() == 4971 | ||
mobem = ob.get_mobem() | ||
assert mobem[mobem.columns[3:]].sum().sum() == 63 |