Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceKuhl committed Sep 18, 2024
2 parents 295045c + c589ccb commit e8c2b56
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 17 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v2.3.0dev
## [v2.3.0 - Lime Nightingale](https://github.com/nf-core/crisprseq/releases/tag/2.3.0) - [17.09.2024]

### Added

Expand All @@ -19,8 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Make output of FluteMLE optional as when some pathways produce bugs some channels are then empty ([#190](https://github.com/nf-core/crisprseq/pull/190))
- Fix a typo in crisprcleanr/normalize, when a user inputs a file ([#192](https://github.com/nf-core/crisprseq/pull/192))

### Deprecated

## [v2.2.1 Romarin Curie - patch](https://github.com/nf-core/crisprseq/releases/tag/2.2.1) - [23.07.2024]

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/crisprseq/tree/dev" target="_blank">nf-core/crisprseq</a>
This report has been generated by the <a href="https://github.com/nf-core/crisprseq/releases/tag/2.3.0" target="_blank">nf-core/crisprseq</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/crisprseq/dev/docs/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/crisprseq/2.3.0/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-crisprseq-methods-description":
Expand Down
11 changes: 8 additions & 3 deletions docs/usage/screening.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Running MAGeCK MLE and BAGEL2 with a contrast file will also output a Venn diagr

### MAGeCK RRA

MAGeCK RRA performs robust ranking aggregation to identify genes that are consistently ranked highly across multiple replicate screens. To run MAGeCK RRA, you can define the contrasts as previously stated in the last section with --contrasts your_file.txt(with a `.txt` extension) and also specify `--rra`.
MAGeCK RRA performs robust ranking aggregation to identify genes that are consistently ranked highly across multiple replicate screens. To run MAGeCK RRA, you can define the contrasts as previously stated in the last section with `--contrasts` <<your_file.txt>> (with a `.txt` extension) and also specify `--rra`.

### Running MAGeCK MLE only

Expand Down Expand Up @@ -153,9 +153,14 @@ Hitselection is a script for identifying rank thresholds for CRISPR screen resul

To run Hitselection, you can specify '--hitselection' and it will automatically run on the gene essentiality algorithms you have chosen. The outputs are a png file containing the -logP value vs gene rank plot and a txt file containing all the -logP values, edge and average edge values and ranked gene symbols.

## :warning: The hitselection algorithm is for the moment developed only for KO screens and requires the library to map to genes with an Homosapiens EntrezID.
> [!WARNING]
> The hitselection algorithm is for the moment developed
> only for KO screens and requires the library to map to
> genes with an Homosapiens EntrezID.
## :warning: Please be advised that the Hitselection algorithm is time intensive and will make the pipeline run longer
> [!WARNING]
> Please be advised that the Hitselection algorithm is
> time intensive and will make the pipeline run longer
Note that the pipeline will create the following files in your working directory:

Expand Down
2 changes: 1 addition & 1 deletion modules/local/hitselection.nf
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ process HITSELECTION {
#For BAGEL2
if(length(bf_col) >= 1) {
screen\$Rank <- rank(screen[[bf_col]])
screen <- screen[order(screen\$Rank), ]
screen <- screen[order(screen\$Rank), decreasing=T ]
}
hgnc <- read_delim("${hgnc}", delim = '\t') # Load HGNC gene data
Expand Down
21 changes: 14 additions & 7 deletions modules/local/venndiagram.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ process VENNDIAGRAM {
container "ghcr.io/qbic-pipelines/rnadeseq:dev"

input:
tuple val(meta), path(bagel_pr), path(gene_summary)
tuple val(meta), path(bagel_drugz_genes), path(gene_summary)

output:
tuple val(meta), path("*.txt"), emit: common_list
Expand All @@ -31,20 +31,27 @@ process VENNDIAGRAM {
library(ggvenn)
mle = read.table('$gene_summary', sep = "\t",
header=TRUE)
bagel = read.table('$bagel_pr', sep = "\t",
bagel_drugz_genes = read.table('$bagel_drugz_genes', sep = "\t",
header=TRUE)
filtered_precision_recall <- subset(bagel, FDR < 0.1)
if (any(grepl("sumZ", colnames(bagel_drugz_genes)))) {
filtered_precision_recall <- subset(bagel_drugz_genes, fdr_supp < 0.1)
name_module = 'drugZ'
} else {
filtered_precision_recall <- subset(bagel_drugz_genes, FDR < 0.1)
name_module = 'BAGEL2'
}
name <- gsub(",","_",paste0('${prefix}',".fdr"))
filtered_mageck_mle <- mle[mle[, name] < 0.1, ]
common_genes <- intersect(filtered_mageck_mle\$Gene,
filtered_precision_recall\$Gene)
data <- list(Bagel2 = filtered_precision_recall\$Gene,
filtered_precision_recall[[1]])
data <- list(Bagel2 = filtered_precision_recall[[1]],
MAGeCK_MLE = filtered_mageck_mle\$Gene)
plot_test <- ggvenn(data)
ggsave("venn_bagel2_mageckmle.png",plot_test)
write.table(common_genes, paste0('${prefix}',"_common_genes_bagel_mle.txt"),sep = "\t", quote = FALSE, row.names=FALSE)
ggsave(paste0("venn_",name_module,"_mageckmle_",name,".png"),plot_test)
write.table(common_genes, paste0(name,'_',name_module,"_common_genes_mle.txt"),sep = "\t", quote = FALSE, row.names=FALSE)
#version
version_file_path <- "versions.yml"
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ manifest {
description = """Pipeline for the analysis of CRISPR data"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '2.3.0dev'
version = '2.3.0'
doi = 'https://doi.org/10.5281/zenodo.7598496'
}

Expand Down
15 changes: 15 additions & 0 deletions workflows/crisprseq_screening.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ include { GPT_PREPARE_QUERY as GPT_PREPARE_BAGEL2_QUERY} from '../modules/local/
include { GPT_PREPARE_QUERY as GPT_PREPARE_DRUGZ_QUERY } from '../modules/local/gpt_prepare_query'
include { GPT_PREPARE_QUERY as GPT_PREPARE_MLE_QUERY } from '../modules/local/gpt_prepare_query'
include { GPT_PREPARE_QUERY as GPT_PREPARE_RRA_QUERY } from '../modules/local/gpt_prepare_query'
include { VENNDIAGRAM as VENNDIAGRAM_DRUGZ } from '../modules/local/venndiagram'


// nf-core modules
include { FASTQC } from '../modules/nf-core/fastqc/main'
Expand Down Expand Up @@ -364,6 +366,7 @@ workflow CRISPRSEQ_SCREENING {
}

//

// Calling of nf-gpt plugin on drugZ, MAGeCK mle or bagel2
//
if(params.gpt_interpretation && params.gpt_interpretation.split(',').contains('drugz')) {
Expand Down Expand Up @@ -467,9 +470,21 @@ workflow CRISPRSEQ_SCREENING {
}
}

// Venn diagrams
//

// BAGEL2 and MAGeCK MLE
if(params.mle && params.bagel2) {
ch_venndiagram = BAGEL2_PR.out.pr.join(MAGECK_MLE.out.gene_summary)
ch_venndiagram.dump(tag: "Venn diagram")
VENNDIAGRAM(ch_venndiagram)
ch_versions = ch_versions.mix(VENNDIAGRAM.out.versions)
}

if(params.mle && params.drugz) {
ch_venndiagram_mle_drugz = DRUGZ.out.per_gene_results.join(MAGECK_MLE.out.gene_summary)
VENNDIAGRAM_DRUGZ(ch_venndiagram_mle_drugz)
ch_versions = ch_versions.mix(VENNDIAGRAM_DRUGZ.out.versions)
}

//
Expand Down

0 comments on commit e8c2b56

Please sign in to comment.