diff --git a/workflow/scripts/call_peaks_macs.py b/workflow/scripts/call_peaks_macs.py index 69a5968efc0cd34d3429b0a0f2677b023c676f50..99e290029f62ca5619f1b2b6f3cf59015259217f 100644 --- a/workflow/scripts/call_peaks_macs.py +++ b/workflow/scripts/call_peaks_macs.py @@ -126,7 +126,7 @@ def call_peaks_macs(experiment, xcor, control, prefix, genome_size, chrom_sizes) # Remove coordinates outside chromosome sizes int_narrowpeak_fn = '%s_peaks.narrowPeak' % (prefix) - narrowpeak_fn = '%s_peaks.narrowPeak' % (prefix) + narrowpeak_fn = '%s.narrowPeak' % (prefix) clipped_narrowpeak_fn = 'clipped-%s' % (narrowpeak_fn) diff --git a/workflow/scripts/map_reads.py b/workflow/scripts/map_reads.py index 3c20ac81ddf051f11d5b7e4e37e15629991ffa31..a1f8161cb4ee71885719d954e9ddf25428499d11 100644 --- a/workflow/scripts/map_reads.py +++ b/workflow/scripts/map_reads.py @@ -104,7 +104,7 @@ def generate_sa(fastq, reference): def align_se(fastq, sai, reference, fastq_basename): '''Use BWA to align SE data.''' - bam_filename = '%s.srt.bam' % (fastq_basename) + bam_filename = '%s.bam' % (fastq_basename) steps = [ "bwa samse %s %s %s" @@ -125,7 +125,7 @@ def align_pe(fastq, sai, reference, fastq_basename): sam_filename = "%s.sam" % (fastq_basename) badcigar_filename = "%s.badReads" % (fastq_basename) - bam_filename = '%s.srt.bam' % (fastq_basename) + bam_filename = '%s.bam' % (fastq_basename) # Remove read pairs with bad CIGAR strings and sort by position steps = [ diff --git a/workflow/scripts/trim_reads.py b/workflow/scripts/trim_reads.py index e31ec938b6d7e0ef5570afc394c98a365041f863..bf5f9015d5cff34bf3fa7f0361f811fe456f5c4d 100644 --- a/workflow/scripts/trim_reads.py +++ b/workflow/scripts/trim_reads.py @@ -76,15 +76,15 @@ def rename_reads(fastq, sample, paired): if paired: # paired-end data # Set file names - renamed_fastq.append(cwd + '/' + sample + '_R1.fastq.gz') - renamed_fastq.append(cwd + '/' + sample + '_R2.fastq.gz') + renamed_fastq.append(cwd + '/' + sample + '_R1.fq.gz') + renamed_fastq.append(cwd + '/' + sample + '_R2.fq.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.fastq.gz') + renamed_fastq.append(cwd + '/' + sample + '_R1.fq.gz') # Great symbolic links os.symlink(fastq[0], renamed_fastq[0]) diff --git a/workflow/tests/test_convert_reads.py b/workflow/tests/test_convert_reads.py index 753b54b19a1bcbd6fd678a9592ae3be49f637ebf..d1ef0454f02fec0cfc631d3477daa522d4bd2030 100644 --- a/workflow/tests/test_convert_reads.py +++ b/workflow/tests/test_convert_reads.py @@ -9,8 +9,8 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ @pytest.mark.singleend def test_convert_reads_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCFF646LXU.tagAlign.gz')) - assert os.path.exists(os.path.join(test_output_path, 'ENCFF646LXU.bedse.gz')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI.tagAlign.gz')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI.bedse.gz')) @pytest.mark.pairedend diff --git a/workflow/tests/test_trim_reads.py b/workflow/tests/test_trim_reads.py index aeb3eb3bbe2be77479b88fb82391efab687a0063..5220f1862944e1b9ca94f5eb2715aa62f61dbf45 100644 --- a/workflow/tests/test_trim_reads.py +++ b/workflow/tests/test_trim_reads.py @@ -13,9 +13,9 @@ 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_trimmed.fq.gz' + trimmed_fastq = test_output_path + 'ENCLB144FDT_R1_trimmed.fq.gz' trimmed_fastq_report = test_output_path + \ - 'ENCLB144FDT.fastq.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(trimmed_fastq) == 2512853101 assert 'Trimming mode: single-end' in open(trimmed_fastq_report).readlines()[4] @@ -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 + 'ENCFF582IOZ_val_2.fq.gz' + trimmed_fastq = test_output_path + 'ENCLB637LZP_R2_trimmed.fq.gz' trimmed_fastq_report = test_output_path + \ - 'ENCLB637LZP.fastq.gz_trimming_report.txt' + 'ENCLB637LZP_R2_trimmed.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] diff --git a/workflow/tests/test_xcor.py b/workflow/tests/test_xcor.py index 69006a0f03f4193035898e14376f01be463e3089..40548cfc144bbd3141d473d8d2865f5d590fd1bc 100644 --- a/workflow/tests/test_xcor.py +++ b/workflow/tests/test_xcor.py @@ -10,8 +10,8 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ @pytest.mark.singleend def test_cross_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCFF833BLU.cc.plot.pdf')) - qc_file = os.path.join(test_output_path,"ENCFF833BLU.cc.qc") + assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.cc.plot.pdf')) + qc_file = os.path.join(test_output_path,"ENCLB144FDT.cc.qc") df_xcor = pd.read_csv(qc_file, sep="\t", header=None) assert df_xcor[2].iloc[0] == '190,200,210' assert df_xcor[8].iloc[0] == 1.025906