Skip to content

Commit

Permalink
Merge pull request #22 from jsalignon/revisions
Browse files Browse the repository at this point in the history
Revisions
  • Loading branch information
jsalignon authored May 5, 2024
2 parents 6db3423 + 23570a0 commit 34a13de
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 51 deletions.
68 changes: 43 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,40 @@ Types of changes
Fixed for any bug fixes.
Security in case of vulnerabilities. -->

## [v1.0.0](https://github.com/jsalignon/cactus/releases/tag/v1.0.0) - Aztekium, 05-05-2024

### Added
- Added PA filters to keep peaks at less or more than 10 or 100 kilobases (lt10kb, lt100kb, mt10kb, mt100kb). [#21, 021de6f](https://github.com/jsalignon/cactus/commit/021de6f05c25ed834aee493d3128de774c79dff7)
- Added PA filters to keep peaks at less than arbitrary defined cutoffs (ltXkb, mtYkb), with cutoffs defined with the new parameters *custom_distance__less_than_X_b* and *custom_distance__more_than_Y_b*. [#21, 021de6f](https://github.com/jsalignon/cactus/commit/021de6f05c25ed834aee493d3128de774c79dff7)

### Changed

### Fixed
- Fixed a small typo that was making the previous release (0.9.0) crash during the DA_ATAC__saving_detailed_results_tables process. [#21](https://github.com/jsalignon/cactus/pull/21), [5ac9710](https://github.com/jsalignon/cactus/commit/5ac9710ebac7341dd378db5cbfa0ec187e413b13#diff-6401496ba455b9488ffa902a6e4d7732b2c60ff2d77c5c3ef96b28a7ac7d3b28L2772), [827df11](https://github.com/jsalignon/cactus/commit/827df11f8af185213762426fc8c9cbd08e1e15a2#diff-6401496ba455b9488ffa902a6e4d7732b2c60ff2d77c5c3ef96b28a7ac7d3b28L2775)

### Deprecated

### Removed
- Removed the PA filters: 3kb, 8kb, and 30kb. [#21](https://github.com/jsalignon/cactus/pull/21)

### Dependencies


## [v0.9.0](https://github.com/jsalignon/cactus/releases/tag/v0.9.0) - Gymnocalycium, 22-04-2024

### Added

- [#20](https://github.com/jsalignon/cactus/pull/20) - Added a tutorial section in the documentation and an associated script.
- [#20](https://github.com/jsalignon/cactus/pull/20) - Added figures for the manuscript: genome track plots, examples of figures and tables from the worm test dataset.
- [#20, commit 8ab3377](https://github.com/jsalignon/cactus/commit/8ab33772fd9493a542478ebc1746ae3eb9af0cc3) - Added Peak Annotation filters to keep only peaks at less than 3, 8 or 30 kilobases to their closest gene.
- [#20, commit 7f797f8](https://github.com/jsalignon/cactus/commit/7f797f892db6d83f9409eea33d5cf658ebe6ad4b) - Added ChIPseeker options to ignore upstream or downstream of peak for closest gene annotation.
- [#19](https://github.com/jsalignon/cactus/pull/19) - Added quickstart scripts.
- Added a tutorial section in the documentation and an associated script. [#20](https://github.com/jsalignon/cactus/pull/20)
- Added figures for the manuscript: genome track plots, examples of figures and tables from the worm test dataset. [#20](https://github.com/jsalignon/cactus/pull/20)
- Added Peak Annotation filters to keep only peaks at less than 3, 8 or 30 kilobases to their closest gene. [#20, 8ab3377](https://github.com/jsalignon/cactus/commit/8ab33772fd9493a542478ebc1746ae3eb9af0cc3)
- Added ChIPseeker options to ignore upstream or downstream of peak for closest gene annotation. [#20, 7f797f8](https://github.com/jsalignon/cactus/commit/7f797f892db6d83f9409eea33d5cf658ebe6ad4b)
- Added quickstart scripts. [#19](https://github.com/jsalignon/cactus/pull/19)

### Changed

### Fixed

- [#20, commit 250afb6](https://github.com/jsalignon/cactus/commit/250afb6174c3e976ec9eda72da480732daf8a938#diff-6401496ba455b9488ffa902a6e4d7732b2c60ff2d77c5c3ef96b28a7ac7d3b28) - Fixing a typo which prevented bigWig files from being saved.
- Fixing a typo which prevented bigWig files from being saved. [#20, 250afb6](https://github.com/jsalignon/cactus/commit/250afb6174c3e976ec9eda72da480732daf8a938#diff-6401496ba455b9488ffa902a6e4d7732b2c60ff2d77c5c3ef96b28a7ac7d3b28)

### Deprecated

Expand All @@ -53,7 +71,7 @@ Types of changes

### Added

- [#18](https://github.com/jsalignon/cactus/pull/18) - Added the code for the case study.
- Added the code for the case study. [#18](https://github.com/jsalignon/cactus/pull/18)

### Changed

Expand All @@ -72,7 +90,7 @@ Types of changes

### Changed

- Changed the code to make Cactus work with the latest versions of Singularity, Docker, conda and Mamba. [commit](https://github.com/jsalignon/cactus/commit/c8757995185317b0a828f61375bdb7605ce111e4)
- Changed the code to make Cactus work with the latest versions of Singularity, Docker, conda and Mamba. [c875799](https://github.com/jsalignon/cactus/commit/c8757995185317b0a828f61375bdb7605ce111e4)
- Changed the documentation of the Quickstart and dependencies. [567e048](https://github.com/jsalignon/cactus/commit/567e048a75e83ee062c9ec32996693ce24b165e8) [f8b2027](https://github.com/jsalignon/cactus/commit/f8b2027b105f823ef7a460a17677e190388f056c)
- Changed the documentation of the new containers. [e89cb32](https://github.com/jsalignon/cactus/commit/e89cb32f42d833a0352cb1a570778b7729aee461)
- Changed the Nextflow version manifest to give an error message if a wrong version is used. [51981f3](https://github.com/jsalignon/cactus/commit/51981f39e3db3050c8a2958767cd89269dc578b5)
Expand All @@ -87,7 +105,7 @@ Types of changes
### Removed

### Dependencies
- upgraded dependencies: Docker 24.0.5, build 24.0.5-0ubuntu1~20.04., conda: 23.7.4, Mamba: 1.4.2. [567e048](https://github.com/jsalignon/cactus/commit/567e048a75e83ee062c9ec32996693ce24b165e8)
- Upgraded dependencies: Docker 24.0.5, build 24.0.5-0ubuntu1~20.04., conda: 23.7.4, Mamba: 1.4.2. [567e048](https://github.com/jsalignon/cactus/commit/567e048a75e83ee062c9ec32996693ce24b165e8)



Expand All @@ -97,18 +115,18 @@ Types of changes

### Changed

- Changed the code to make Cactus work with the latest versions of Nextflow, Singularity and Docker. [commit](https://github.com/jsalignon/cactus/commit/ce2b6dd3d8ca8beee5479e85a4d24e4c4b022641)
- Changed the documentation to clarify the dependencies. [commit](https://github.com/jsalignon/cactus/commit/0f45173c61a78dd8ce742ff6413c90d1c699575e)
- Changed the CITATIONS.md and the README.md to add a link to Cactus preprint. [commit](https://github.com/jsalignon/cactus/commit/0e7b6ba4cb4269708897f8ad27adc57048dc9229)
- Changed the code to make Cactus work with the latest versions of Nextflow, Singularity and Docker. [ce2b6dd](https://github.com/jsalignon/cactus/commit/ce2b6dd3d8ca8beee5479e85a4d24e4c4b022641)
- Changed the documentation to clarify the dependencies. [0f45173](https://github.com/jsalignon/cactus/commit/0f45173c61a78dd8ce742ff6413c90d1c699575e)
- Changed the CITATIONS.md and the README.md to add a link to Cactus preprint. [0e7b6ba](https://github.com/jsalignon/cactus/commit/0e7b6ba4cb4269708897f8ad27adc57048dc9229)

### Fixed

- Fixed a bug happening in conda/Mamba when users have a .Renviron or a .Rprofile file. [commit](https://github.com/jsalignon/cactus/commit/a188dbb31dfe34547aaab427175dde28237ac36a)
- Fixed a bug with conda/Mamba for merging pdf. [commit](https://github.com/jsalignon/cactus/commit/a188dbb31dfe34547aaab427175dde28237ac36a)
- Fixed a bug happening in conda/Mamba when users have a .Renviron or a .Rprofile file. [a188dbb](https://github.com/jsalignon/cactus/commit/a188dbb31dfe34547aaab427175dde28237ac36a)
- Fixed a bug with conda/Mamba for merging pdf. [a188dbb](https://github.com/jsalignon/cactus/commit/a188dbb31dfe34547aaab427175dde28237ac36a)

### Deprecated

- Deprecated the use of conda and Mamba temporarily until a bug in conda is resolved. [commit](https://github.com/jsalignon/cactus/commit/0f45173c61a78dd8ce742ff6413c90d1c699575e)
- Deprecated the use of conda and Mamba temporarily until a bug in conda is resolved. [0f45173](https://github.com/jsalignon/cactus/commit/0f45173c61a78dd8ce742ff6413c90d1c699575e)

### Removed

Expand All @@ -122,11 +140,11 @@ Types of changes

### Changed

- Changed the README.md file to add a link to the preprint and to the LICENCE: [1](https://github.com/jsalignon/cactus/commit/c6cae1efa6a1d6d94a8fe31d4f1a3c73a8046b26), [2](https://github.com/jsalignon/cactus/commit/b4ae5c359f6aea80ab236c5064372742e76ff34e)
- Changed the README.md file to add a link to the preprint and to the LICENCE: [c6cae1e](https://github.com/jsalignon/cactus/commit/c6cae1efa6a1d6d94a8fe31d4f1a3c73a8046b26), [b4ae5c3](https://github.com/jsalignon/cactus/commit/b4ae5c359f6aea80ab236c5064372742e76ff34e)

### Fixed

- [#11](https://github.com/jsalignon/cactus/pull/11) - Fixed a bug in the heatmap process that made the fly test dataset fail.
- Fixed a bug in the heatmap process that made the fly test dataset fail. [#11](https://github.com/jsalignon/cactus/pull/11)

### Deprecated

Expand All @@ -140,15 +158,15 @@ Types of changes

### Added

- [#6](https://github.com/jsalignon/cactus/pull/6) - Added options to keep unique DA and NDA genes or not in the splitting process
- Added options to keep unique DA and NDA genes or not in the splitting process. [#6](https://github.com/jsalignon/cactus/pull/6)

### Changed

- [#5](https://github.com/jsalignon/cactus/pull/5) - Changed the docs
- Changed the docs. [#5](https://github.com/jsalignon/cactus/pull/5)

### Fixed

- [#8](https://github.com/jsalignon/cactus/pull/8) - Fixed a bug in the script to download test datasets and references
- Fixed a bug in the script to download test datasets and references. [#8](https://github.com/jsalignon/cactus/pull/8)

### Deprecated

Expand All @@ -161,19 +179,19 @@ Types of changes

### Added

- [adding a functionality to manually set the size of the numbers indicating the overlap in the cells for the heatmap figures](https://github.com/jsalignon/cactus/commit/bf0f8aa2925d03760d54c35475415bae538625a3)
- Added a functionality to manually set the size of the numbers indicating the overlap in the cells for the heatmap figures. [bf0f8aa](https://github.com/jsalignon/cactus/commit/bf0f8aa2925d03760d54c35475415bae538625a3)

### Changed

- Updated the docs to match with latest version of manuscript in preparation: [1](https://github.com/jsalignon/cactus/commit/bc11d3a39c05686c9dc6ceb7555539334043ce70), [2](https://github.com/jsalignon/cactus/commit/ac0eafa643f85de6efa2cbd8d1aae62059683325), [3](https://github.com/jsalignon/cactus/commit/f2739517621504c756f1304139dab01b99f0ecae), [4](https://github.com/jsalignon/cactus/commit/cf934e22270e7a18122ea3ad44a0f570e8610e53), [5](285d579023f7cbac7771405854d17508030420a4), [6](https://github.com/jsalignon/cactus/commit/285d579023f7cbac7771405854d17508030420a4), [7](https://github.com/jsalignon/cactus/commit/f04cd11eb6b5992f771e72364c019e7f1c251b68), [8](https://github.com/jsalignon/cactus/commit/f68018bf82bd5165056f9cfaa26b3e2f29e1cb08), [9](https://github.com/jsalignon/cactus/commit/37ad16c21c79ca4674c11de84254e65019605f8b)
- Changed the docs to match with latest version of manuscript in preparation. [bc11d3a](https://github.com/jsalignon/cactus/commit/bc11d3a39c05686c9dc6ceb7555539334043ce70), [ac0eafa](https://github.com/jsalignon/cactus/commit/ac0eafa643f85de6efa2cbd8d1aae62059683325), [f273951](https://github.com/jsalignon/cactus/commit/f2739517621504c756f1304139dab01b99f0ecae), [cf934e2](https://github.com/jsalignon/cactus/commit/cf934e22270e7a18122ea3ad44a0f570e8610e53), [285d579](https://github.com/jsalignon/cactus/commit/285d579023f7cbac7771405854d17508030420a4), [f04cd11](https://github.com/jsalignon/cactus/commit/f04cd11eb6b5992f771e72364c019e7f1c251b68), [f68018b](https://github.com/jsalignon/cactus/commit/f68018bf82bd5165056f9cfaa26b3e2f29e1cb08), [37ad16c](https://github.com/jsalignon/cactus/commit/37ad16c21c79ca4674c11de84254e65019605f8b)

- [making clearer labels for the heatmap](https://github.com/jsalignon/cactus/commit/1fd6d2054839fa4978d8c8e2f765c90611f36b02)
- Changed labels in the heatmap to improve clarity. [1fd6d20](https://github.com/jsalignon/cactus/commit/1fd6d2054839fa4978d8c8e2f765c90611f36b02)

### Fixed

- [fixing bugs in the heatmap process](https://github.com/jsalignon/cactus/commit/eb3de68366fd21c90220cb2a9155af06da04da55)
- Fixed bugs in the heatmap process. [eb3de68](https://github.com/jsalignon/cactus/commit/eb3de68366fd21c90220cb2a9155af06da04da55)

- [fixing a bug with the plot_FDR_by_PA_filters function](https://github.com/jsalignon/cactus/commit/4e5cafc61b54958f2144f6f3be4637611e5b8de7)
- Fixed a bug with the plot_FDR_by_PA_filters function. [4e5cafc](https://github.com/jsalignon/cactus/commit/4e5cafc61b54958f2144f6f3be4637611e5b8de7)


### Deprecated
Expand Down
14 changes: 13 additions & 1 deletion case_study/4__making_figures.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ pdf('Figure_5.pdf', width = 7, height = 5.7)
dev.off()



# Fig 7: CHIP both_atac and both_mrna heatmaps

p1 = readRDS1('both_ATAC__all__1.3__ctl__CHIP__heatmap.rds') + ggtitle('human, DARs, CHIP,\n co-regulated genes')
Expand Down Expand Up @@ -170,11 +169,13 @@ v_files_1_QC_peaks = grep1('(\\/(ctl_1__(peaks|average)|ATAC__peaks))')
v_files_1_QC = c(v_files_1_QC_reads, v_files_1_QC_satur,
v_files_1_QC_peaks)
p_QC = plot_figures(v_files_1_QC)

pdf('Figure_S1.pdf', width = 7, height = 10)
print(p_QC)
dev.off()



v_files_2_DA_fig = grep1('\\/hmg4_vs_ctl__') %>% c(grep1('venn'))
v_files_2_DA_fig %<>% .[. != '../../docs/examples/png/hmg4_vs_ctl__ATAC_other_plots.png']
v_files_2_DA_fig %<>% .[. != '../../docs/examples/png/hmg4_vs_ctl__mRNA_other_plots.png']
Expand Down Expand Up @@ -320,3 +321,14 @@ system('qpdf --rotate=+270 rotated-sidebyside.pdf Figure_S6.pdf')
file.remove(c('tmp1.pdf', 'rotated.pdf', 'rotated-sidebyside.pdf'))




# converting all figures to tiff format for submission
save_pdf_to_tif <- function(Fig_number){
system(paste0('gs -q -r500x500 -dNOPAUSE -sDEVICE=tiff24nc -sOutputFile=',
'tiff/Figure_', Fig_number, '.tiff Figure_', Fig_number,
'.pdf -c quit'))
}

sapply(c(4:7, paste0('S', 1:3), 'S6'), save_pdf_to_tif)

10 changes: 6 additions & 4 deletions conf/run_defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ params {
chipseeker__ignore_upstream = 'FALSE'
chipseeker__ignore_downstream = 'FALSE'


///// c. mRNA

//// removing input control peaks
Expand Down Expand Up @@ -117,8 +117,10 @@ params {
// hardcoded: dba.analyze(..., bBlacklist = F, bGreylist = F, bReduceObjects = F)
// see the main.nf script below the DA_ATAC__doing_differential_abundance_analysis process for details on how these default parameters were chosen

//// peak_annotation => see chipseeker parameters above

//// peak_annotation (+ chipseeker parameters above)
custom_distance__less_than_X_b = 100000
custom_distance__more_than_Y_b = 100000

//// volcano and MA plots
diffbind_plots__fdr_threshold = 0.05
diffbind_plots__top_n_labels = 15
Expand All @@ -129,7 +131,7 @@ params {
split__threshold_type = 'FDR' // options: 'FDR' or 'rank'
split__threshold_values = [ 1.3 ] // rank cuttoff or -log10 FDR thresholds (here: -log10(0.05) ~= 1.3)
split__fold_changes = [ 'up', 'down' ] // For now this argument should not be touched. But an 'all' argument may appear in the future
split__peak_assignment = [ 'all' ] // this argument can be any of: 'gene', 'interG', 'prom', '5pUTR', '3pUTR', 'exon', 'intron', 'downst', 'distIn', 'UTR', 'TSS', 'genPro', 'distNC', '3kb', '8kb', '30kb'
split__peak_assignment = [ 'all' ] // this argument can be any of: 'gene', 'interG', 'prom', '5pUTR', '3pUTR', 'exon', 'intron', 'downst', 'distIn', 'UTR', 'TSS', 'genPro', 'distNC', 'mt10kb', 'mt100kb', 'mtYkb', 'lt10kb', 'lt100kb', 'ltXkb'
split__keep_unique_genes = 'TRUE'

//// filtering DA results with too few entries
Expand Down
2 changes: 1 addition & 1 deletion docs/1_Intro/Quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ NXF_VER=22.10.8 nextflow run jsalignon/cactus -r release_tag -profile {singulari
```
For instance:
```
NXF_VER=22.10.8 nextflow run jsalignon/cactus -r v0.9.0 -profile singularity -params-file parameters/full_test.yml
NXF_VER=22.10.8 nextflow run jsalignon/cactus -r v1.0.0 -profile singularity -params-file parameters/full_test.yml
```

# Troubleshooting
Expand Down
2 changes: 1 addition & 1 deletion docs/1_Intro/running_the_test_datasets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ nextflow run jsalignon/cactus -profile $PROFILE \
--split__threshold_type "rank"

## Running the test dataset using Cactus version 0.8.6
nextflow run jsalignon/cactus -r v0.9.0 -profile $PROFILE \
nextflow run jsalignon/cactus -r v1.0.0 -profile $PROFILE \
-params-file parameters/full_test.yml

2 changes: 1 addition & 1 deletion docs/1_Intro/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ We can export the nextflow version to make sure we use a compatible version:
export NXF_VER=22.10.8
```

For reproducibility purposes, it is useful to specify a version of Cactus whenever running an analysis. We will use the latest available version (v0.9.0) for this tutorial:
For reproducibility purposes, it is useful to specify a version of Cactus whenever running an analysis. We will use the latest available version (v1.0.0) for this tutorial:
```bash
cactus_version=0.9.0
```
Expand Down
2 changes: 1 addition & 1 deletion docs/2_Install/Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

Cactus was built with the goal to make the installation as pain-free as possible. This was achieved by using only tools within containers or virtual environments for all analysis. Installation of most tools is done automatically the first time the pipeline is run (see the [Quick Start](/docs/1_Intro/Quick_start.md) section). However, two key dependencies should still be installed: [Nextflow](https://doi.org/10.1038/nbt.3820), and a package manager; one of these tools: [SingularityCE](https://doi.org/10.1371/journal.pone.0177459), [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241), [conda](https://docs.anaconda.com/anaconda/reference/release-notes/) and [Mamba](https://medium.com/@QuantStack/open-software-packaging-for-science-61cecee7fc23). Among these, Singularity is the recommended package manager to use if possible.

The current stable release of Cactus (v0.9.0) was developed and tested using these versions of the dependencies:
The current stable release of Cactus (v1.0.0) was developed and tested using these versions of the dependencies:
- Nextflow: 22.10.8.5859
- Singularity: 3.11.3-focal
- Docker: 24.0.7, build afdd53b
Expand Down
2 changes: 2 additions & 0 deletions docs/3_Inputs/Parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ See the function links for details and possible options. Details on the choice o

**Annotations and figures:**
- Parameters of the [annotatePeak](https://rdrr.io/bioc/ChIPseeker/man/annotatePeak.html) function -> see part 1. ATAC_peaks above.
- **_params.custom_distance__less_than_X_b_**: Custom threshold for the PA_ltXkb filter used to select peaks below a given distance (in base pair) to the TSS of their closest gene. Default: 500000 (i.e., 500 kilobases).
- **_params.custom_distance__more_than_Y_b_**: Custom threshold for the PA_mtYkb filter used to select peaks above a given distance (in base pair) to the TSS of their closest gene. Default: 500000 (i.e., 500 kilobases).
- **_params.diffbind_plots__fdr_threshold_**: Peaks with FDR less than or equal to this value are colored in red in the volcano plot. Default: 0.05.
- **_params.diffbind_plots__top_n_labels_**: The top n peaks with lowest FDR will have their annotated gene displayed on the volcano plot. Default: 15.

Expand Down
Loading

0 comments on commit 34a13de

Please sign in to comment.