diff --git a/.gitignore b/.gitignore index 27a59b3f..276fb0f8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,7 @@ results*/ testing/ testing* *.pyc -.nf-test/ \ No newline at end of file +.nf-test/ +*.Rhistory +*version?current=* +.vscode/ \ No newline at end of file diff --git a/.nf-test.log b/.nf-test.log index 50372c0c..e5777346 100644 --- a/.nf-test.log +++ b/.nf-test.log @@ -1,8 +1,291 @@ -Mar-25 12:30:41.801 [main] INFO com.askimed.nf.test.App - nf-test 0.9.2 -Mar-25 12:30:41.832 [main] INFO com.askimed.nf.test.App - Arguments: [test, --profile=test,docker, --tap=test.tap, --tag, only_crosslinking_primary, tests/nf_test/test/genome_chromsizes.test, tests/nf_test/test/genome_fasta.test, tests/nf_test/test/genome_gtf.test, tests/nf_test/test/genome_indexes.test, tests/nf_test/test/genome_longest_transcript.test, tests/nf_test/test/genome_preset_genome.test, tests/nf_test/test/test_only_alignment.test, tests/nf_test/test/test_only_crosslinking.test, tests/nf_test/test/test_only_dedup.test, tests/nf_test/test/test_only_input.test, tests/nf_test/test/test_only_peakcalling.test, tests/nf_test/test/test_only_preprocessing.test] -Mar-25 12:30:43.484 [main] INFO com.askimed.nf.test.App - Nextflow Version: 24.10.5 -Mar-25 12:30:43.487 [main] INFO com.askimed.nf.test.commands.RunTestsCommand - Load config from file /Users/capitac/repos/nfcore-clipseq/nf-test.config... -Mar-25 12:30:44.396 [main] INFO com.askimed.nf.test.lang.dependencies.DependencyResolver - Loaded 93 files from directory /Users/capitac/repos/nfcore-clipseq in 0.275 sec -Mar-25 12:30:44.417 [main] INFO com.askimed.nf.test.lang.dependencies.DependencyResolver - Found 0 files containing tests. -Mar-25 12:30:44.420 [main] DEBUG com.askimed.nf.test.lang.dependencies.DependencyResolver - Found files: [] -Mar-25 12:30:44.427 [main] INFO com.askimed.nf.test.commands.RunTestsCommand - Found 0 tests to execute. +Nov-10 16:29:20.594 [main] INFO com.askimed.nf.test.App - nf-test 0.9.2 +Nov-10 16:29:20.619 [main] INFO com.askimed.nf.test.App - Arguments: [test, --profile, docker] +Nov-10 16:29:22.592 [main] INFO com.askimed.nf.test.App - Nextflow Version: 25.04.6 +Nov-10 16:29:22.595 [main] INFO com.askimed.nf.test.commands.RunTestsCommand - Load config from file /workspaces/clipseq/nf-test.config... +Nov-10 16:29:23.118 [main] WARN com.askimed.nf.test.nextflow.NextflowScript - Module /workspaces/clipseq/subworkflows/local/BindingSiteFinder.nf: Dependency '/workspaces/clipseq/subworkflows/local/../../modules/local/sortAnnotationForBindingSiteFinder/main.nf.nf' not found. +Nov-10 16:29:23.118 [main] WARN com.askimed.nf.test.nextflow.NextflowScript - Module /workspaces/clipseq/subworkflows/local/BindingSiteFinder.nf: Dependency '/workspaces/clipseq/subworkflows/local/../../modules/local/BindingSiteFinder/main.nf.nf' not found. +Nov-10 16:29:23.126 [main] WARN com.askimed.nf.test.nextflow.NextflowScript - Module /workspaces/clipseq/subworkflows/local/prepare_genome.nf: Dependency '/workspaces/clipseq/subworkflows/local/../../modules/local/find_longest_transcript/main.nf' not found. +Nov-10 16:29:23.127 [main] WARN com.askimed.nf.test.nextflow.NextflowScript - Module /workspaces/clipseq/subworkflows/local/prepare_genome.nf: Dependency '/workspaces/clipseq/subworkflows/local/../../modules/local/filter_gtf/main.nf' not found. +Nov-10 16:29:23.475 [main] INFO com.askimed.nf.test.lang.dependencies.DependencyResolver - Loaded 155 files from directory /workspaces/clipseq in 0.376 sec +Nov-10 16:29:23.479 [main] INFO com.askimed.nf.test.lang.dependencies.DependencyResolver - Found 12 files containing tests. +Nov-10 16:29:23.480 [main] DEBUG com.askimed.nf.test.lang.dependencies.DependencyResolver - Found files: [/workspaces/clipseq/tests/nf_test/test/genome_preset_genome.nf.test, /workspaces/clipseq/tests/nf_test/test/genome_longest_transcript.nf.test, /workspaces/clipseq/tests/nf_test/test/genome_gtf.nf.test, /workspaces/clipseq/tests/nf_test/test/test_only_crosslinking.nf.test, /workspaces/clipseq/tests/nf_test/test/test_only_preprocessing.nf.test, /workspaces/clipseq/tests/nf_test/test/genome_fasta.nf.test, /workspaces/clipseq/tests/nf_test/test/test_only_input.nf.test, /workspaces/clipseq/tests/nf_test/test/test_only_alignment.nf.test, /workspaces/clipseq/tests/nf_test/test/genome_indexes.nf.test, /workspaces/clipseq/tests/nf_test/test/genome_chromsizes.nf.test, /workspaces/clipseq/tests/nf_test/test/test_only_dedup.nf.test, /workspaces/clipseq/tests/nf_test/test/test_only_peakcalling.nf.test] +Nov-10 16:29:24.875 [main] INFO com.askimed.nf.test.commands.RunTestsCommand - Found 35 tests to execute. +Nov-10 16:29:24.876 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Started test plan +Nov-10 16:29:24.877 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Running testsuite 'genome_chrom_sizes' from file '/workspaces/clipseq/tests/nf_test/test/genome_chromsizes.nf.test'. +Nov-10 16:29:24.877 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test '232023aa: genome_no_chrom_sizes'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:29:36.292 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test '232023aa: genome_no_chrom_sizes' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_chromsizes_nf$_run_closure1$_closure2$_closure4.doCall(genome_chromsizes.nf.test:19) + at genome_chromsizes_nf$_run_closure1$_closure2$_closure4.doCall(genome_chromsizes.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:29:36.302 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Testsuite 'genome_chrom_sizes' finished. snapshot file: false, skipped tests: false, failed tests: true +Nov-10 16:29:36.302 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Running testsuite 'genome_fasta' from file '/workspaces/clipseq/tests/nf_test/test/genome_fasta.nf.test'. +Nov-10 16:29:36.302 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test '27d9e694: genome_fasta_raw'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:29:47.133 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test '27d9e694: genome_fasta_raw' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_fasta_nf$_run_closure1$_closure2$_closure9.doCall(genome_fasta.nf.test:18) + at genome_fasta_nf$_run_closure1$_closure2$_closure9.doCall(genome_fasta.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:29:47.134 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test '7fbe64f1: genome_fasta_gz'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:29:58.220 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test '7fbe64f1: genome_fasta_gz' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_fasta_nf$_run_closure1$_closure3$_closure12.doCall(genome_fasta.nf.test:38) + at genome_fasta_nf$_run_closure1$_closure3$_closure12.doCall(genome_fasta.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:29:58.222 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test 'ad336d3d: genome_fasta_fai'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:30:09.531 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test 'ad336d3d: genome_fasta_fai' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_fasta_nf$_run_closure1$_closure4$_closure15.doCall(genome_fasta.nf.test:58) + at genome_fasta_nf$_run_closure1$_closure4$_closure15.doCall(genome_fasta.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:30:09.532 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test '7df948b2: genome_ncrna_fasta_gz'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:30:21.167 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test '7df948b2: genome_ncrna_fasta_gz' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_fasta_nf$_run_closure1$_closure5$_closure18.doCall(genome_fasta.nf.test:78) + at genome_fasta_nf$_run_closure1$_closure5$_closure18.doCall(genome_fasta.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:30:21.170 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test 'c3981f66: genome_ncrna_fasta'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:30:32.771 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test 'c3981f66: genome_ncrna_fasta' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_fasta_nf$_run_closure1$_closure6$_closure21.doCall(genome_fasta.nf.test:97) + at genome_fasta_nf$_run_closure1$_closure6$_closure21.doCall(genome_fasta.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:30:32.774 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test '15c423dc: genome_ncrna_fasta_fai'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:30:43.876 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test '15c423dc: genome_ncrna_fasta_fai' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_fasta_nf$_run_closure1$_closure7$_closure24.doCall(genome_fasta.nf.test:116) + at genome_fasta_nf$_run_closure1$_closure7$_closure24.doCall(genome_fasta.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:30:43.878 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Testsuite 'genome_fasta' finished. snapshot file: false, skipped tests: false, failed tests: true +Nov-10 16:30:43.878 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Running testsuite 'genome_gtf' from file '/workspaces/clipseq/tests/nf_test/test/genome_gtf.nf.test'. +Nov-10 16:30:43.879 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test '8cad6f6c: genome_gtf_raw'. type: com.askimed.nf.test.lang.pipeline.PipelineTest +Nov-10 16:30:55.481 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Test '8cad6f6c: genome_gtf_raw' finished. status: FAILED +org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert workflow.success + | | + workflow false + at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:432) + at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) + at genome_gtf_nf$_run_closure1$_closure2$_closure12.doCall(genome_gtf.nf.test:18) + at genome_gtf_nf$_run_closure1$_closure2$_closure12.doCall(genome_gtf.nf.test) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:569) + at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) + at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) + at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) + at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030) + at groovy.lang.Closure.call(Closure.java:427) + at groovy.lang.Closure.call(Closure.java:406) + at com.askimed.nf.test.lang.TestCode.execute(TestCode.java:16) + at com.askimed.nf.test.lang.pipeline.PipelineTest.execute(PipelineTest.java:135) + at com.askimed.nf.test.core.TestExecutionEngine.execute(TestExecutionEngine.java:165) + at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:298) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43) + at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18) + at picocli.CommandLine.executeUserObject(CommandLine.java:1953) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine.execute(CommandLine.java:2078) + at com.askimed.nf.test.App.run(App.java:39) + at com.askimed.nf.test.App.main(App.java:46) +Nov-10 16:30:55.482 [main] INFO com.askimed.nf.test.core.TestExecutionEngine - Run test '12df768f: genome_gtf_gz'. type: com.askimed.nf.test.lang.pipeline.PipelineTest diff --git a/bin/BindingSiteFinderQC.R b/bin/BindingSiteFinderQC.R new file mode 100644 index 00000000..62b60e64 --- /dev/null +++ b/bin/BindingSiteFinderQC.R @@ -0,0 +1,11 @@ +args <- commandArgs(trailingOnly = TRUE) + +print(args) +bds = args[1] + + +rmarkdown::render(xxreport_tmp_path, + #output_dir = paste0(snakemake@params[[1]], "/results/"), + args = args, + output_format = "html_document" +) \ No newline at end of file diff --git a/bin/BindingSiteFinderQC.qmd b/bin/BindingSiteFinderQC.qmd new file mode 100644 index 00000000..147ed877 --- /dev/null +++ b/bin/BindingSiteFinderQC.qmd @@ -0,0 +1,57 @@ +--- +title: "Quality Control of binding sites from BindingSiteFinder" +format: html +--- + +```{r} +library(BindingSiteFinder) +bds <- readRDS(args[1]) +``` + + +# Overview + +This document describes the (automatically chosen) parameters of used for biding site definition in BindingSiteFinder and provides multiple plots to check the quality of the binding sites on multiple levels. + +```{r} +# Flowchart +processingStepsFlowChart(bds) + +``` + +The flowchart lists all the steps that were performed by BindingSiteFinder. On the left, the number of crosslinks (before the makeBindingSite step) or binding sites (after the makeBindingSite step) is given. On the right, the used parameters from each step are listed. + +# Filtering of peak input signal + +The peaks obtained in peak calls are filtered by their score, removing the peaks with very low binding scores. The following plot shows the distribution of the scores of the peaks before filtering and the chosen cutoff as a line. + +```{r} +# Filtering peak input +pureClipGlobalFilterPlot(bdsOut) + +``` + + +# Estimation of binding sites + +BindingSiteFinder estimates the optimal size of the binding sites from a signal to flank ration. In addition, it tests different genewise filters of crosslinks to reduce influences of background signal. The following plot shows the signal to flank ratio across different binding sites width. Each line stands for another genewise filter. The chosen filter setting and binding site width are shown by the read lines and are also given in the top right corner of the plot. + +```{r} +estimateBsWidthPlot(bdsOut) + +``` + +Whether the chosen binding site width is appropriate can be checked by the following plot. It shows some examples of binding site width (grey boxes) and the summed signal in the binding site region. For an optimal binding site width the peak should be completely within the binding site, but the binding site should not spann further into the background signal. + +```{r} +rangeCoveragePlot(l, width = 20, show.samples = TRUE, subset.chromosome = "chr22") + +``` + +# Reproducibility of crosslink signals from different replicates in binding sites + +Coming soon! + + + + diff --git a/bin/DefineBindingSites.R b/bin/DefineBindingSites.R new file mode 100755 index 00000000..d4fc3f57 --- /dev/null +++ b/bin/DefineBindingSites.R @@ -0,0 +1,209 @@ +#!/usr/bin/env Rscript + +# ----------------------------- +# Module make binding sites +# ----------------------------- +options(warn = -1) + +# libraries +################ +# Suppress messages +suppressMessages(library(BindingSiteFinder)) +suppressMessages(library(GenomicRanges)) +suppressMessages(library(rtracklayer)) +suppressMessages(library(tidyverse)) +suppressMessages(library(optparse)) + +# print BSF version +################## +cat("BindingSiteFinder version: ", as.character(packageVersion("BindingSiteFinder")), "\n") + + +# Input +################ + +# Specify the input arguments +option_list <- list( + make_option(c("-b", "--bw_files_folder"), type = "character"), + make_option(c("-p", "--peaks"), type = "character"), + make_option(c("-g", "--anno_genes"), type = "character"), + make_option(c("-r", "--anno_regions"), type = "character"), + # output paths + make_option(c("-o", "--output_path"), type = "character", default = "."), + + # optional parameters to customize binding sites + #-------------------------------- + # the default values are the ones specified in the Bioconductor package BindingSiteFinder + # https://www.bioconductor.org/packages/release/bioc/manuals/BindingSiteFinder/man/BindingSiteFinder.pdf + # the default values as specified in BindingSiteFinder 2.4.0 are given in the comment after the parameter name + # optional parameters for binding site defnition + make_option(c( "--peak_score_global_cuttoff"), type = "numeric"), # default 0.01 + make_option(c( "--bsWidth"), type = "numeric"), # default automatic estimation + make_option(c( "--peak_score_genewise_cuttoff"), type = "numeric"), # default automatic estimation + make_option(c( "--minWidth"), type = "numeric"), # default 2 + make_option(c( "--minCrosslinks"), type = "numeric"), # default 2 + make_option(c( "--minCLSites"), type = "numeric"), # default 1 + make_option(c( "--maxBsWidth"), type = "numeric"), # default 13 + # optional parameters for reproducibility + # make_option(c( "--reproducibility_cutoff"), type = "numeric"), + # make_option(c( "--reproducibility_nReps"), type = "numeric"), + # optional parameters for gene and region assignment + make_option(c( "--method_gene_overlaps"), type = "character"), # default "frequency" + make_option(c( "--rule_gene_overlaps"), type = "character"), # default NULL (only needed for --method_gene_overlaps "hierarchy") + make_option(c( "--method_region_overlaps"), type = "character"), # default "frequency" + make_option(c( "--rule_region_overlaps"), type = "character"), # default NULL (only needed for --method_region_overlaps "hierarchy") + # optional parameters to fit non-standard genomes + make_option(c( "--match_geneID"), type = "character"), # default "gene_id" + make_option(c( "--match_geneName"), type = "character"), # default "gene_name" + make_option(c( "--match_geneType"), type = "character"), # default "gene_type" + # optional parameters to fit peakcaller scores + make_option(c( "--match_score"), type = "numeric"), # default "score" + make_option(c( "--match_score_option"), type = "character") # default "max" +) + +# Parse arguments +parser <- OptionParser(option_list = option_list) +args <- parse_args(parser) + +# Default parameters (NULL means use function defaults) +params.input.output <- list( + bw_files_folder = args$bw_files_folder, + peaks = args$peaks, + anno_genes = args$anno_genes, + anno_regions = args$anno_regions, + output_path = args$output_path) + +params.pureClipGlobalFilter <- list( + cuttoff = args$peak_score_global_cuttoff) + +params.estimateBsWidth <- list( + est.minWidth = args$minWidth, + est.maxBsWidth = args$maxBsWidth) + +params.pureClipGeneWiseFilter <- list( + cutoff = args$peak_score_genewise_cuttoff, + match.score = args$match_score, + match.geneID = args$match_geneID, + overlaps = args$method_gene_overlaps) + +params.makeBindingSites <- list( + minWidth = args$minWidth, + minCrosslinks = args$minCrosslinks, + minClSites = args$minCLSites) + +params.reproducibilityFilter <- list( + cutoff = args$reproducibility_cutoff, + nReps = args$reproducibility_nReps) + +params.assignToGenes <- list( + overlaps = args$method_gene_overlaps, + overlaps.rule = args$rule_gene_overlaps, + match.geneID = args$match_geneID, + match.geneName = args$match_geneName, + match.geneType = args$match_geneType + ) +params.assignToTranscriptRegions <- list( + overlaps = args$method_region_overlaps, + overlaps.rule = args$rule_region_overlaps) + +params.annotateWithScore <- list( + match.score = args$match_score, + match.option = args$match_score_option +) + +# Remove NULL values so function defaults apply +params.pureClipGlobalFilter <- params.pureClipGlobalFilter[!sapply(params.pureClipGlobalFilter, is.null)] +params.estimateBsWidth <- params.estimateBsWidth[!sapply(params.estimateBsWidth, is.null)] +params.pureClipGeneWiseFilter <- params.pureClipGeneWiseFilter[!sapply(params.pureClipGeneWiseFilter, is.null)] +params.makeBindingSites <- params.makeBindingSites[!sapply(params.makeBindingSites, is.null)] +params.reproducibilityFilter <- params.reproducibilityFilter[!sapply(params.reproducibilityFilter, is.null)] +params.assignToGenes <- params.assignToGenes[!sapply(params.assignToGenes, is.null)] +params.assignToTranscriptRegions <- params.assignToTranscriptRegions[!sapply(params.assignToTranscriptRegions, is.null)] +params.annotateWithScore <- params.annotateWithScore[!sapply(params.annotateWithScore, is.null)] + +####################### +# BindingSiteFinder +####################### +# crosslinks +bw_files_names <- list.files(params.input.output$bw_files_folder) + +clipFilesP <- list.files(params.input.output$bw_files_folder, pattern = "plus.bw$", full.names = TRUE) +clipFilesM <- list.files(params.input.output$bw_files_folder, pattern = "minus.bw$", full.names = TRUE) + + +# annotation +gns <- readRDS(params.input.output$anno_genes) +regions <- readRDS(params.input.output$anno_regions) + + +# Peaks from pureclip +peaks = rtracklayer::import(con = params.input.output$peaks, format = "BED", extraCols=c("additionalScores" = "character")) +peaks$additionalScores = NULL +peaks$name = NULL + + + +# Prepare meta data +meta = data.frame( + id = c(1:length(clipFilesP)), + condition = factor(rep("all", length(clipFilesP))), # add option for multiple groups from sample file + clPlus = clipFilesP, + clMinus = clipFilesM) + + +# run BindingSiteFinder +####################### + +cat("############################# \n Running BindingSiteFinder \n############################# \n") +bds = BSFDataSetFromBigWig(ranges = peaks, meta = meta, silent =T) + +cat("\nGlobal filter on peak sites \n \n") +bds = do.call(pureClipGlobalFilter, + c(list(bds), + params.pureClipGlobalFilter)) # param cutoff +cat("\nEstimate binding site width \n \n") +chr_names <- unique(seqnames(peaks)) +bds = do.call(estimateBsWidth, + c(list(bds, + anno.genes = gns, + est.subsetChromosome = as.character(chr_names[1])), + params.estimateBsWidth)) # optional param: bsWidth + +cat("\nGenewise filter on peak sites \n \n") +bds = do.call(pureClipGeneWiseFilter, + c(list(bds, anno.genes = gns), + params.pureClipGeneWiseFilter)) # param cutoff, overlaps, match score, match geneID + +cat("\nMake binding sites \n \n") +bds = do.call(makeBindingSites, + c(list(bds), + params.makeBindingSites)) # params minWidth, minCrosslinks, minCLSites + + +# bds = do.call(reproducibilityFilter, c(list(bds), params.reproducibilityFilter)) # params cutoff, nReps +cat("\nAssign binding sites to genes \n \n") +bds = do.call(assignToGenes, c(list(bds, anno.genes = gns), + params.assignToGenes)) # params overlaps, overlaps.rule, match.geneID, match.geneName, match.geneType + +cat("\nAssign binding sites to transcript regions \n \n") +bds = do.call(assignToTranscriptRegions, c(list(bds,anno.transcriptRegionList = regions), + params.assignToTranscriptRegions))# params overlaps, overlaps.rule, + +cat("\nAnotate binding scores \n \n") +bds = do.call(annotateWithScore, c(list(bds, peaks),params.annotateWithScore)) #match.score, match.option + +cat("\nSaving bindings sites \n \n") +bs_gr = getRanges(bds) +names(bs_gr) <- 1:NROW(bs_gr) +bs_df <- as.data.frame(bs_gr) + + +# export outputs +######################## + +exportToBED(bds, con = paste0(params.input.output$output_path , "/myBindingSites.bed")) +saveRDS(bds, paste0(params.input.output$output_path ,"/bds_object.rds")) +saveRDS(bs_df, paste0(params.input.output$output_path ,"/bindingSites.rds")) +write.csv(bs_df, file = paste0(params.input.output$output_path,"/bindingSites.csv"), row.names = FALSE) + + diff --git a/bin/sortAnnotationForBindingSiteFinder.R b/bin/sortAnnotationForBindingSiteFinder.R new file mode 100755 index 00000000..3bf72750 --- /dev/null +++ b/bin/sortAnnotationForBindingSiteFinder.R @@ -0,0 +1,45 @@ +#!/usr/bin/env Rscript + +# command line arguments +args <- commandArgs(trailingOnly = TRUE) + +print(args) +annoFile = args[1] +out_gns = args[2] +out_regions = args[3] + +# for local tests +# annoFile = "/Users/melinaklostermann/Documents/projects/anno/GENCODEv31-p12/gencode.v31.annotation.gtf" +# out_gns = "/Users/melinaklostermann/Documents/projects/nf-core-clipseq/devel_folder/outputs/gns.rds" +# out_regions = "/Users/melinaklostermann/Documents/projects/nf-core-clipseq/devel_folder/outputs/regions.rds" + +# libraries +library(GenomicFeatures) + + + + +# Make annotation database from gff3 file +annoDb = GenomicFeatures::makeTxDbFromGFF(file = annoFile, format = "gtf") +annoInfo = rtracklayer::import(annoFile, format = "gtf") + + +# Get genes as GRanges +gns = genes(annoDb) +idx = match(gns$gene_id, annoInfo$gene_id) +meta = cbind(elementMetadata(gns), + elementMetadata(annoInfo)[idx,]) +meta = meta[,!duplicated(colnames(meta))] +elementMetadata(gns) = meta + +saveRDS(gns, out_gns) + + +# Get regions as Granges +cdseq = cds(annoDb) +intrns = unlist(intronsByTranscript(annoDb)) +utrs3 = unlist(threeUTRsByTranscript(annoDb)) +utrs5 = unlist(fiveUTRsByTranscript(annoDb)) +regions = GRangesList(CDS = cdseq, Intron = intrns, UTR3 = utrs3, UTR5 = utrs5) + +saveRDS(regions, out_regions) diff --git a/conf/test_full.config b/conf/test_full.config index 3e7a002d..a935e311 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -21,6 +21,7 @@ params { source = "fastq" // Genome references + ncrna_fasta = "https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/v_2_0/genome/homosapiens_smallRNA.fa.gz" fasta = 'https://ftp.ensembl.org/pub/release-111/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz' gtf = 'https://ftp.ensembl.org/pub/release-111/gtf/homo_sapiens/Homo_sapiens.GRCh38.111.gtf.gz' diff --git a/modules/local/BindingSiteFinder/DefineBindingSites/main.nf b/modules/local/BindingSiteFinder/DefineBindingSites/main.nf new file mode 100644 index 00000000..023368b0 --- /dev/null +++ b/modules/local/BindingSiteFinder/DefineBindingSites/main.nf @@ -0,0 +1,71 @@ +process defineBindingSites { + tag "$meta.id" + label 'process_single' + + container "${'docker.io/melinak/bindingsitefinder:1.1'}" + + input: + tuple val(meta), path(bw_files_folder) + tuple val(meta), path(peaks) + tuple val(meta), path(anno_gns) + tuple val(meta), path(anno_regions) + + output: + tuple val(meta), path("*binding_sites.rds"), emit: binding_sites_rds + tuple val(meta), path("*binding_sites.csv"), emit: binding_sites_csv + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + // the bindingSiteFinder sersion number will be printed to the console by the R script + + // optional parameters: + // --peak_score_global_cuttoff $params.peak_score_global_cuttoff \\ + // --bsWidth $params.bsWidth \\ + // --peak_score_genewise_cuttoff $params.peak_score_genewise_cuttoff \\ + // --minWidth $params.minWidth \\ + // --minCrosslinks $params.minCrosslinks \\ + // --minCLSites $params.minCLSites \\ + // --maxBsWidth $params.maxBsWidth \\ + // // --reproducibility_cutoff $params.reproducibility_cutoff \\ + // // --reproducibility_nReps $params.reproducibility_nReps \\ + // --method_gene_overlaps $params.method_gene_overlaps \\ + // --rule_gene_overlaps $params.rule_gene_overlaps \\ + // --method_region_overlaps $params.method_region_overlaps \\ + // --rule_region_overlaps $params.rule_region_overlaps \\ + // --match_score $params.match_score \\ + // --match_geneID $params.match_geneID \\ + // --match_geneName $params.match_geneName \\ + // --match_geneType $params.match_geneType \\ + // --match_score_option $params.match_score_option \\ + + """ + DefineBindingSites.R \\ + --bw_files_folder $bw_files_folder \\ + --peaks $peaks \\ + --anno_genes $anno_gns \\ + --anno_regions $anno_regions \\ + --output_path . \\ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + \$(Rscript -e "packageVersion('BindingSiteFinder')" |& sed '1!d ; s/[1] //') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + """ + touch binding_sites.rds + touch binding_sites.csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + \$(Rscript -e "packageVersion('BindingSiteFinder')" |& sed '1!d ; s/[1] //') + END_VERSIONS + """ +} diff --git a/modules/local/BindingSiteFinder/DefineBindingSites/test_run.sh b/modules/local/BindingSiteFinder/DefineBindingSites/test_run.sh new file mode 100644 index 00000000..f3337c74 --- /dev/null +++ b/modules/local/BindingSiteFinder/DefineBindingSites/test_run.sh @@ -0,0 +1,9 @@ +# without nextflow +docker run --rm -it -v /Users/melinaklostermann/Documents/projects:/mnt/ melinak/bindingsitefinder:1.0 bin/bash + +Rscript /mnt/nf-core-clipseq/modules/local/BindingSiteFinder/DefineBindingSites.R \ + --bw_files_folder "/mnt/nf-core-clipseq/devel_folder/example_inputs/AGO_iCLIP" \ + --peaks "/mnt/nf-core-clipseq/devel_folder/example_inputs/AGO_iCLIP/IP_WT_pureclip_sites.bed" \ + --anno_genes "/mnt/nf-core-clipseq/devel_folder/outputs/gns.rds" \ + --anno_regions "/mnt/nf-core-clipseq/devel_folder/outputs/regions.rds" \ + --output_path "/mnt/nf-core-clipseq/devel_folder/outputs" diff --git a/modules/local/BindingSiteFinder/DefineBindingSites/tests/main.nf.test b/modules/local/BindingSiteFinder/DefineBindingSites/tests/main.nf.test new file mode 100644 index 00000000..d56bb739 --- /dev/null +++ b/modules/local/BindingSiteFinder/DefineBindingSites/tests/main.nf.test @@ -0,0 +1,89 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core modules test modules/hirutest +nextflow_process { + + name "Test Process CLIPSEQ_DEFINEBINDINGSITES" + script "../main.nf" + process "defineBindingSites" + + tag "clipseq" + tag "clipseq_definebindingsites" + tag "definebindingsites" + + // Global setup for rds input files + setup { + run("sortAnnotationForBindingSiteFinder", alias: "ANNOTATIONS") { + script "../../sortAnnotationForBindingSiteFinder/main.nf" + process { + """ + input[0] = [ + [ id:'test_sort' ], // meta map + file('https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/v_2_0/genome/yeast_MitoV_filtered_seg.gtf'), + ] + """ + } + } + } + + test("DefineBindingSites - bw_files_folder, peak_bed, anno_genes_rds, anno_regions_rds") { + + // TODO nf-core: If you are created a test for a chained module + // (the module requires running more than one process to generate the required output) + // add the 'setup' method here. + // You can find more information about how to use a 'setup' method in the docs (https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules). + + when { + process { + """ + // TODO nf-core: define inputs of the process here. Example: + input[0] = [ + [ id:'test' ], // meta map + file('${projectDir}/tests/bigwigs', checkIfExists: true), + ] + input[1] = [ + [ id:'test' ], // meta map + file('${projectDir}/tests/peaks/HNRNPC_pureclip_crosslinks.bed', checkIfExists: true), + ] + input[2] = ANNOTATIONS.out[0] + input[3] = ANNOTATIONS.out[1] + """ + } + } + + then { + assertAll( + { assert process.success }, + // { assert snapshot(process.out).match() } + //TODO nf-core: Add all required assertions to verify the test output. + // See https://nf-co.re/docs/contributing/tutorials/nf-test_assertions for more information and examples. + ) + } + + } + + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix. + // test("DefineBindingSites - bw_files_folder, peak_bed, anno_genes_rds, anno_regions_rds - stub") { + + // options "-stub" + + // when { + // process { + // """ + // // TODO nf-core: define inputs of the process here. Example: + + // input = ["","","",""] + // """ + // } + // } + + // then { + // assertAll( + // { assert process.success }, + // { assert snapshot(process.out).match() } + // //TODO nf-core: Add all required assertions to verify the test output. + // ) + // } + + // } + +} diff --git a/modules/local/BindingSiteFinder/bsfQC/main.nf b/modules/local/BindingSiteFinder/bsfQC/main.nf new file mode 100644 index 00000000..7919574f --- /dev/null +++ b/modules/local/BindingSiteFinder/bsfQC/main.nf @@ -0,0 +1,40 @@ +process bsfQC { + tag "$meta.id" + label 'process_single' + + container "${'docker.io/melinak/bindingsitefinder:1.1'}" + + input: + tuple val(meta), path(binding_sites_rds) + + output: + tuple val(meta), path("*BindingSiteFinderQC.html"), emit: bindingSiteFinderQC + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + Rscript BindingSiteFinderQC.R \\ + $binding_sites_rds + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + \$(Rscript -e "packageVersion('BindingSiteFinder')" |& sed '1!d ; s/[1] //') + END_VERSIONS + """ + + stub: + def args = task.ext.a + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch gns.rds + touch regions.rds + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + \$(Rscript -e "packageVersion('BindingSiteFinder')" |& sed '1!d ; s/[1] //') + END_VERSIONS + """ +} \ No newline at end of file diff --git a/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/main.nf b/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/main.nf new file mode 100644 index 00000000..d441d344 --- /dev/null +++ b/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/main.nf @@ -0,0 +1,42 @@ +process SORT_ANNOTATION_FOR_BINDING_SITE_FINDER { + tag "$meta.id" + label 'process_single' + + container "${'docker.io/melinak/bindingsitefinder:1.1'}" + + input: + tuple val(meta), path(gtf_file) + + output: + tuple val(meta), path("gns.rds"), emit: gns_rds + tuple val(meta), path("regions.rds"), emit: regions_rds + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + sortAnnotationForBindingSiteFinder.R \\ + $gtf_file \\ + gns.rds \\ + regions.rds + cat <<-END_VERSIONS > versions.yml + "${task.process}": + \$(Rscript -e "packageVersion('BindingSiteFinder')" |& sed '1!d ; s/[1] //') + END_VERSIONS + """ + + stub: + def args = task.ext.a + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch gns.rds + touch regions.rds + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + \$(Rscript -e "packageVersion('BindingSiteFinder')" |& sed '1!d ; s/[1] //') + END_VERSIONS + """ +} diff --git a/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/tests/main.nf.test b/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/tests/main.nf.test new file mode 100644 index 00000000..423b3e69 --- /dev/null +++ b/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/tests/main.nf.test @@ -0,0 +1,64 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core modules test modules/hirutest +nextflow_process { + + name "Test Process CLIPSEQ_SORTANNOTATIONSFORBINDINGSITEFINDER" + script "../main.nf" + process "SORT_ANNOTATION_FOR_BINDING_SITE_FINDER" + + tag "clipseq" + tag "clipseq_sortannotationsforbindingsitefinder" + tag "sortannotationsforbindingsitefinder" + + test("sortAnnotationsForBindingSiteFinder - gtf") { + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file('https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/v_2_0/genome/yeast_MitoV_filtered_seg.gtf'), + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions") } + ) + + // These statements fail inside assertAll (not sure why) + assert new File(process.out.gns_rds[0][1]).exists() + assert new File(process.out.regions_rds[0][1]).exists() + } + + } + + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix. + test("sortAnnotationsForBindingSiteFinder - gtf - stub") { + + options "-stub" + + when { + process { + """ + // TODO nf-core: define inputs of the process here. Example: + + input[0] = [ + [ id:'test' ], // meta map + file('https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/v_2_0/genome/yeast_MitoV_filtered_seg.gtf'), + ] + """ + } + } + + then { + assert process.success + assert new File(process.out.gns_rds[0][1]).exists() + assert new File(process.out.regions_rds[0][1]).exists() + } + + } + +} diff --git a/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/tests/main.nf.test.snap b/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/tests/main.nf.test.snap new file mode 100644 index 00000000..03cf6c31 --- /dev/null +++ b/modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/tests/main.nf.test.snap @@ -0,0 +1,14 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,daf57731ee0810bf63125ebfd55f2faf" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-11-10T13:43:35.310569" + } +} \ No newline at end of file diff --git a/subworkflows/local/BindingSiteFinder.nf b/subworkflows/local/BindingSiteFinder.nf new file mode 100644 index 00000000..dcabb17d --- /dev/null +++ b/subworkflows/local/BindingSiteFinder.nf @@ -0,0 +1,42 @@ +nextflow.enable.dsl = 2 + +include { sortAnnotationForBindingSiteFinder } from '../../modules/local/sortAnnotationForBindingSiteFinder/main.nf' +include { BindingSiteFinderAnalysis } from '../../modules/local/BindingSiteFinder/main.nf' + +workflow BindingSiteFinder{ + take: + gtf_ch + // bw_files_folder + // peaks + + + main: + sorted_ch = sortAnnotationForBindingSiteFinder(gtf_ch) + + // BindingSiteFinderAnalysis( + // bw_files_folder, + // peaks, + // sorted_ch.gns, + // sorted_ch.regions, + // sample_sheet, + // // Here start optional parameters + // peak_score_global_cuttoff, + // bsWidth, + // peak_score_genewise_cuttoff, + // minWidth, + // minCrosslinks, + // minCLSites, + // maxBsWidth, + // reproducibility_cutoff, + // reproducibility_nReps, + // method_gene_overlaps, + // rule_gene_overlaps, + // method_region_overlaps, + // rule_region_overlaps, + // match_score, + // match_geneID, + // match_geneName, + // match_geneType, + // match_score_option + // ) +} diff --git a/subworkflows/local/bindingsitefinder/main.nf b/subworkflows/local/bindingsitefinder/main.nf new file mode 100644 index 00000000..9e050cc8 --- /dev/null +++ b/subworkflows/local/bindingsitefinder/main.nf @@ -0,0 +1,42 @@ + +include { sortAnnotationForBindingSiteFinder } from '../../../modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/main' +include { defineBindingSites } from '../../../modules/local/BindingSiteFinder/DefineBindingSites/main' +include { bsfQC } from '../../../modules/local/BindingSiteFinder/bsfQC/main' + +workflow BINDINGSITEFINDER { + + take: + + gtf_ch // channel: [ val(meta), [ gtf ] ] + bw_ch // channel: [ val(meta), [ bigwig ] ] + peak_ch // channel: [ peaks ] + + main: + + ch_versions = Channel.empty() + + // Destructure outputs from sortAnnotationForBindingSiteFinder(gtf_ch) + tuple_ch = sortAnnotationForBindingSiteFinder(gtf_ch) + gns_ch = tuple_ch.gns_rds + regions_ch = tuple_ch.regions_rds + ch_versions = ch_versions.mix(sortAnnotationForBindingSiteFinder.out.versions.first()) + + // Pass annotation outputs, bigwig files and peak file to sortAnnotationForBindingSiteFinder(bw_ch) + bs_ch = defineBindingSites(bw_ch, gns_ch, regions_ch, peak_ch) + ch_versions = ch_versions.mix(defineBindingSites.out.versions.first()) + + // Extract only the rds output from bs_ch + rds_ch = bs_ch.binding_sites_rds + + // Pass the rds output to bsfQC + qc_ch = bsfQC(rds_ch) + ch_versions = ch_versions.mix(bsfQC.out.versions.first()) + + emit: + csv = defineBindingSites.out.binding_sites_csv // channel: [ val(meta), [ csv ] ] + rds = defineBindingSites.out.binding_sites_rds // channel: [ val(meta), [ rds ] ] + html = bsfQC.out.bindingSiteFinderQC // channel: [ val(meta), [ html ] ] + + versions = ch_versions // channel: [ versions.yml ] +} + diff --git a/subworkflows/local/bindingsitefinder/meta.yml b/subworkflows/local/bindingsitefinder/meta.yml new file mode 100644 index 00000000..2a286607 --- /dev/null +++ b/subworkflows/local/bindingsitefinder/meta.yml @@ -0,0 +1,51 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "bindingsitefinder" +## TODO nf-core: Add a description of the subworkflow and list keywords +description: Sort SAM/BAM/CRAM file +keywords: + - sort + - bam + - sam + - cram +## TODO nf-core: Add a list of the modules and/or subworkflows used in the subworkflow +components: + - samtools/sort + - samtools/index +## TODO nf-core: List all of the channels used as input with a description and their structure +input: + - ch_bam: + type: file + description: | + The input channel containing the BAM/CRAM/SAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.{bam/cram/sam}" +## TODO nf-core: List all of the channels used as output with a descriptions and their structure +output: + - bam: + type: file + description: | + Channel containing BAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.bam" + - bai: + type: file + description: | + Channel containing indexed BAM (BAI) files + Structure: [ val(meta), path(bai) ] + pattern: "*.bai" + - csi: + type: file + description: | + Channel containing CSI files + Structure: [ val(meta), path(csi) ] + pattern: "*.csi" + - versions: + type: file + description: | + File containing software versions + Structure: [ path(versions.yml) ] + pattern: "versions.yml" +authors: + - "@MelinaKlostermann" +maintainers: + - "@MelinaKlostermann" diff --git a/subworkflows/local/bindingsitefinder/tests/main.nf.test b/subworkflows/local/bindingsitefinder/tests/main.nf.test new file mode 100644 index 00000000..9141f86d --- /dev/null +++ b/subworkflows/local/bindingsitefinder/tests/main.nf.test @@ -0,0 +1,45 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core subworkflows test bindingsitefinder +nextflow_workflow { + + name "Test Subworkflow BINDINGSITEFINDER" + script "../main.nf" + workflow "BINDINGSITEFINDER" + + tag "subworkflows" + tag "subworkflows_" + tag "subworkflows/bindingsitefinder" + // TODO nf-core: Add tags for all modules used within this subworkflow. Example: + tag "samtools" + tag "samtools/sort" + tag "samtools/index" + + + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used + test("sarscov2 - bam - single_end") { + + when { + workflow { + """ + // TODO nf-core: define inputs of the workflow here. Example: + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + ] + input[1] = [ + [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + ] + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + //TODO nf-core: Add all required assertions to verify the test output. + ) + } + } +} diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index ae509397..32b65e59 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -21,6 +21,7 @@ include { FILTER_GTF_BY_TRANSCRIPT include { ICOUNTMINI_SEGMENT as ICOUNT_SEG_GTF } from '../../modules/nf-core/icountmini/segment/main' include { ICOUNTMINI_SEGMENT as ICOUNT_SEG_FILTGTF } from '../../modules/nf-core/icountmini/segment/main' include { CLIPSEQ_RESOLVE_UNANNOTATED as RESOLVE_UNANNOTATED_REGIONS } from '../../modules/local/resolve_unannotated/main' +include { SORT_ANNOTATION_FOR_BINDING_SITE_FINDER } from '../../modules/local/BindingSiteFinder/sortAnnotationForBindingSiteFinder/main' workflow PREPARE_GENOME { take: @@ -294,6 +295,73 @@ workflow PREPARE_GENOME { // EXAMPLE CHANNEL STRUCT: [[meta], gtf] //RESOLVE_UNANNOTATED_REGIONS.out.gtf | view +<<<<<<< HEAD + // + // MODULE: Resolve the GTF regions that iCount did not annotate with genic_other flag + // + ch_seg_resolved_gtf_genic = Channel.of( [ [id:seg_resolved_gtf_genic.baseName], seg_resolved_gtf_genic ] ) + if (!params.seg_resolved_gtf_genic) { + RESOLVE_UNANNOTATED_GENIC_OTHER ( + ch_seg_gtf.map{ it[1] }, + ch_seg_filt_gtf.map{ it[1] }, + ch_gtf.map{ it[1] }, + ch_fasta_fai.map{ it[1] }, + true + ) + ch_seg_resolved_gtf_genic = RESOLVE_UNANNOTATED_GENIC_OTHER.out.gtf + } + // EXAMPLE CHANNEL STRUCT: [[meta], gtf] + //RESOLVE_UNANNOTATED_GENIC_OTHER.out.gtf | view + + // + // MODULE: Resolve the GTF regions that iCount did not annotate with genic_other flag REGIONS FILE + // + ch_regions_resolved_gtf_genic = Channel.of( [ [id:regions_resolved_gtf_genic.baseName], regions_resolved_gtf_genic ] ) + if (!params.regions_resolved_gtf_genic) { + RESOLVE_UNANNOTATED_GENIC_OTHER_REGIONS ( + ch_regions_gtf.map{ it[1] }, + ch_regions_filt_gtf.map{ it[1] }, + ch_gtf.map{ it[1] }, + ch_fasta_fai.map{ it[1] }, + true + ) + ch_regions_resolved_gtf_genic = RESOLVE_UNANNOTATED_GENIC_OTHER_REGIONS.out.gtf + } + // EXAMPLE CHANNEL STRUCT: [[meta], gtf] + //RESOLVE_UNANNOTATED_GENIC_OTHER_REGIONS.out.gtf | view + SORT_ANNOTATION_FOR_BINDING_SITE_FINDER ( + ch_filt_gtf + ) + ch_versions = ch_versions.mix(SORT_ANNOTATION_FOR_BINDING_SITE_FINDER.out.versions) + ch_gns_rds = SORT_ANNOTATION_FOR_BINDING_SITE_FINDER.out.gns_rds + ch_regions_rds = SORT_ANNOTATION_FOR_BINDING_SITE_FINDER.out.regions_rds + + emit: + fasta = ch_fasta // channel: [ val(meta), [ fasta ] ] + fasta_fai = ch_fasta_fai // channel: [ val(meta), [ fai ] ] + ncrna_fasta = ch_ncrna_fasta // channel: [ val(meta), [ fasta ] ] + ncrna_fasta_fai = ch_ncrna_fasta_fai // channel: [ val(meta), [ fai ] ] + genome_index = ch_star_index // channel: [ val(meta), [ star_index ] ] + ncrna_index = ch_bt_index // channel: [ val(meta), [ bt2_index ] ] + chrom_sizes = ch_genome_chrom_sizes // channel: [ val(meta), [ txt ] ] + ncrna_chrom_sizes = ch_ncrna_chrom_sizes // channel: [ val(meta), [ txt ] ] + gtf = ch_gtf // channel: [ val(meta), [ gtf ] ] + longest_transcript = ch_longest_transcript // channel: [ val(meta), [ txt ] ] + longest_transcript_fai = ch_longest_transcript_fai // channel: [ val(meta), [ fai ] ] + longest_transcript_gtf = ch_longest_transcript_gtf // channel: [ val(meta), [ fai ] ] + filtered_gtf = ch_filt_gtf // channel: [ val(meta), [ gtf ] ] + seg_gtf = ch_seg_gtf // channel: [ val(meta), [ gtf ] ] + seg_filt_gtf = ch_seg_filt_gtf // channel: [ val(meta), [ gtf ] ] + seg_resolved_gtf = ch_seg_resolved_gtf // channel: [ val(meta), [ gtf ] ] + seg_resolved_gtf_genic = ch_seg_resolved_gtf_genic // channel: [ val(meta), [ gtf ] ] + regions_gtf = ch_regions_gtf // channel: [ val(meta), [ gtf ] ] + regions_filt_gtf = ch_regions_filt_gtf // channel: [ val(meta), [ gtf ] ] + regions_resolved_gtf = ch_regions_resolved_gtf // channel: [ val(meta), [ gtf ] ] + regions_resolved_gtf_genic = ch_regions_resolved_gtf_genic // channel: [ val(meta), [ gtf ] ] + gns_rds = ch_gns_rds // channel: [ val(meta), [ rds ] ] + regions_rds = ch_regions_rds // channel: [ val(meta), [ rds ] ] + versions = ch_versions // channel: [ versions.yml ] +======= emit: @@ -315,4 +383,5 @@ workflow PREPARE_GENOME { regions_filt_gtf = ch_regions_filt_gtf // channel: [ val(meta), [ gtf ] ] or Channel.empty() regions_resolved_gtf = ch_regions_resolved_gtf // channel: [ val(meta), [ gtf ] ] or Channel.empty() versions = ch_versions // channel: [ versions.yml ] +>>>>>>> feat-2-0 } diff --git a/tests/bigwigs/HNRNPC.genome.xl.bedgraph_minus.bw b/tests/bigwigs/HNRNPC.genome.xl.bedgraph_minus.bw new file mode 100644 index 00000000..a136ad2d Binary files /dev/null and b/tests/bigwigs/HNRNPC.genome.xl.bedgraph_minus.bw differ diff --git a/tests/bigwigs/HNRNPC.genome.xl.bedgraph_plus.bw b/tests/bigwigs/HNRNPC.genome.xl.bedgraph_plus.bw new file mode 100644 index 00000000..509b8b38 Binary files /dev/null and b/tests/bigwigs/HNRNPC.genome.xl.bedgraph_plus.bw differ diff --git a/tests/bigwigs/PHO92_A.genome.xl.bedgraph_minus.bw b/tests/bigwigs/PHO92_A.genome.xl.bedgraph_minus.bw new file mode 100644 index 00000000..a136ad2d Binary files /dev/null and b/tests/bigwigs/PHO92_A.genome.xl.bedgraph_minus.bw differ diff --git a/tests/bigwigs/PHO92_A.genome.xl.bedgraph_plus.bw b/tests/bigwigs/PHO92_A.genome.xl.bedgraph_plus.bw new file mode 100644 index 00000000..509b8b38 Binary files /dev/null and b/tests/bigwigs/PHO92_A.genome.xl.bedgraph_plus.bw differ diff --git a/tests/bigwigs/PHO92_B.genome.xl.bedgraph_minus.bw b/tests/bigwigs/PHO92_B.genome.xl.bedgraph_minus.bw new file mode 100644 index 00000000..a136ad2d Binary files /dev/null and b/tests/bigwigs/PHO92_B.genome.xl.bedgraph_minus.bw differ diff --git a/tests/bigwigs/PHO92_B.genome.xl.bedgraph_plus.bw b/tests/bigwigs/PHO92_B.genome.xl.bedgraph_plus.bw new file mode 100644 index 00000000..509b8b38 Binary files /dev/null and b/tests/bigwigs/PHO92_B.genome.xl.bedgraph_plus.bw differ diff --git a/tests/bigwigs/PHO92_C.genome.xl.bedgraph_minus.bw b/tests/bigwigs/PHO92_C.genome.xl.bedgraph_minus.bw new file mode 100644 index 00000000..a136ad2d Binary files /dev/null and b/tests/bigwigs/PHO92_C.genome.xl.bedgraph_minus.bw differ diff --git a/tests/bigwigs/PHO92_C.genome.xl.bedgraph_plus.bw b/tests/bigwigs/PHO92_C.genome.xl.bedgraph_plus.bw new file mode 100644 index 00000000..509b8b38 Binary files /dev/null and b/tests/bigwigs/PHO92_C.genome.xl.bedgraph_plus.bw differ diff --git a/tests/nextflow.config b/tests/nextflow.config new file mode 100644 index 00000000..e69de29b diff --git a/tests/peaks/HNRNPC_pureclip_crosslinks.bed b/tests/peaks/HNRNPC_pureclip_crosslinks.bed new file mode 100644 index 00000000..02b14ac7 --- /dev/null +++ b/tests/peaks/HNRNPC_pureclip_crosslinks.bed @@ -0,0 +1,5 @@ +V 138782 138783 3 2.04685 + [score_CL=2.04685;score_E=54.9984;score_B=20.4483;score_UC=2.04685] +V 269911 269912 3 9.32598 + [score_CL=9.32598;score_E=32.3965;score_B=20.6469;score_UC=9.32598] +V 402293 402294 3 11.2448 + [score_CL=11.2448;score_E=58.8501;score_B=39.9819;score_UC=11.2448] +V 402296 402297 3 0.568906 + [score_CL=0.568906;score_E=58.8411;score_B=19.0752;score_UC=0.568906] +V 244583 244584 3 9.32598 - [score_CL=9.32598;score_E=32.3965;score_B=20.6469;score_UC=9.32598] diff --git a/tests/peaks/HNRNPC_pureclip_peaks.bed b/tests/peaks/HNRNPC_pureclip_peaks.bed new file mode 100644 index 00000000..6b1c0058 --- /dev/null +++ b/tests/peaks/HNRNPC_pureclip_peaks.bed @@ -0,0 +1,4 @@ +V 138782 138783 2.04685; 2.04685 + +V 269911 269912 9.32598; 9.32598 + +V 402293 402297 11.2448;0.568906; 11.8137 + +V 244583 244584 9.32598; 9.32598 - diff --git a/workflows/clipseq.nf b/workflows/clipseq.nf index a3078633..ed452c9e 100644 --- a/workflows/clipseq.nf +++ b/workflows/clipseq.nf @@ -25,7 +25,7 @@ for (param in check_param_list) { } } -// Check non-mandatory input parameters to see if the files exist if they have been specified +// Check non-manditory input parameters to see if the files exist if they have been specified def checkPathParamList = [ params.multiqc_config, params.fasta_fai, @@ -249,6 +249,8 @@ workflow CLIPSEQ { ch_regions_resolved_gtf = PREPARE_GENOME.out.regions_resolved_gtf.collect() ch_genome_index = PREPARE_GENOME.out.genome_index.collect() ch_ncrna_genome_index = PREPARE_GENOME.out.ncrna_index.collect() + ch_gns_rds = PREPARE_GENOME.out.gns_rds + ch_regions_rds = PREPARE_GENOME.out.regions_rds } //