Commit f98fd03f authored by Spencer Barnes's avatar Spencer Barnes
Browse files

modify strings in align pytest

parent 8f5a7119
Pipeline #7430 failed with stages
in 82 minutes and 35 seconds
......@@ -3,66 +3,64 @@
import pytest
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/alignReads/'
test_output_path = os.path.dirname(os.path.abspath(__file__)) + '/../output/alignReads/'
@pytest.mark.singleend
def test_map_reads_singleend():
assert os.path.exists(os.path.join(test_output_path, 'liver1/ENCFF000MBY_hsap_hepato_rep1_trimmed_bismark_bt2.bam'))
aligned_reads_report = test_output_path + 'liver1/ENCFF000MBY_hsap_hepato_rep1_trimmed_bismark_bt2_SE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequences analysed in total: 30645122' in samtools_report[6]
assert 'Mapping efficiency: 42.9%' in samtools_report[8]
assert "Total number of C's analysed: 145657914" in samtools_report[23]
assert 'Sequences analysed in total:\t30645122\n' in samtools_report[6]
assert 'Mapping efficiency:\t42.9%\n' in samtools_report[8]
assert "Total number of C's analysed:\t145657914\n" in samtools_report[23]
assert os.path.exists(os.path.join(test_output_path, '/liver2/ENCFF000MCD_hsap_hepato_rep2_trimmed_bismark_bt2.bam'))
aligned_reads_report = test_output_path + '/liver2/ENCFF000MCD_hsap_hepato_rep2_trimmed_bismark_bt2_SE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequences analysed in total: 36753283' in samtools_report[6]
assert 'Mapping efficiency: 35.8%' in samtools_report[8]
assert "Total number of C's analysed: 141487023" in samtools_report[23]
assert 'Sequences analysed in total:\t36753283\n' in samtools_report[6]
assert 'Mapping efficiency:\t35.8%\n' in samtools_report[8]
assert "Total number of C's analysed:\t141487023\n" in samtools_report[23]
assert os.path.exists(os.path.join(test_output_path, '/lung1/ENCFF000MDS_hsap_lung_rrbs_rep1_trimmed_bismark_bt2.bam'))
aligned_reads_report = test_output_path + '/lung1/ENCFF000MDS_hsap_lung_rrbs_rep1_trimmed_bismark_bt2_SE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequences analysed in total: 41727993' in samtools_report[6]
assert 'Mapping efficiency: 15.3%' in samtools_report[8]
assert "Total number of C's analysed: 69933546" in samtools_report[23]
assert 'Sequences analysed in total:\t41727993\n' in samtools_report[6]
assert 'Mapping efficiency:\t15.3%\n' in samtools_report[8]
assert "Total number of C's analysed:\t69933546\n" in samtools_report[23]
assert os.path.exists(os.path.join(test_output_path, '/lung2/ENCFF000MDT_hsap__lung_rep2_trimmed_bismark_bt2.bam'))
aligned_reads_report = test_output_path + '/lung2/ENCFF000MDT_hsap__lung_rep2_trimmed_bismark_bt2_SE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequences analysed in total: 37152735' in samtools_report[6]
assert 'Mapping efficiency: 32.5%' in samtools_report[8]
assert "Total number of C's analysed: 134685946" in samtools_report[23]
assert 'Sequences analysed in total:\t37152735\n' in samtools_report[6]
assert 'Mapping efficiency:\t32.5%\n' in samtools_report[8]
assert "Total number of C's analysed:\t134685946\n" in samtools_report[23]
@pytest.mark.pairedend
def test_map_reads_pairedend():
assert os.path.exists(os.path.join(test_output_path, '/heart1/heart_a_S2_R1_001_val_1_bismark_bt2_pe.bam'))
aligned_reads_report = test_output_path + '/heart1/heart_a_S2_R1_001_val_1_bismark_bt2_PE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequence pairs analysed in total: 18107045' in samtools_report[6]
assert 'Mapping efficiency: 57.3%' in samtools_report[8]
assert "Total number of C's analysed: 345193812" in samtools_report[23]
assert 'Sequence pairs analysed in total:\t18107045\n' in samtools_report[6]
assert 'Mapping efficiency:\t57.3%\n' in samtools_report[8]
assert "Total number of C's analysed:\t345193812\n" in samtools_report[23]
assert os.path.exists(os.path.join(test_output_path, '/heart2/heart_b_S4_R1_001_val_1_bismark_bt2_pe.bam'))
aligned_reads_report = test_output_path + '/heart2/heart_b_S4_R1_001_val_1_bismark_bt2_PE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequence pairs analysed in total: 12016511' in samtools_report[6]
assert 'Mapping efficiency: 51.4%' in samtools_report[8]
assert "Total number of C's analysed: 200311991" in samtools_report[23]
assert 'Sequence pairs analysed in total:\t12016511\n' in samtools_report[6]
assert 'Mapping efficiency:\t51.4%\n' in samtools_report[8]
assert "Total number of C's analysed:\t200311991\n" in samtools_report[23]
assert os.path.exists(os.path.join(test_output_path, '/liver1/liver_a_S4_R1_001_val_1_bismark_bt2_pe.bam'))
aligned_reads_report = test_output_path + '/liver1/liver_a_S4_R1_001_val_1_bismark_bt2_PE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequence pairs analysed in total: 16444589' in samtools_report[6]
assert 'Mapping efficiency: 55.9%' in samtools_report[8]
assert "Total number of C's analysed: 310540010" in samtools_report[23]
assert 'Sequence pairs analysed in total:\t16444589\n' in samtools_report[6]
assert 'Mapping efficiency:\t55.9%\n' in samtools_report[8]
assert "Total number of C's analysed:\t310540010\n" in samtools_report[23]
assert os.path.exists(os.path.join(test_output_path, '/liver2/Liver_b_S2_R1_001_val_1_bismark_bt2_pe.bam'))
aligned_reads_report = test_output_path + '/liver2/Liver_b_S2_R1_001_val_1_bismark_bt2_PE_report.txt'
samtools_report = open(aligned_reads_report).readlines()
assert 'Sequence pairs analysed in total: 8166172' in samtools_report[6]
assert 'Mapping efficiency: 50.0%' in samtools_report[8]
assert "Total number of C's analysed: 137359898" in samtools_report[23]
assert 'Sequence pairs analysed in total:\t8166172\n' in samtools_report[6]
assert 'Mapping efficiency:\t50.0%\n' in samtools_report[8]
assert "Total number of C's analysed:\t137359898\n" in samtools_report[23]
Markdown is supported
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