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

Fix merge of tests.

parents 4c3add75 d6dd0596
Branches
Tags
No related merge requests found
......@@ -38,6 +38,7 @@ readsList = Channel
pairedEnd = params.pairedEnd
designFile = params.designFile
genomeSize = params.genomeSize
genome = params.genome
chromSizes = params.chromSizes
fasta = params.fasta
cutoffRatio = params.cutoffRatio
......@@ -422,6 +423,7 @@ process motifSearch {
output:
file "*memechip" into motifSearch
file "sorted-*" into filteredPeaks
script:
......
......@@ -21,16 +21,16 @@ if (length(args) != 2) {
}
design_file <- args[1]
genome <-args[2]
genome_assembly <- args[2]
# Load UCSC Known Genes
if(genome=='GRCh37') {
if(genome_assembly=='GRCh37') {
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
annodb <- 'org.Hs.eg.db'
} else if(genome=='GRCm38') {
} else if(genome_assembly=='GRCm38') {
txdb <- TxDb.Mmusculus.UCSC.mm10.knownGene
annodb <- 'org.Mm.eg.db'
} else if(genome=='GRCh38') {
} else if(genome_assembly=='GRCh38') {
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
annodb <- 'org.Hs.eg.db'
}
......
......@@ -16,7 +16,7 @@ def test_annotate_peaks_singleend():
assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_upsetplot.pdf'))
annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.csv'
assert os.path.exists(annotation_file)
assert utils.count_lines(annotation_file) == 149820
assert utils.count_lines(annotation_file) == 152840
@pytest.mark.pairedend
......
......@@ -13,7 +13,7 @@ def test_call_peaks_macs_singleend():
assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.fc_signal.bw'))
assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.pvalue_signal.bw'))
peak_file = test_output_path + 'ENCLB144FDT_peaks.narrowPeak'
assert utils.count_lines(peak_file) == 210349
assert utils.count_lines(peak_file) == 227389
@pytest.mark.pairedend
......
......@@ -12,20 +12,11 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
@pytest.mark.singleend
def test_diff_peaks_singleend_single_rep():
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.bed'))
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.csv'))
assert os.path.exists(os.path.join(test_output_path, 'no_heatmap.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'no_pca.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'normcount_peaksets.pdf'))
assert os.path.isdir(test_output_path) == False
@pytest.mark.pairedend
def test_annotate_peaks_pairedend_single_rep():
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.bed'))
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.csv'))
assert os.path.exists(os.path.join(test_output_path, 'no_heatmap.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'no_pca.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'normcount_peaksets.pdf'))
assert os.path.isdir(test_output_path) == False
@pytest.mark.singlediff
def test_diff_peaks_singleend_multiple_rep():
......
......@@ -37,7 +37,7 @@ def test_check_update_design(design_diff):
def test_overlap_peaks_singleend():
assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.rejected.narrowPeak'))
peak_file = test_output_path + 'ENCSR238SGC.replicated.narrowPeak'
assert utils.count_lines(peak_file) == 150302
assert utils.count_lines(peak_file) == 149828
@pytest.mark.pairedend
......
......@@ -24,7 +24,7 @@ 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_val_2.fq.gz'
trimmed_fastq = test_output_path + 'ENCFF582IOZ_val_2.fq.gz'
trimmed_fastq_report = test_output_path + \
'ENCLB637LZP.fastq.gz_trimming_report.txt'
assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
......
......@@ -9,13 +9,13 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
@pytest.mark.singleend
def test_convert_reads_singleend():
def test_map_qc_singleend():
assert os.path.exists(os.path.join(test_output_path, 'ENCFF833BLU.filt.nodup.tagAlign.15.tagAlign.gz.cc.plot.pdf'))
qc_file = os.path.join(test_output_path,"ENCFF833BLU.filt.nodup.tagAlign.15.tagAlign.gz.cc.qc")
df_xcor = pd.read_csv(qc_file, sep="\t", header=None)
assert df_xcor[2].iloc[0] == '195,215,230'
assert df_xcor[8].iloc[0] == 1.024836
assert df_xcor[9].iloc[0] == 1.266678
assert df_xcor[2].iloc[0] == '190,200,210'
assert df_xcor[8].iloc[0] == 1.025906
assert df_xcor[9].iloc[0] == 1.139671
@pytest.mark.pairedend
......@@ -23,6 +23,6 @@ def test_map_qc_pairedend():
assert os.path.exists(os.path.join(test_output_path, 'ENCFF582IOZ_val_2ENCFF957SQS_val_1.filt.nodup.tagAlign.15.tagAlign.gz.cc.plot.pdf'))
qc_file = os.path.join(test_output_path,"ENCFF582IOZ_val_2ENCFF957SQS_val_1.filt.nodup.tagAlign.15.tagAlign.gz.cc.qc")
df_xcor = pd.read_csv(qc_file, sep="\t", header=None)
assert df_xcor[2].iloc[0] == '205,410,430'
assert df_xcor[8].iloc[0] == 1.060266
assert df_xcor[9].iloc[0] == 4.308793
assert df_xcor[2].iloc[0] == '210,220,475'
assert df_xcor[8].iloc[0] == 1.062032
assert df_xcor[9].iloc[0] == 3.737722
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