-
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.
initial commit of codon-based trimming
- Loading branch information
1 parent
de1855c
commit b2bb0da
Showing
17 changed files
with
189 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
>1 | ||
A-G | ||
>2 | ||
A-G | ||
>3 | ||
A-G | ||
>4 | ||
AGA | ||
>5 | ||
ACa |
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,44 @@ | ||
import pytest | ||
from pathlib import Path | ||
|
||
from clipkit.clipkit import execute | ||
from clipkit.files import FileFormat | ||
from clipkit.modes import TrimmingMode | ||
from clipkit.settings import DEFAULT_AA_GAP_CHARS, DEFAULT_NT_GAP_CHARS | ||
|
||
here = Path(__file__) | ||
|
||
|
||
@pytest.mark.integration | ||
class TestCodonOut(object): | ||
def test_simple_codon(self): | ||
""" | ||
test codon | ||
usage: clipkit simple.fa -co | ||
""" | ||
output_file = "output/simple.fa_gappy_codon" | ||
|
||
kwargs = dict( | ||
input_file=f"{here.parent}/samples/simple.fa", | ||
output_file=output_file, | ||
input_file_format="fasta", | ||
output_file_format="fasta", | ||
sequence_type=None, | ||
complement=False, | ||
codon=True, | ||
gaps=0.2, | ||
mode=TrimmingMode.gappy, | ||
use_log=False, | ||
gap_characters=DEFAULT_NT_GAP_CHARS, | ||
quiet=True, | ||
) | ||
|
||
execute(**kwargs) | ||
|
||
with open(f"{here.parent}/expected/simple.fa_gappy_codon", "r") as expected: | ||
expected_content = expected.read() | ||
|
||
with open(output_file, "r") as out_file: | ||
output_content = out_file.read() | ||
|
||
assert expected_content == output_content |
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
Oops, something went wrong.