Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Add methods for extracting data from fusion callers #230

Merged
merged 23 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
330 changes: 253 additions & 77 deletions src/fusor/fusion_caller_models.py
jarbesfeld marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/fusor/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ async def from_arriba(
eventType=EventType("read-through"),
eventDescription=arriba.confidence,
)
if "read_through" in arriba.event
if "read_through" in arriba.event_type
else CausativeEvent(
eventType=EventType("rearrangement"),
eventDescription=arriba.confidence,
Expand Down
9 changes: 9 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

import asyncio
import logging
from pathlib import Path

import pytest
from cool_seq_tool.app import CoolSeqTool

from fusor.fusor import FUSOR
from fusor.translator import Translator

FIXTURE_DATA_DIR = Path(__file__).parents[0].resolve() / "fixtures"


def pytest_addoption(parser):
"""Add custom commands to pytest invocation.
Expand Down Expand Up @@ -39,6 +42,12 @@ def event_loop():
loop.close()


@pytest.fixture(scope="session")
def fixture_data_dir():
"""Provide test data directory."""
return FIXTURE_DATA_DIR


@pytest.fixture(scope="session")
def fusor_instance():
"""Create test fixture for fusor object
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/annotated.fusion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sample geneA chrA posA ortA featureA geneB chrB posB ortB featureB sv_ort readsA readsB matchA matchB repeatA repeatB coverageA coverageB ratioA ratioB qposA qposB total_readsA total_readsB contig type
test TCF3 chr19 1619111 - coding PBX1 chr1 164792493 + coding > 62 78 98 93 0.00 0.00 1145 1756 0.38 0.77 98 97 399 227 CCTCGCAGGCAGCACCAGCCTCATGCACAACCACGCGGCCCTCCCCAGCCAGCCAGGCACCCTCCCTGACCTGTCTCGGCCTCCCGACTCCTACAGTGTTTTGAGTATCCGAGGAGCCCAGGAGGAGGAACCCACAGACCCCCAGCTGATGCGGCTGGACAACATGCTGTTAGCGGAAGGCGTGGCGGGGG CTX
2 changes: 2 additions & 0 deletions tests/fixtures/enfusion_test.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Gene1 Gene2 Chr1 Chr2 Break1 Break2 FusionJunctionSequence
0 TPM3 PDGFRB 1 5 154170465 150126612 ATATATCTAGAG|ATAGACAGATAGAT
356 changes: 356 additions & 0 deletions tests/fixtures/final-list_candidate-fusion-genes.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tests/fixtures/fusions_arriba_test.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#gene1 gene2 strand1(gene/fusion) strand2(gene/fusion) breakpoint1 breakpoint2 site1 site2 type split_reads1 split_reads2 discordant_mates coverage1 coverage2 confidence reading_frame tags retained_protein_domains closest_genomic_breakpoint1 closest_genomic_breakpoint2 gene_id1 gene_id2 transcript_id1 transcript_id2 direction1 direction2 filters fusion_transcript peptide_sequence read_identifiers
BCR ABL1 +/+ +/+ 22:23632600 9:133729451 CDS/splice-site CDS/splice-site translocation 4 7 0 4 12 high in-frame Mitelman Bcr-Abl_oncoprotein_oligomerisation_domain(100%),C2_domain(100%),PH_domain(100%),RhoGEF_domain(100%)|F-actin_binding(100%),Protein_kinase_domain(100%),SH2_domain(100%),SH3_domain(100%),Variant_SH3_domain(100%) . . ENSG00000186716.15 ENSG00000097007.13 ENST00000305877.8 ENST00000372348.2 downstream upstream . AGCTTCTCCCTGACATCCGTGGAGCTGCAGATGCTGACCAACTCGTGTGTGAAACTCCAGACTGTCCACAGCATTCCGCTGACCATCAATAAGGAAG___ATGATGAGTCTCCGGGGCTCTATGGGTTTCTGAATGTCATCGTCCACTCAGCCACTGGATTTAAGCAGAGTTCAA|AAGCCCTTCAGCGGCCAGTAGCATCTGACTTTGAGCCTCAGGGTCTGAGTGAAGCCGCTCGTTGGAACTCCAAGGAAAACCTTCTCGCTGGACCCAGTGAAAATGACCCCAACCTTTTCGTTGCACTGTATGATTTTGTGGCCAGTGGAGATAACACTCTAAGCATAACTAAAG___GTGAAAAGCTCCGGG SFSLTSVELQMLTNSCVKLQTVHSIPLTINKEDDESPGLYGFLNVIVHSATGFKQSS|kALQRPVASDFEPQGLSEAARWNSKENLLAGPSENDPNLFVALYDFVASGDNTLSITKGEKLR BCR-ABL1-10,BCR-ABL1-2,BCR-ABL1-24,BCR-ABL1-28,BCR-ABL1-58,BCR-ABL1-60,BCR-ABL1-76,BCR-ABL1-12,BCR-ABL1-18,BCR-ABL1-4,BCR-ABL1-66
2 changes: 2 additions & 0 deletions tests/fixtures/genie_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Site1_Hugo_Symbol Site2_Hugo_Symbol Site1_Chromosome Site2_Chromosome Site1_Position Site2_Position Site2_Effect_On_Frame Annotation
TPM3 PDGFRB 1 5 154170465 150126612 In_frame TMP3 (NM_152263.4) - PDGFRB (NM_002609.4) fusion
492 changes: 492 additions & 0 deletions tests/fixtures/jaffa_results.csv

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions tests/fixtures/star-fusion.fusion_predictions.abridged.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#FusionName JunctionReadCount SpanningFragCount SpliceType LeftGene LeftBreakpoint RightGene RightBreakpoint LargeAnchorSupport FFPM LeftBreakDinuc LeftBreakEntropy RightBreakDinuc RightBreakEntropy annots
KIF5B--RET 286 27 ONLY_REF_SPLICE KIF5B^ENSG00000170759.10 chr10:32017143:- RET^ENSG00000165731.18 chr10:43114480:+ YES_LDAS 3.2247 GT 1.9656 AG 1.9656 ["ChimerKB","ChimerPub","Cosmic","ChimerSeq","INTRACHROMOSOMAL[chr10:11.02Mb]"]
EML4--ALK 219 39 ONLY_REF_SPLICE EML4^ENSG00000143924.18 chr2:42295516:+ ALK^ENSG00000171094.17 chr2:29223528:- YES_LDAS 2.6581 GT 1.6895 AG 1.9086 ["Klijn_CellLines","GUO2018CR_TCGA","HaasMedCancer","TCGA_StarF2019","CCLE_StarF2019","chimerdb_pubmed","ChimerSeq","ChimerKB","TumorFusionsNAR2018","Cosmic","YOSHIHARA_TCGA","ChimerPub","INTRACHROMOSOMAL[chr2:12.25Mb]"]
ETV6--NTRK3 212 26 ONLY_REF_SPLICE ETV6^ENSG00000139083.10 chr12:11869969:+ NTRK3^ENSG00000140538.16 chr15:87940753:- YES_LDAS 2.452 GT 1.7819 AG 1.9656 ["TCGA_StarF2019","HaasMedCancer","GUO2018CR_TCGA","chimerdb_omim","Cosmic","YOSHIHARA_TCGA","TumorFusionsNAR2018","ChimerPub","Larsson_TCGA","ChimerKB","ChimerSeq","chimerdb_pubmed","INTERCHROMOSOMAL[chr12--chr15]"]
LMNA--NTRK1 196 34 ONLY_REF_SPLICE LMNA^ENSG00000160789.19 chr1:156130773:+ NTRK1^ENSG00000198400.11 chr1:156874906:+ YES_LDAS 2.3696 GT 1.7465 AG 1.5058 ["ChimerKB","Cosmic","TCGA_StarF2019","ChimerPub","INTRACHROMOSOMAL[chr1:0.68Mb]"]
FGFR3--TACC3 196 25 ONLY_REF_SPLICE FGFR3^ENSG00000068078.18 chr4:1806934:+ TACC3^ENSG00000013810.18 chr4:1739702:+ YES_LDAS 2.2769 GT 1.8892 AG 1.7819 ["Cosmic","ChimerPub","YOSHIHARA_TCGA","TumorFusionsNAR2018","ChimerKB","ChimerSeq","CCLE_StarF2019","TCGA_StarF2019","GUO2018CR_TCGA","Klijn_CellLines","INTRACHROMOSOMAL[chr4:0.05Mb]","LOCAL_REARRANGEMENT:+:[48117]"]
NCOA4--RET 183 20 ONLY_REF_SPLICE NCOA4^ENSG00000266412.5 chr10:46012883:- RET^ENSG00000165731.18 chr10:43116584:+ YES_LDAS 2.0915 GT 1.9086 AG 1.8323 ["GUO2018CR_TCGA","HaasMedCancer","TCGA_StarF2019","ChimerSeq","ChimerKB","YOSHIHARA_TCGA","Cosmic","ChimerPub","TumorFusionsNAR2018","chimerdb_pubmed","INTRACHROMOSOMAL[chr10:2.87Mb]"]
TPM3--NTRK1 135 16 ONLY_REF_SPLICE TPM3^ENSG00000143549.19 chr1:154170400:- NTRK1^ENSG00000198400.11 chr1:156874571:+ YES_LDAS 1.5556 GT 1.9329 AG 1.6895 ["ChimerSeq","ChimerPub","Cosmic","TumorFusionsNAR2018","ChimerKB","CCLE_StarF2019","chimerdb_pubmed","Klijn_CellLines","TCGA_StarF2019","HaasMedCancer","INTRACHROMOSOMAL[chr1:2.62Mb]"]
PAX8--PPARG 116 15 ONLY_REF_SPLICE PAX8^ENSG00000125618.16 chr2:113235394:- PPARG^ENSG00000132170.20 chr3:12379704:+ YES_LDAS 1.3496 GT 1.8295 AG 1.9329 ["chimerdb_omim","GUO2018CR_TCGA","HaasMedCancer","TCGA_StarF2019","chimerdb_pubmed","ChimerSeq","ChimerKB","Cosmic","Mitelman","YOSHIHARA_TCGA","ChimerPub","TumorFusionsNAR2018","INTERCHROMOSOMAL[chr2--chr3]"]
SLC45A3--BRAF 119 0 ONLY_REF_SPLICE SLC45A3^ENSG00000158715.5 chr1:205680394:- BRAF^ENSG00000157764.13 chr7:140794467:- YES_LDAS 1.226 GT 1.5628 AG 1.7465 ["ChimerSeq","ChimerPub","Cosmic","ChimerKB","INTERCHROMOSOMAL[chr1--chr7]"]
FGFR3--BAIAP2L1 111 13 ONLY_REF_SPLICE FGFR3^ENSG00000068078.18 chr4:1806934:+ BAIAP2L1^ENSG00000006453.13 chr7:98362432:- YES_LDAS 1.2775 GT 1.8892 AG 1.8062 ["CCLE_StarF2019","Klijn_CellLines","ChimerPub","Cosmic","ChimerKB","INTERCHROMOSOMAL[chr4--chr7]"]
SLC34A2--ROS1 77 26 ONLY_REF_SPLICE SLC34A2^ENSG00000157765.12 chr4:25664330:+ ROS1^ENSG00000047936.10 chr6:117324415:- YES_LDAS 1.0612 GT 1.8892 AG 1.7465 ["Cosmic","ChimerPub","ChimerKB","ChimerSeq","chimerdb_pubmed","CCLE_StarF2019","TCGA_StarF2019","GUO2018CR_TCGA","Klijn_CellLines","INTERCHROMOSOMAL[chr4--chr6]"]
CD74--ROS1 58 6 ONLY_REF_SPLICE CD74^ENSG00000019582.14 chr5:150404680:- ROS1^ENSG00000047936.10 chr6:117324415:- YES_LDAS 0.6593 GT 1.7819 AG 1.7465 ["ChimerPub","Cosmic","TumorFusionsNAR2018","ChimerKB","ChimerSeq","chimerdb_pubmed","TCGA_StarF2019","GUO2018CR_TCGA","Klijn_CellLines","INTERCHROMOSOMAL[chr5--chr6]"]
RN7SKP80--RN7SKP118 33 0 INCL_NON_REF_SPLICE RN7SKP80^ENSG00000202058.1 chr22:42565086:- RN7SKP118^ENSG00000201201.1 chr16:67321742:- YES_LDAS 0.34 TT 1.9656 CG 1.8256 ["TCGA_StarF2019","CCLE_StarF2019","INTERCHROMOSOMAL[chr22--chr16]"]
EGFR--SEPT14 9 13 ONLY_REF_SPLICE EGFR^ENSG00000146648.17 chr7:55200413:+ SEPT14^ENSG00000154997.8 chr7:55796092:- YES_LDAS 0.2266 GT 1.8892 AG 1.9899 ["GUO2018CR_TCGA","TCGA_StarF2019","YOSHIHARA_TCGA","INTRACHROMOSOMAL[chr7:0.58Mb]"]
AC021660.2--GPR15 8 0 INCL_NON_REF_SPLICE AC021660.2^ENSG00000248839.1 chr3:98525247:+ GPR15^ENSG00000154165.4 chr3:98532009:+ YES_LDAS 0.0824 CT 1.8892 AC 1.9656 ["INTRACHROMOSOMAL[chr3:0.01Mb]","NEIGHBORS[6565]"]
EEF1A1P13--EFHC1 6 0 INCL_NON_REF_SPLICE EEF1A1P13^ENSG00000250182.3 chr5:14651703:- EFHC1^ENSG00000096093.15 chr6:52482342:+ YES_LDAS 0.0618 CA 1.7056 CT 0.3534 ["INTERCHROMOSOMAL[chr5--chr6]"]
AC098590.1--AC099789.1 5 0 INCL_NON_REF_SPLICE AC098590.1^ENSG00000213851.3 chr4:43410174:- AC099789.1^ENSG00000225475.1 chr1:56619540:- YES_LDAS 0.0515 CT 1.8323 AC 1.6049 ["CCLE_StarF2019","INTERCHROMOSOMAL[chr4--chr1]"]
RPL14--USP27X-AS1 5 0 INCL_NON_REF_SPLICE RPL14^ENSG00000188846.13 chr3:40462056:+ USP27X-AS1^ENSG00000234390.4 chrX:49877691:- YES_LDAS 0.0515 CT 1.5850 TC 1.5850 ["INTERCHROMOSOMAL[chr3--chrX]"]
TMPRSS2--ERG 5 0 ONLY_REF_SPLICE TMPRSS2^ENSG00000184012.11 chr21:41508081:- ERG^ENSG00000157554.18 chr21:38584945:- YES_LDAS 0.0515 GT 1.6895 AG 1.9219 ["ChimerSeq","Cosmic","ChimerPub","YOSHIHARA_TCGA","TumorFusionsNAR2018","Larsson_TCGA","ChimerKB","CCLE_StarF2019","chimerdb_pubmed","GUO2018CR_TCGA","TCGA_StarF2019","INTRACHROMOSOMAL[chr21:2.80Mb]"]
LINC00158--AP001341.1 3 1 ONLY_REF_SPLICE LINC00158^ENSG00000185433.8 chr21:25420708:- AP001341.1^ENSG00000222042.1 chr21:25175445:- YES_LDAS 0.0412 GT 1.9086 AG 1.4295 ["TCGA_StarF2019","INTRACHROMOSOMAL[chr21:0.05Mb]","NEIGHBORS[51995]"]
AC021660.2--GPR15 3 0 INCL_NON_REF_SPLICE AC021660.2^ENSG00000248839.1 chr3:98525260:+ GPR15^ENSG00000154165.4 chr3:98532011:+ YES_LDAS 0.0309 AT 1.6895 CA 1.8892 ["INTRACHROMOSOMAL[chr3:0.01Mb]","NEIGHBORS[6565]"]
AC021660.2--GPR15 3 0 INCL_NON_REF_SPLICE AC021660.2^ENSG00000248839.1 chr3:98525337:+ GPR15^ENSG00000154165.4 chr3:98532012:+ YES_LDAS 0.0309 GA 1.5058 AG 1.8892 ["INTRACHROMOSOMAL[chr3:0.01Mb]","NEIGHBORS[6565]"]
CLSPN--C1orf216 3 0 INCL_NON_REF_SPLICE CLSPN^ENSG00000092853.13 chr1:35720748:- C1orf216^ENSG00000142686.7 chr1:35719497:- YES_LDAS 0.0309 TG 1.5656 CG 1.6729 ["INTRACHROMOSOMAL[chr1:0.00Mb]","NEIGHBORS[746]"]
ENO1--PDE6A 3 0 INCL_NON_REF_SPLICE ENO1^ENSG00000074800.15 chr1:8867988:- PDE6A^ENSG00000132915.10 chr5:149867239:- YES_LDAS 0.0309 GT 1.4256 TG 1.8295 ["INTERCHROMOSOMAL[chr1--chr5]"]
RF00100--RN7SKP76 3 0 INCL_NON_REF_SPLICE RF00100^ENSG00000202198.1 chr6:52995864:+ RN7SKP76^ENSG00000201289.1 chr16:61743234:- YES_LDAS 0.0309 TT 1.9656 AT 1.8256 ["INTERCHROMOSOMAL[chr6--chr16]"]
RN7SK--RN7SKP76 3 0 INCL_NON_REF_SPLICE RN7SK^ENSG00000283293.1 chr6:52995864:+ RN7SKP76^ENSG00000201289.1 chr16:61743234:- YES_LDAS 0.0309 TT 1.9656 AT 1.8256 ["INTERCHROMOSOMAL[chr6--chr16]"]
EPSTI1--TGS1 2 0 ONLY_REF_SPLICE EPSTI1^ENSG00000133106.14 chr13:42991978:- TGS1^ENSG00000137574.10 chr8:55790182:+ YES_LDAS 0.0206 GT 1.3996 AG 1.9086 ["INTERCHROMOSOMAL[chr13--chr8]"]
KLHL18--ELP6 2 0 ONLY_REF_SPLICE KLHL18^ENSG00000114648.11 chr3:47322708:+ ELP6^ENSG00000163832.15 chr3:47511226:- YES_LDAS 0.0206 GT 1.9899 AG 1.9656 ["INTRACHROMOSOMAL[chr3:0.15Mb]"]
MCOLN2--NEK7 2 0 ONLY_REF_SPLICE MCOLN2^ENSG00000153898.12 chr1:84997008:- NEK7^ENSG00000151414.14 chr1:198232553:+ YES_LDAS 0.0206 GT 1.5301 AG 1.8892 ["INTRACHROMOSOMAL[chr1:113.16Mb]"]
PLEC--TSPAN4 2 0 ONLY_REF_SPLICE PLEC^ENSG00000178209.15 chr8:143950184:- TSPAN4^ENSG00000214063.10 chr11:850288:+ YES_LDAS 0.0206 GT 1.6729 AG 1.9329 ["INTERCHROMOSOMAL[chr8--chr11]"]
SEPT2--SFI1 2 0 ONLY_REF_SPLICE SEPT2^ENSG00000168385.17 chr2:241315982:+ SFI1^ENSG00000198089.15 chr22:31607937:+ YES_LDAS 0.0206 GT 1.4566 AG 1.8062 ["INTERCHROMOSOMAL[chr2--chr22]"]
SNX25--NEK1 2 0 ONLY_REF_SPLICE SNX25^ENSG00000109762.15 chr4:185320864:+ NEK1^ENSG00000137601.16 chr4:169590809:- YES_LDAS 0.0206 GT 1.7232 AG 1.6402 ["INTRACHROMOSOMAL[chr4:15.59Mb]"]
UBE2K--FAM208A 2 0 ONLY_REF_SPLICE UBE2K^ENSG00000078140.13 chr4:39755739:+ FAM208A^ENSG00000163946.13 chr3:56628614:- YES_LDAS 0.0206 GT 1.9219 AG 1.6895 ["INTERCHROMOSOMAL[chr4--chr3]"]
XXYLT1-AS2--RNF145 2 0 ONLY_REF_SPLICE XXYLT1-AS2^ENSG00000230266.1 chr3:195148105:+ RNF145^ENSG00000145860.11 chr5:159174158:- YES_LDAS 0.0206 GT 1.8256 AG 1.5656 ["INTERCHROMOSOMAL[chr3--chr5]"]
NSF--AC091132.5 1 1 ONLY_REF_SPLICE NSF^ENSG00000073969.18 chr17:46704854:+ AC091132.5^ENSG00000267246.1 chr17:45551537:- YES_LDAS 0.0206 GT 1.6729 AG 1.9329 ["INTRACHROMOSOMAL[chr17:1.03Mb]"]
TXNDC11--SNX29 1 1 ONLY_REF_SPLICE TXNDC11^ENSG00000153066.12 chr16:11730645:- SNX29^ENSG00000048471.13 chr16:12524702:+ YES_LDAS 0.0206 GT 1.9086 AG 1.9086 ["INTRACHROMOSOMAL[chr16:0.23Mb]"]
UBE2R2--WNK1 1 1 ONLY_REF_SPLICE UBE2R2^ENSG00000107341.4 chr9:33817934:+ WNK1^ENSG00000060237.16 chr12:813642:+ YES_LDAS 0.0206 GT 1.9656 AG 1.7232 ["INTERCHROMOSOMAL[chr9--chr12]"]
99 changes: 99 additions & 0 deletions tests/test_fusion_caller_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
"""Module for testing fusion caller classes"""

from pathlib import Path

import pytest

from fusor.fusion_caller_models import (
JAFFA,
Arriba,
Cicero,
EnFusion,
FusionCatcher,
Genie,
STARFusion,
)


def test_get_jaffa_records(fixture_data_dir):
"""Test that get_jaffa_records works correctly"""
path = Path(fixture_data_dir / "jaffa_results.csv")
jaffa_instance = JAFFA()
records = jaffa_instance.load_records(path)
assert len(records) == 491

path = Path(fixture_data_dir / "jaffa_resultss.csv")
with pytest.raises(ValueError, match=f"{path} does not exist"):
assert jaffa_instance.load_records(path)


def test_get_star_fusion_records(fixture_data_dir):
"""Test that get_star_fusion_records works correctly"""
path = Path(fixture_data_dir / "star-fusion.fusion_predictions.abridged.tsv")
sf_instance = STARFusion()
records = sf_instance.load_records(path)
assert len(records) == 37

path = Path(fixture_data_dir / "star-fusion.fusion_predictions.abridged.tsvs")
with pytest.raises(ValueError, match=f"{path} does not exist"):
assert sf_instance.load_records(path)


def test_get_fusion_catcher_records(fixture_data_dir):
"""Test that get_fusion_catcher_records works correctly"""
path = Path(fixture_data_dir / "final-list_candidate-fusion-genes.txt")
fc_instance = FusionCatcher()
fusions_list = fc_instance.load_records(path)
assert len(fusions_list) == 355

path = Path(fixture_data_dir / "final-list_candidate-fusion-genes.txts")
with pytest.raises(ValueError, match=f"{path} does not exist"):
assert fc_instance.load_records(path)


def test_get_arriba_records(fixture_data_dir):
"""Test that get_arriba_records works correctly"""
path = Path(fixture_data_dir / "fusions_arriba_test.tsv")
arriba = Arriba()
fusions_list = arriba.load_records(path)
assert len(fusions_list) == 1

path = Path(fixture_data_dir / "fusionsd_arriba_test.tsv")
with pytest.raises(ValueError, match=f"{path} does not exist"):
assert arriba.load_records(path)


def test_get_cicero_records(fixture_data_dir):
"""Test that get_cicero_records works correctly"""
path = Path(fixture_data_dir / "annotated.fusion.txt")
cicero = Cicero()
fusions_list = cicero.load_records(path)
assert len(fusions_list) == 1

path = Path(fixture_data_dir / "annnotated.fusion.txt")
with pytest.raises(ValueError, match=f"{path} does not exist"):
assert cicero.load_records(path)


def test_get_enfusion_records(fixture_data_dir):
"""Test that get_enfusion_records works correctly"""
path = Path(fixture_data_dir / "enfusion_test.csv")
enfusion = EnFusion()
fusions_list = enfusion.load_records(path)
assert len(fusions_list) == 1

path = Path(fixture_data_dir / "enfusions_test.csv")
with pytest.raises(ValueError, match=f"{path} does not exist"):
assert enfusion.load_records(path)


def test_get_genie_records(fixture_data_dir):
"""Test that get_genie_records works correctly"""
path = Path(fixture_data_dir / "genie_test.txt")
genie = Genie()
fusions_list = genie.load_records(path)
assert len(fusions_list) == 1

path = Path(fixture_data_dir / "genie_tests.txt")
with pytest.raises(ValueError, match=f"{path} does not exist"):
assert genie.load_records(path)
2 changes: 1 addition & 1 deletion tests/test_translators.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ async def test_arriba(
strand2="-/-",
breakpoint1="1:154170465",
breakpoint2="5:150126612",
event="translocation",
event_type="translocation",
confidence="high",
direction1="upstream",
direction2="downstream",
Expand Down
Loading