diff --git a/workflow/main.nf b/workflow/main.nf index d3f09cb7fb72b145fb8ab7a5a4abb20a77374789..a2eed3d4ca37f701565701bc763b8d968543e9cd 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -1,4 +1,11 @@ #!/usr/bin/env nextflow +test = Channel +.fromPath('/work/BICF/s163035/builds/932983dd/2/BICF/Astrocyte/chipseq_analysis/work/ce/59578d09be684276dca671e1aea716/unique_experiments.csv') +.splitCsv(sep: '\t', header: true) + .toList() + +println test.size() + // Path to an input file, or a pattern for multiple inputs // Note - $baseDir is the location of this workflow file main.nf @@ -429,12 +436,8 @@ process motifSearch { } // Define channel to find number of unique experiments -noUniqueExperiments = uniqueExperiments +uniqueExperimentsList = uniqueExperiments .splitCsv(sep: '\t', header: true) - .toList() - .count() - -println noUniqueExperiments // Calculate Differential Binding Activity process diffPeaks { @@ -444,6 +447,7 @@ process diffPeaks { input: file designDiffPeaks + val noUniqueExperiments from uniqueExperimentsList.count() output: diff --git a/workflow/scripts/overlap_peaks.py b/workflow/scripts/overlap_peaks.py index ad0d57ed80a5b1669350e2cae0cd775ab7be61ad..434caa08799a2d6b3bf460ea8520d08a5b92c852 100644 --- a/workflow/scripts/overlap_peaks.py +++ b/workflow/scripts/overlap_peaks.py @@ -212,8 +212,8 @@ def main(): design_anno.to_csv("design_annotatePeaks.tsv", header=True, sep='\t', index=False) # Write the unique conditions - unique_experiments = pd.Series(design_diff['Condition'].unique) - unique_experiments.to_csv('unique_experiments.csv') + unique_experiments = pd.DataFrame(design_diff['Condition'].unique().tolist(), columns=['Condition']) + unique_experiments.to_csv('unique_experiments.csv', index=False) if __name__ == '__main__':