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
1 merge request!20Resolve "Use SampleIds/ Experiment Id as file names throughtout pipeline"
Pipeline #2829 failed with stages
in 6 hours, 7 minutes, and 1 second
......@@ -76,15 +76,15 @@ def rename_reads(fastq, sample, paired):
if paired: # paired-end data
# Set file names
renamed_fastq.append(cwd + '/' + sample + '_R1.fq.gz')
renamed_fastq.append(cwd + '/' + sample + '_R2.fq.gz')
renamed_fastq.append(cwd + '/' + sample + '_R1.fastq.gz')
renamed_fastq.append(cwd + '/' + sample + '_R2.fastq.gz')
# Great symbolic links
os.symlink(fastq[0], renamed_fastq[0])
os.symlink(fastq[1], renamed_fastq[1])
else:
# Set file names
renamed_fastq.append(cwd + '/' + sample + '_R1.fq.gz')
renamed_fastq.append(cwd + '/' + sample + '_R1.fastq.gz')
# Great symbolic links
os.symlink(fastq[0], renamed_fastq[0])
......
......@@ -13,7 +13,7 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
@pytest.mark.singleend
def test_trim_reads_singleend():
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 + \
'ENCLB144FDT_R1_trimmed.fq.gz_trimming_report.txt'
assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
......@@ -24,9 +24,9 @@ def test_trim_reads_singleend():
@pytest.mark.pairedend
def test_trim_reads_pairedend():
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 + \
'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(trimmed_fastq) == 2229312710
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