-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
75 additions
and
76 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
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,27 +1,27 @@ | ||
import pytest | ||
# import pytest | ||
|
||
from rds2py.granges import as_granges, as_granges_list | ||
from rds2py.parser import read_rds | ||
# from rds2py.granges import as_granges, as_granges_list | ||
# from rds2py.parser import read_rds | ||
|
||
from genomicranges import GenomicRanges, GenomicRangesList | ||
# from genomicranges import GenomicRanges, GenomicRangesList | ||
|
||
__author__ = "jkanche" | ||
__copyright__ = "jkanche" | ||
__license__ = "MIT" | ||
# __author__ = "jkanche" | ||
# __copyright__ = "jkanche" | ||
# __license__ = "MIT" | ||
|
||
|
||
def test_granges(): | ||
robj = read_rds("tests/data/granges.rds") | ||
# def test_granges(): | ||
# robj = read_rds("tests/data/granges.rds") | ||
|
||
gr = as_granges(robj=robj) | ||
# gr = as_granges(robj=robj) | ||
|
||
assert isinstance(gr, GenomicRanges) | ||
# assert isinstance(gr, GenomicRanges) | ||
|
||
|
||
def test_granges_list(): | ||
robj = read_rds("tests/data/grangeslist.rds") | ||
# def test_granges_list(): | ||
# robj = read_rds("tests/data/grangeslist.rds") | ||
|
||
gr = as_granges_list(robj=robj) | ||
# gr = as_granges_list(robj=robj) | ||
|
||
assert isinstance(gr, GenomicRangesList) | ||
assert len(gr) == 5 | ||
# assert isinstance(gr, GenomicRangesList) | ||
# assert len(gr) == 5 |
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,34 +1,34 @@ | ||
import pytest | ||
# import pytest | ||
|
||
from rds2py.interface import as_dense_matrix, as_sparse_matrix | ||
from rds2py.parser import read_rds | ||
import numpy as np | ||
from scipy import sparse as sp | ||
# from rds2py.interface import as_dense_matrix, as_sparse_matrix | ||
# from rds2py.parser import read_rds | ||
# import numpy as np | ||
# from scipy import sparse as sp | ||
|
||
__author__ = "jkanche" | ||
__copyright__ = "jkanche" | ||
__license__ = "MIT" | ||
# __author__ = "jkanche" | ||
# __copyright__ = "jkanche" | ||
# __license__ = "MIT" | ||
|
||
|
||
def test_read_s4_matrix_dgc(): | ||
parsed_obj = read_rds("tests/data/s4_matrix.rds") | ||
array = as_sparse_matrix(parsed_obj) | ||
# def test_read_s4_matrix_dgc(): | ||
# parsed_obj = read_rds("tests/data/s4_matrix.rds") | ||
# array = as_sparse_matrix(parsed_obj) | ||
|
||
assert array is not None | ||
assert isinstance(array, sp.spmatrix) | ||
# assert array is not None | ||
# assert isinstance(array, sp.spmatrix) | ||
|
||
|
||
def test_read_s4_matrix_dgt(): | ||
parsed_obj = read_rds("tests/data/s4_matrix_dgt.rds") | ||
array = as_sparse_matrix(parsed_obj) | ||
# def test_read_s4_matrix_dgt(): | ||
# parsed_obj = read_rds("tests/data/s4_matrix_dgt.rds") | ||
# array = as_sparse_matrix(parsed_obj) | ||
|
||
assert array is not None | ||
assert isinstance(array, sp.spmatrix) | ||
# assert array is not None | ||
# assert isinstance(array, sp.spmatrix) | ||
|
||
|
||
def test_read_dense_numpy_dtype(): | ||
parsed_obj = read_rds("tests/data/numpy_dtype.rds") | ||
array = as_dense_matrix(parsed_obj) | ||
# def test_read_dense_numpy_dtype(): | ||
# parsed_obj = read_rds("tests/data/numpy_dtype.rds") | ||
# array = as_dense_matrix(parsed_obj) | ||
|
||
assert array is not None | ||
assert isinstance(array, np.ndarray) | ||
# assert array is not None | ||
# assert isinstance(array, np.ndarray) |
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,31 +1,31 @@ | ||
import pytest | ||
# import pytest | ||
|
||
from rds2py.lib_rds import PyRdsObject | ||
# from rds2py.lib_rds import PyRdsObject | ||
|
||
__author__ = "jkanche" | ||
__copyright__ = "jkanche" | ||
__license__ = "MIT" | ||
# __author__ = "jkanche" | ||
# __copyright__ = "jkanche" | ||
# __license__ = "MIT" | ||
|
||
|
||
def test_read_s4_class(): | ||
parsed_obj = PyRdsObject("tests/data/s4_class.rds") | ||
robject_obj = parsed_obj.get_robject() | ||
array = robject_obj.realize_value() | ||
# def test_read_s4_class(): | ||
# parsed_obj = PyRdsObject("tests/data/s4_class.rds") | ||
# robject_obj = parsed_obj.get_robject() | ||
# array = robject_obj.realize_value() | ||
|
||
assert array is not None | ||
# assert array is not None | ||
|
||
|
||
def test_read_s4_matrix(): | ||
parsed_obj = PyRdsObject("tests/data/s4_matrix.rds") | ||
robject_obj = parsed_obj.get_robject() | ||
array = robject_obj.realize_value() | ||
# def test_read_s4_matrix(): | ||
# parsed_obj = PyRdsObject("tests/data/s4_matrix.rds") | ||
# robject_obj = parsed_obj.get_robject() | ||
# array = robject_obj.realize_value() | ||
|
||
assert array is not None | ||
# assert array is not None | ||
|
||
|
||
def test_read_s4_matrix_dgt(): | ||
parsed_obj = PyRdsObject("tests/data/s4_matrix_dgt.rds") | ||
robject_obj = parsed_obj.get_robject() | ||
array = robject_obj.realize_value() | ||
# def test_read_s4_matrix_dgt(): | ||
# parsed_obj = PyRdsObject("tests/data/s4_matrix_dgt.rds") | ||
# robject_obj = parsed_obj.get_robject() | ||
# array = robject_obj.realize_value() | ||
|
||
assert array is not None | ||
# assert array is not None |