diff --git a/.github/workflows/test.config b/.github/workflows/test.config deleted file mode 100644 index e64287d..0000000 --- a/.github/workflows/test.config +++ /dev/null @@ -1,19 +0,0 @@ -/* -======================================================================================== - Nextflow config file for running tests (GitHub Actions workflow) -======================================================================================== -*/ - -process.container = "vibpsb/mini-ac:latest" -singularity { - enabled = true - cacheDir = "singularity_cache" - autoMounts = true - runOptions = "--bind %TMP%" -} - -workDir = "%TMP%/MINI-AC" - -executor { - name = 'local' -} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5713e3..7571cf6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - name: Prepare nf-test config file - run: cat .github/workflows/test.config | sed "s@%TMP%@${RUNNER_TEMP}@g" > tests/nextflow.config + run: sed -i -e "s@%TMP%@${RUNNER_TEMP}@g" tests/nextflow.config - uses: actions/setup-java@v3 with: @@ -38,10 +38,10 @@ jobs: - name: Fetch motif mapping files run: | - curl -k -o tests/data/zma_v4/zma_v4_genome_wide_motif_mappings_chr1.bed https://floppy.psb.ugent.be/index.php/s/NekMYztyxEnsQiY/download/zma_v4_genome_wide_motif_mappings_chr1.bed - curl -k -o tests/data/zma_v4/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed https://floppy.psb.ugent.be/index.php/s/r2wQmFjPy79qSp7/download/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed - curl -k -o tests/data/ath/ath_genome_wide_motif_mappings.bed https://floppy.psb.ugent.be/index.php/s/iaZPwdrRGe3YDdK/download/ath_genome_wide_motif_mappings.bed - curl -k -o tests/data/ath/ath_locus_based_motif_mappings_5kbup_1kbdown.bed https://floppy.psb.ugent.be/index.php/s/qcQ7KndzHaSpd9e/download/ath_locus_based_motif_mappings_5kbup_1kbdown.bed + curl -k -o tests/data/zma_v4_chr1/zma_v4_genome_wide_motif_mappings_chr1.bed https://floppy.psb.ugent.be/index.php/s/NekMYztyxEnsQiY/download/zma_v4_genome_wide_motif_mappings_chr1.bed + curl -k -o tests/data/zma_v4_chr1/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed https://floppy.psb.ugent.be/index.php/s/r2wQmFjPy79qSp7/download/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed + curl -k -o data/ath/ath_genome_wide_motif_mappings.bed https://floppy.psb.ugent.be/index.php/s/iaZPwdrRGe3YDdK/download/ath_genome_wide_motif_mappings.bed + curl -k -o data/ath/ath_locus_based_motif_mappings_5kbup_1kbdown.bed https://floppy.psb.ugent.be/index.php/s/qcQ7KndzHaSpd9e/download/ath_locus_based_motif_mappings_5kbup_1kbdown.bed - name: Run nf-test shell: bash diff --git a/.gitignore b/.gitignore index 573806b..b5a760b 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,4 @@ slurm.*.err # python cache and compiled files __pycache__/ -*.pyc \ No newline at end of file +*.pyc diff --git a/README.md b/README.md index d5282ec..188b2ff 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ Should you encounter a bug or have any questions or suggestions, please [open an When publishing results generated using MINI-AC, please cite: -Manosalva Pérez, Nicolás, Camilla Ferrari, Julia Engelhorn, Thomas Depuydt, Hilde Nelissen, Thomas Hartwig, and Klaas Vandepoele. “MINI-AC: Inference of Plant Gene Regulatory Networks Using Bulk or Single-Cell Accessible Chromatin Profiles.” bioRxiv, May 26, 2023. https://doi.org/10.1101/2023.05.26.542269. +Manosalva Pérez, Nicolás, Camilla Ferrari, Julia Engelhorn, Thomas Depuydt, Hilde Nelissen, Thomas Hartwig, and Klaas Vandepoele. “MINI-AC: Inference of Plant Gene Regulatory Networks Using Bulk or Single-Cell Accessible Chromatin Profiles.” The Plant Journal. https://doi.org/10.1111/tpj.16483. ## Contact diff --git a/docs/configuration_pipeline.md b/docs/configuration_pipeline.md index 02389cb..2422d88 100644 --- a/docs/configuration_pipeline.md +++ b/docs/configuration_pipeline.md @@ -28,7 +28,7 @@ MINI-AC has several optional parameters that affect the output and some aspects ### GRN inference parameters -* **Motif enrichment p-value cut-off**: This is the p-value cut-off that determines which motifs are enriched and used for GRN building. We do not recommend changing this parameter. It has been internally pre-defined for each MINI-AC mode based on the p-value cut-offs with a false discovery rate of 0 (see publication). If wished, however, this p-value can be overwritten in the configuration file by setting the parameter ```P_val``` to whatever value (see below) or in the command line options. For example: ```nextflow -C mini_ac.config run mini_ac.nf --mode genome_wide --species maize_v4 --P_val 0.05``` +* **Motif enrichment p-value cut-off**: This is the p-value cut-off that determines which motifs are enriched and used for GRN building. We do not recommend changing this parameter. It has been internally pre-defined for each MINI-AC mode based on the p-value cut-offs with a false discovery rate of 0 (see [publication](https://doi.org/10.1111/tpj.16483)). If wished, however, this p-value can be overwritten in the configuration file by setting the parameter ```P_val``` to whatever value (see below) or in the command line options. For example: ```nextflow -C mini_ac.config run mini_ac.nf --mode genome_wide --species maize_v4 --P_val 0.05``` * **Overlap criteria parameter**: By default, MINI-AC computes motif enrichment counting the motif matches within ACRs. This, however, is difficult if the ACRs are shorter than or of similar size to the motifs, which is the case of footprints. In this case, we observed that counting the absolute base-pair overlap is useful. Therefore, in case of using footprints or short ACRs (high resolution), we recommend setting the parameter ```Bps_intersect = true```. Otherwise it should be kept ```Bps_intersect = false```. diff --git a/test.sh b/test.sh deleted file mode 100755 index 86cf535..0000000 --- a/test.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# -#SBATCH -p all # partition (queue) -#SBATCH -c 1 # number of cores -#SBATCH --mem 8G # memory pool for all cores -#SBATCH -o slurm.%N.%j.out # STDOUT -#SBATCH -e slurm.%N.%j.err # STDERR - -module load nextflow - -# fetch zma_v4 test motif mappings (if not already present) -zma_v4_genome_wide_motif_mapping=tests/data/zma_v4/zma_v4_genome_wide_motif_mappings_chr1.bed -zma_v4_locus_based_motif_mapping=tests/data/zma_v4/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed -ath_genome_wide_motif_mapping=tests/data/ath/ath_genome_wide_motif_mappings.bed -ath_locus_based_motif_mapping=tests/data/ath/ath_locus_based_motif_mappings_5kbup_1kbdown.bed - -if [ ! -f "$zma_v4_genome_wide_motif_mapping" ]; then - curl -k -o $zma_v4_genome_wide_motif_mapping https://floppy.psb.ugent.be/index.php/s/NekMYztyxEnsQiY/download/zma_v4_genome_wide_motif_mappings_chr1.bed -fi - -if [ ! -f "$zma_v4_locus_based_motif_mapping" ]; then - curl -k -o $zma_v4_locus_based_motif_mapping https://floppy.psb.ugent.be/index.php/s/r2wQmFjPy79qSp7/download/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed -fi - -if [ ! -f "$ath_genome_wide_motif_mapping" ]; then - curl -k -o $ath_genome_wide_motif_mapping https://floppy.psb.ugent.be/index.php/s/iaZPwdrRGe3YDdK/download/ath_genome_wide_motif_mappings.bed -fi - -if [ ! -f "$ath_locus_based_motif_mapping" ]; then - curl -k -o $ath_locus_based_motif_mapping https://floppy.psb.ugent.be/index.php/s/qcQ7KndzHaSpd9e/download/ath_locus_based_motif_mappings_5kbup_1kbdown.bed -fi - -# install nf-test locally (if not already present) -if [ ! -f "nf-test" ]; then - wget -qO- https://code.askimed.com/install/nf-test | bash -fi - -# run MINI-AC test pipeline -./nf-test test $1 diff --git a/tests/data/ath/.keep b/tests/data/ath/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/tests/data/zma_v4/zma_v4_noncod_merged_chr1.bed b/tests/data/zma_v4_chr1/zma_v4_noncod_merged_chr1.bed similarity index 100% rename from tests/data/zma_v4/zma_v4_noncod_merged_chr1.bed rename to tests/data/zma_v4_chr1/zma_v4_noncod_merged_chr1.bed diff --git a/tests/data/zma_v4/zma_v4_promoter_5kbup_1kbdown_sorted_chr1.bed b/tests/data/zma_v4_chr1/zma_v4_promoter_5kbup_1kbdown_sorted_chr1.bed similarity index 100% rename from tests/data/zma_v4/zma_v4_promoter_5kbup_1kbdown_sorted_chr1.bed rename to tests/data/zma_v4_chr1/zma_v4_promoter_5kbup_1kbdown_sorted_chr1.bed diff --git a/tests/mini_ac.nf.test b/tests/mini_ac.nf.test index 2fd20b2..188f08b 100644 --- a/tests/mini_ac.nf.test +++ b/tests/mini_ac.nf.test @@ -22,8 +22,8 @@ nextflow_workflow { Shuffle_seed = 42 //// Hard code data paths - MotMapsFile = "${baseDir}/tests/data/zma_v4/zma_v4_genome_wide_motif_mappings_chr1.bed" - Non_cod_genome = "${baseDir}/tests/data/zma_v4/zma_v4_noncod_merged_chr1.bed" + MotMapsFile = "${baseDir}/tests/data/zma_v4_chr1/zma_v4_genome_wide_motif_mappings_chr1.bed" + Non_cod_genome = "${baseDir}/tests/data/zma_v4_chr1/zma_v4_noncod_merged_chr1.bed" Faix_file = "${baseDir}/data/zma_v4/zma_v4.fasta.fai" Motif_tf_file = "${baseDir}/data/zma_v4/zma_v4_motif_TF_file.txt" Genes_coords = "${baseDir}/data/zma_v4/zma_v4_genes_coords_sorted.bed" @@ -58,12 +58,6 @@ nextflow_workflow { Second_gene_annot = true Second_gene_dist = 500 } - workflow { - """ - // define inputs of the workflow here. Example: - // input[0] = file("test-file.txt") - """ - } } then { @@ -97,8 +91,8 @@ nextflow_workflow { Shuffle_seed = 42 //// Hard code data paths - MotMapsFile = "${baseDir}/tests/data/zma_v4/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed" - Promoter_file = "${baseDir}/tests/data/zma_v4/zma_v4_promoter_5kbup_1kbdown_sorted_chr1.bed" + MotMapsFile = "${baseDir}/tests/data/zma_v4_chr1/zma_v4_locus_based_motif_mappings_5kbup_1kbdown_chr1.bed" + Promoter_file = "${baseDir}/tests/data/zma_v4_chr1/zma_v4_promoter_5kbup_1kbdown_sorted_chr1.bed" Faix_file = "${baseDir}/data/zma_v4/zma_v4.fasta.fai" Motif_tf_file = "${baseDir}/data/zma_v4/zma_v4_motif_TF_file.txt" Feature_file = "${baseDir}/data/zma_v4/zma_v4_go_gene_file.txt" @@ -126,12 +120,6 @@ nextflow_workflow { //// Prediction parameters Bps_intersect = true } - workflow { - """ - // define inputs of the workflow here. Example: - // input[0] = file("test-file.txt") - """ - } } then { @@ -165,7 +153,7 @@ nextflow_workflow { Shuffle_seed = 42 //// Hard code data paths - MotMapsFile = "${baseDir}/tests/data/ath/ath_genome_wide_motif_mappings.bed" + MotMapsFile = "${baseDir}/data/ath/ath_genome_wide_motif_mappings.bed" Non_cod_genome = "${baseDir}/data/ath/ath_noncod_merged.bed" Faix_file = "${baseDir}/data/ath/ath.fasta.fai" Motif_tf_file = "${baseDir}/data/ath/ath_motif_TF_file.txt" @@ -199,12 +187,6 @@ nextflow_workflow { Second_gene_annot = false Second_gene_dist = 0 } - workflow { - """ - // define inputs of the workflow here. Example: - // input[0] = file("test-file.txt") - """ - } } then { @@ -238,7 +220,7 @@ nextflow_workflow { Shuffle_seed = 42 //// Hard code data paths - MotMapsFile = "${baseDir}/tests/data/ath/ath_locus_based_motif_mappings_5kbup_1kbdown.bed" + MotMapsFile = "${baseDir}/data/ath/ath_locus_based_motif_mappings_5kbup_1kbdown.bed" Promoter_file = "${baseDir}/data/ath/ath_promoter_5kbup_1kbdown_sorted.bed" Faix_file = "${baseDir}/data/ath/ath.fasta.fai" Motif_tf_file = "${baseDir}/data/ath/ath_motif_TF_file.txt" @@ -265,12 +247,6 @@ nextflow_workflow { //// Prediction parameters Bps_intersect = false } - workflow { - """ - // define inputs of the workflow here. Example: - // input[0] = file("test-file.txt") - """ - } } then { diff --git a/tests/nextflow.config b/tests/nextflow.config index 2ce1332..4f0f2fa 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -1,7 +1,7 @@ /* -======================================================================================== - Nextflow config file for running tests -======================================================================================== +=========================================================================== + Nextflow config file for running tests (GitHub Actions workflow) +=========================================================================== */ process.container = "vibpsb/mini-ac:latest" @@ -9,38 +9,11 @@ singularity { enabled = true cacheDir = "singularity_cache" autoMounts = true - runOptions = "--bind $TMPDIR" + runOptions = "--bind %TMP%" } -workDir = "$TMPDIR/MINI-AC" - -// WHEN USING HPC SLURM UNCOMMENT THE CODE BELOW +workDir = "%TMP%/MINI-AC" executor { - name = 'slurm' - queueSize = 25 -} - -process { - withName: get_ACR_shufflings { - clusterOptions = '--mem 4G' - } - withName: getStats { - clusterOptions = '--mem 10G' - } - withName: getStats_bps { - clusterOptions = '--mem 50G' - } - withName: getNetwork { - clusterOptions = '--mem 20G' - } - withName: filterSetOfGenes { - clusterOptions = '--mem 5G' - } - withName: GOenrichment { - clusterOptions = '--mem 5G' - } - withName: getIntegrativeOutputs { - clusterOptions = '--mem 3G' - } + name = 'local' }