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

Fix Trim reads output to match.

parent 2b651306
Branches
Tags
No related merge requests found
...@@ -76,15 +76,15 @@ def rename_reads(fastq, sample, paired): ...@@ -76,15 +76,15 @@ def rename_reads(fastq, sample, paired):
if paired: # paired-end data if paired: # paired-end data
# Set file names # Set file names
renamed_fastq.append(cwd + '/' + sample + '_R1.fq.gz') renamed_fastq.append(cwd + '/' + sample + '_R1.fastq.gz')
renamed_fastq.append(cwd + '/' + sample + '_R2.fq.gz') renamed_fastq.append(cwd + '/' + sample + '_R2.fastq.gz')
# Great symbolic links # Great symbolic links
os.symlink(fastq[0], renamed_fastq[0]) os.symlink(fastq[0], renamed_fastq[0])
os.symlink(fastq[1], renamed_fastq[1]) os.symlink(fastq[1], renamed_fastq[1])
else: else:
# Set file names # Set file names
renamed_fastq.append(cwd + '/' + sample + '_R1.fq.gz') renamed_fastq.append(cwd + '/' + sample + '_R1.fastq.gz')
# Great symbolic links # Great symbolic links
os.symlink(fastq[0], renamed_fastq[0]) os.symlink(fastq[0], renamed_fastq[0])
......
...@@ -13,7 +13,7 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ ...@@ -13,7 +13,7 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
@pytest.mark.singleend @pytest.mark.singleend
def test_trim_reads_singleend(): def test_trim_reads_singleend():
raw_fastq = test_data_path + 'ENCFF833BLU.fastq.gz' raw_fastq = test_data_path + 'ENCFF833BLU.fastq.gz'
trimmed_fastq = test_output_path + 'ENCLB144FDT_R1_trimmed.fq.gz' trimmed_fastq = test_output_path + 'ENCLB144FDT_R1.fq.gz'
trimmed_fastq_report = test_output_path + \ trimmed_fastq_report = test_output_path + \
'ENCLB144FDT_R1_trimmed.fq.gz_trimming_report.txt' 'ENCLB144FDT_R1_trimmed.fq.gz_trimming_report.txt'
assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq) assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
...@@ -24,9 +24,9 @@ def test_trim_reads_singleend(): ...@@ -24,9 +24,9 @@ def test_trim_reads_singleend():
@pytest.mark.pairedend @pytest.mark.pairedend
def test_trim_reads_pairedend(): def test_trim_reads_pairedend():
raw_fastq = test_data_path + 'ENCFF582IOZ.fastq.gz' raw_fastq = test_data_path + 'ENCFF582IOZ.fastq.gz'
trimmed_fastq = test_output_path + 'ENCLB637LZP_R2_trimmed.fq.gz' trimmed_fastq = test_output_path + 'ENCLB637LZP_R2.fq.gz'
trimmed_fastq_report = test_output_path + \ trimmed_fastq_report = test_output_path + \
'ENCLB637LZP_R2_trimmed.fq.gz_trimming_report.txt' 'ENCLB637LZP_R2_val_2.fq.gz_trimming_report.txt'
assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq) assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
assert os.path.getsize(trimmed_fastq) == 2229312710 assert os.path.getsize(trimmed_fastq) == 2229312710
assert 'Trimming mode: paired-end' in open(trimmed_fastq_report).readlines()[4] assert 'Trimming mode: paired-end' in open(trimmed_fastq_report).readlines()[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