Skip to content
Snippets Groups Projects
Commit d7b9a6ba authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Update paths and add in testing if file exists.

parent cb8162c6
1 merge request!6Resolve "Bam Stats and Filter"
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
import pytest import pytest
import os import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/alignReads/'
def test_map_reads_singleend(): def test_map_reads_singleend():
aligned_reads_report = os.path.dirname(os.path.abspath(__file__)) + \ assert os.path.exists(os.path.join(test_output_path, 'ENCFF646LXU.srt.bam'))
'/../output/alignReads/ENCFF646LXU.srt.bam.flagstat.qc' aligned_reads_report = test_output_path + 'ENCFF646LXU.srt.bam.flagstat.qc'
samtools_report = open(aligned_reads_report).readlines() samtools_report = open(aligned_reads_report).readlines()
assert '80795025 + 0 in total' in samtools_report[0] assert '80795025 + 0 in total' in samtools_report[0]
assert '80050072 + 0 mapped (99.08% : N/A)' in samtools_report[4] assert '80050072 + 0 mapped (99.08% : N/A)' in samtools_report[4]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment