-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
count multiple clinical classification records
- Loading branch information
1 parent
b227f46
commit 6feecc8
Showing
8 changed files
with
57 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
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.
Binary file modified
BIN
-182 Bytes
(96%)
tests/clinvar_xml_io/resources/test_clinvar_dataset.xml.gz
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from cmat.clinvar_xml_io import ClinVarDataset | ||
from cmat.clinvar_xml_io.clinical_classification import MultipleClinicalClassificationsError | ||
|
||
resources_dir = os.path.join(os.path.dirname(__file__), 'resources') | ||
|
||
|
||
def test_multiple_clinical_classifications_record(): | ||
# input dataset with only one record | ||
input_file = os.path.join(resources_dir, 'multiple_classifications.xml.gz') | ||
record = next(iter(ClinVarDataset(input_file))) | ||
|
||
assert len(record.clinical_classifications) == 2 | ||
assert set(cc.type for cc in record.clinical_classifications) == {'GermlineClassification', 'SomaticClinicalImpact'} | ||
with pytest.raises(MultipleClinicalClassificationsError): | ||
print(record.valid_clinical_significances) |
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