-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
a23416d
commit 2600b2e
Showing
2 changed files
with
47 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
from click.testing import CliRunner | ||
from splicemap.splice_map import SpliceMap | ||
from splicemap.main import splicemap_download | ||
|
||
from splicemap.main import splicemap_download, gtex_v8_tissues | ||
import os | ||
|
||
def tests_download_splicemap(tmp_path): | ||
runner = CliRunner() | ||
|
||
result = runner.invoke(splicemap_download, f'--version _test --splicemap_dir {str(tmp_path)}') | ||
result = runner.invoke(splicemap_download, f'--version gtex_v8 --splicemap_dir {str(tmp_path)}') | ||
assert result.exit_code == 0 | ||
|
||
sm = SpliceMap.read_csv(str(tmp_path)) | ||
assert sm.df.shape[0] > 0 | ||
|
||
for tissue in gtex_v8_tissues: | ||
for psi in ['psi5', 'psi3']: | ||
sm = SpliceMap.read_csv(os.path.join( | ||
tmp_path, | ||
f'{tissue}_splicemap_{psi}_method=kn_event_filter=median_cutoff.csv.gz')) | ||
assert sm.df.shape[0] > 0 | ||
|
||
def tests_download_splicemap_single_tissue(tmp_path): | ||
runner = CliRunner() | ||
|
||
result = runner.invoke( | ||
splicemap_download, f'--version gtex_v8 --splicemap_dir {str(tmp_path)} --tissues Whole_Blood --tissues Lung') | ||
assert result.exit_code == 0 | ||
|
||
for tissue in ['Whole_Blood', 'Lung']: | ||
for psi in ['psi5', 'psi3']: | ||
sm = SpliceMap.read_csv(os.path.join( | ||
tmp_path, | ||
f'{tissue}_splicemap_{psi}_method=kn_event_filter=median_cutoff.csv.gz')) | ||
assert sm.df.shape[0] > 0 |