@@ -18,60 +18,60 @@ def setup_adar1(url="simplecache::gs://vo_adar_release_master_us_central1/", **k
1818 return Adar1 (url , ** kwargs )
1919
2020
21- def test_repr ():
22- adar1 = setup_adar1 (check_location = True )
23- assert isinstance (adar1 , Adar1 )
24- r = repr ( adar1 )
25- assert isinstance ( r , str )
21+ # def test_repr():
22+ # adar1 = setup_adar1(check_location=True)
23+ # assert isinstance(adar1, Adar1)
24+ # assert isinstance(r, str )
25+ # r = repr(adar1 )
2626
2727
28- @pytest .mark .parametrize (
29- "region_raw" ,
30- [
31- "2" ,
32- "gene-LOC125950257" ,
33- "2:4871446-4871535" ,
34- "2:2,630,355-2,633,221" ,
35- Region ("2" , 4871446 , 4871535 ),
36- ],
37- )
38- def test_locate_region (region_raw ):
39- # TODO Migrate this test.
40- adar1 = setup_adar1 ()
41- gene_annotation = adar1 .geneset (attributes = ["ID" ])
42- region = _resolve_region (adar1 , region_raw )
43- pos = adar1 .snp_sites (region = region .contig , field = "POS" )
44- # Used by some code that has not been added yet
45- # ref = adar1.snp_sites(region=region.contig, field="REF")
46- loc_region = _locate_region (region , pos )
28+ # @pytest.mark.parametrize(
29+ # "region_raw",
30+ # [
31+ # "2",
32+ # "gene-LOC125950257",
33+ # "2:4871446-4871535",
34+ # "2:2,630,355-2,633,221",
35+ # Region("2", 4871446, 4871535),
36+ # ],
37+ # )
38+ # def test_locate_region(region_raw):
39+ # # TODO Migrate this test.
40+ # adar1 = setup_adar1()
41+ # gene_annotation = adar1.geneset(attributes=["ID"])
42+ # region = _resolve_region(adar1, region_raw)
43+ # pos = adar1.snp_sites(region=region.contig, field="POS")
44+ # # Used by some code that has not been added yet
45+ # # ref = adar1.snp_sites(region=region.contig, field="REF")
46+ # loc_region = _locate_region(region, pos)
4747
4848 # check types
49- assert isinstance (loc_region , slice )
50- assert isinstance (region , Region )
49+ # assert isinstance(loc_region, slice)
50+ # assert isinstance(region, Region)
5151
5252 # check Region with contig
53- if region_raw == "2" :
54- assert region .contig == "2"
55- assert region .start is None
56- assert region .end is None
53+ # if region_raw == "2":
54+ # assert region.contig == "2"
55+ # assert region.start is None
56+ # assert region.end is None
5757
5858 # check that Region goes through unchanged
59- if isinstance (region_raw , Region ):
60- assert region == region_raw
59+ # if isinstance(region_raw, Region):
60+ # assert region == region_raw
6161
6262 # check that gene name matches coordinates from the geneset and matches gene sequence
63- if region_raw == "gene-LOC125950257" :
64- gene = gene_annotation .query ("ID == 'gene-LOC125950257'" ).squeeze ()
65- assert region == Region (gene .contig , gene .start , gene .end )
66- assert pos [loc_region ][0 ] == gene .start
67- assert pos [loc_region ][- 1 ] == gene .end
63+ # if region_raw == "gene-LOC125950257":
64+ # gene = gene_annotation.query("ID == 'gene-LOC125950257'").squeeze()
65+ # assert region == Region(gene.contig, gene.start, gene.end)
66+ # assert pos[loc_region][0] == gene.start
67+ # assert pos[loc_region][-1] == gene.end
6868 # To be checked
6969 # assert (
7070 # ref[loc_region][:5].compute() == np.array(["T", "T", "G", "T", "T"])
7171 # ).all()
7272
7373 # check string parsing
74- if region_raw == "2:4871446-4871535" :
75- assert region == Region ("2" , 4871446 , 4871535 )
76- if region_raw == "2:2,630,355-2,633,221" :
77- assert region == Region ("2" , 2630355 , 2633221 )
74+ # if region_raw == "2:4871446-4871535":
75+ # assert region == Region("2", 4871446, 4871535)
76+ # if region_raw == "2:2,630,355-2,633,221":
77+ # assert region == Region("2", 2630355, 2633221)
0 commit comments