Commit 36c229a7 authored by Spencer Barnes's avatar Spencer Barnes
Browse files

modify mouse pytests

parent b1e2390d
Pipeline #7275 failed with stages
in 58 minutes and 34 seconds
......@@ -6,18 +6,22 @@ from io import StringIO
import check_design
DESIGN_STRING = """sample_id\texperiment_id\tbiosample\ttreatment\treplicate\tcontrol_id\tfastq_read1\tfastq_read2
heart1\theart\theart\tnone\t1\theart_a_S2_R1_001_shortened.fastq.gz\theart_a_S2_R2_001_shortened.fastq.gz
heart2\theart\theart\tnone\t2\theart_b_S4_R1_001_shortened.fastq.gz\theart_b_S4_R2_001_shortened.fastq.gz
liver1\tliver\tliver\tnone\t1\tliver_a_S4_R1_001_shortened.fastq.gz\tliver_a_S4_R2_001_shortened.fastq.gz
liver2\tliver\tliver\tnone\t2\tLiver_b_S2_R1_001_shortened.fastq.gz\tLiver_b_S2_R2_001_shortened.fastq.gz
DESIGN_STRING = """sample_id\texperiment_id\tbiosample\ttreatment\treplicate\tfastq_read1\tfastq_read2
heart1\theart\theart\tnone\t1\theart_a_S2_R1_001.fastq.gz\theart_a_S2_R2_001.fastq.gz
heart2\theart\theart\tnone\t2\theart_b_S4_R1_001.fastq.gz\theart_b_S4_R2_001.fastq.gz
liver1\tliver\tliver\tnone\t1\tliver_a_S4_R1_001.fastq.gz\tliver_a_S4_R2_001.fastq.gz
liver2\tliver\tliver\tnone\t2\tLiver_b_S2_R1_001.fastq.gz\tLiver_b_S2_R2_001.fastq.gz
"""
FASTQ_STRING = """
heart_a_S2_R1_001_shortened.fastq.gz\t/path/to/file/heart_a_S2_R1_001_shortened.fastq.gz
heart_b_S4_R1_001_shortened.fastq.gz\t/path/to/file/heart_b_S4_R1_001_shortened.fastq.gz
liver_a_S4_R1_001_shortened.fastq.gz\t/path/to/file/liver_a_S4_R1_001_shortened.fastq.gz
Liver_b_S2_R1_001_shortened.fastq.gz\t/path/to/file/Liver_b_S2_R1_001_shortened.fastq.gz
heart_a_S2_R1_001.fastq.gz\t/path/to/file/heart_a_S2_R1_001.fastq.gz
heart_a_S2_R2_001.fastq.gz\t/path/to/file/heart_a_S2_R2_001.fastq.gz
heart_b_S4_R1_001.fastq.gz\t/path/to/file/heart_b_S4_R1_001.fastq.gz
heart_b_S4_R2_001.fastq.gz\t/path/to/file/heart_b_S4_R2_001.fastq.gz
liver_a_S4_R1_001.fastq.gz\t/path/to/file/liver_a_S4_R1_001.fastq.gz
liver_a_S4_R2_001.fastq.gz\t/path/to/file/liver_a_S4_R2_001.fastq.gz
Liver_b_S2_R1_001.fastq.gz\t/path/to/file/Liver_b_S2_R1_001.fastq.gz
Liver_b_S2_R2_001.fastq.gz\t/path/to/file/Liver_b_S2_R2_001.fastq.gz
"""
......@@ -116,21 +120,21 @@ def test_check_files_missing_files(design, fastq_files_1):
paired = False
with pytest.raises(Exception) as excinfo:
new_design = check_design.check_files(design, fastq_files_1, paired)
assert str(excinfo.value) == "Missing files from design file: ['Liver_b_S2_R1_001_shortened.fastq.gz']"
assert str(excinfo.value) == "Missing files from design file: ['Liver_b_S2_R1_001.fastq.gz']"
@pytest.mark.unit
def test_check_files_output_singleend(design, fastq_files):
paired = False
new_design = check_design.check_files(design, fastq_files, paired)
assert new_design.loc[0, 'fastq_read1'] == "/path/to/file/heart_a_S2_R1_001_shortened.fastq.gz"
assert new_design.loc[0, 'fastq_read1'] == "/path/to/file/heart_a_S2_R1_001.fastq.gz"
@pytest.mark.unit
def test_check_files_output_pairedend(design_3, fastq_files):
paired = True
new_design = check_design.check_files(design_3, fastq_files, paired)
assert new_design.loc[0, 'fastq_read2'] == "/path/to/file/heart_b_S4_R1_001_shortened.fastq.gz"
assert new_design.loc[0, 'fastq_read2'] == "/path/to/file/heart_b_S4_R1_001.fastq.gz"
@pytest.mark.unit
......
......@@ -15,7 +15,7 @@ def test_trimData_se():
@pytest.mark.methData_pe
def test_trimData_pe():
assert os.path.exists(os.path.join(test_output_path, '/heart1/heart_a_S2_R1_001_shortened_val_1_bismark_bt2_pe.bismark.cov.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart2/heart_b_S4_R1_001_shortened_val_1_bismark_bt2_pe.bismark.cov.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver2/Liver_b_S2_R1_001_shortened_val_1_bismark_bt2_pe.bismark.cov.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver1/liver_a_S4_R1_001_shortened_val_1_bismark_bt2_pe.bismark.cov.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart1/heart_a_S2_R1_001_val_1_bismark_bt2_pe.bismark.cov.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver2/Liver_b_S2_R1_001_val_1_bismark_bt2_pe.bismark.cov.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart2/heart_b_S4_R1_001_val_1_bismark_bt2_pe.bismark.cov.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver1/liver_a_S4_R1_001_val_1_bismark_bt2_pe.bismark.cov.gz'))
......@@ -15,11 +15,11 @@ def test_trimData_se():
@pytest.mark.trimData_pe
def test_trimData_pe():
assert os.path.exists(os.path.join(test_output_path, '/heart1/heart_a_S2_R2_001_shortened_val_2.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart1/heart_a_S2_R1_001_shortened_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart2/heart_b_S4_R1_001_shortened_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart2/heart_b_S4_R2_001_shortened_val_2.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver1/liver_a_S4_R2_001_shortened_val_2.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver1/liver_a_S4_R1_001_shortened_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver2/Liver_b_S2_R2_001_shortened_val_2.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver2/Liver_b_S2_R1_001_shortened_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart1/heart_a_S2_R1_001_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart1/heart_a_S2_R2_001_val_2.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver2/Liver_b_S2_R1_001_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver2/Liver_b_S2_R2_001_val_2.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart2/heart_b_S4_R2_001_val_2.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/heart2/heart_b_S4_R1_001_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver1/liver_a_S4_R1_001_val_1.fq.gz'))
assert os.path.exists(os.path.join(test_output_path, '/liver1/liver_a_S4_R2_001_val_2.fq.gz'))
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