Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_digest():
pytest.importorskip("Bio")
fasta_records = bioframe.load_fasta(testdir+"/test_data/test.fa")
assert len(fasta_records) == 2
### no HindIII sites in the test.fa fasta records, so shouldn't change shape[0]
assert bioframe.digest(fasta_records, "HindIII").shape == (2, 3)
### one DpnII site on chrTEST2, shape[0] should increase by one
assert bioframe.digest(fasta_records, "DpnII").shape == (3, 3)
### DpnII site is on chrTEST2 position 3, first interval of chrTEST2 should end at 3
assert bioframe.digest(fasta_records, "DpnII").iloc[1].end == 3
def test_digest():
pytest.importorskip("Bio")
fasta_records = bioframe.load_fasta(testdir+"/test_data/test.fa")
assert len(fasta_records) == 2
### no HindIII sites in the test.fa fasta records, so shouldn't change shape[0]
assert bioframe.digest(fasta_records, "HindIII").shape == (2, 3)
### one DpnII site on chrTEST2, shape[0] should increase by one
assert bioframe.digest(fasta_records, "DpnII").shape == (3, 3)
### DpnII site is on chrTEST2 position 3, first interval of chrTEST2 should end at 3
assert bioframe.digest(fasta_records, "DpnII").iloc[1].end == 3
def test_digest():
pytest.importorskip("Bio")
fasta_records = bioframe.load_fasta(testdir+"/test_data/test.fa")
assert len(fasta_records) == 2
### no HindIII sites in the test.fa fasta records, so shouldn't change shape[0]
assert bioframe.digest(fasta_records, "HindIII").shape == (2, 3)
### one DpnII site on chrTEST2, shape[0] should increase by one
assert bioframe.digest(fasta_records, "DpnII").shape == (3, 3)
### DpnII site is on chrTEST2 position 3, first interval of chrTEST2 should end at 3
assert bioframe.digest(fasta_records, "DpnII").iloc[1].end == 3