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

reformat python and add new test case 16 #28

Closed
Closed
Changes from all commits
Commits
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
40 changes: 40 additions & 0 deletions test_reform.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,5 +644,45 @@ def test_case_15(self):

os.chdir(wd)

def test_case_16(self):
"""
Case 15:
Testing Reform which invalid chrom
"""

wd = os.getcwd()
os.chdir('test_data/16/')

command = """
python3 ../../reform.py \
--chrom="X" \
--in_fasta=in.fa \
--in_gff=in.gtf \
--ref_fasta=ref.fa \
--ref_gff=ref.gtf \
--position=-1
"""

response = subprocess.getoutput(command)
print(response)

with open('gold.gtf', 'r') as f:
gold_gff = f.read()
with open('ref_reformed.gtf', 'r') as f:
new_gff = f.read()
print("Testing gtf")
self.assertListEqual(list(gold_gff), list(new_gff))
print("Done")

with open('gold.fa', 'r') as f:
gold_fa = f.read()
with open('ref_reformed.fa', 'r') as f:
new_fa = f.read()
print("Testing Fasta")
self.assertListEqual(list(gold_fa), list(new_fa))
print("Done")

os.chdir(wd)

if __name__ == '__main__':
unittest.main()
Loading