Skip to content

Commit

Permalink
Merge pull request #184 from nf-core/control-sgrna
Browse files Browse the repository at this point in the history
add control_sgrna option
  • Loading branch information
LaurenceKuhl authored Aug 20, 2024
2 parents 87ba3ce + 70b9959 commit 7acb16b
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 11 deletions.
7 changes: 6 additions & 1 deletion docs/usage/screening.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ Running MAGeCK MLE and BAGEL2 with a contrast file will also output a Venn diagr

### Running MAGeCK RRA only

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 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`.
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 All @@ -109,6 +110,10 @@ This label is not mandatory as in case you are running time series. If you wish

The downstream analysis involves distinguishing essential, non-essential, and target-associated genes. Additionally, it encompasses conducting biological functional category analysis and pathway enrichment analysis for these genes. Furthermore, it provides visualization of genes within pathways, enhancing user exploration of screening data. MAGECKFlute is run automatically after MAGeCK MLE and for each MLE design matrice. If you have used the `--day0_label`, MAGeCKFlute will be ran on all the other conditions. Please note that the DepMap data is used for these plots.

#### Using negative control sgRNAs for MAGeCK MLE

You can add the parameter `--mle_control_sgrna` followed by your file (one non targeting control sgRNA per line) to integrate the control sgRNA in MAGeCK MLE.

### Running BAGEL2

BAGEL2 (Bayesian Analysis of Gene Essentiality with Location) is a computational tool developed by the Hart Lab at Harvard University. It is designed for analyzing large-scale genetic screens, particularly CRISPR-Cas9 screens, to identify genes that are essential for the survival or growth of cells under different conditions. BAGEL2 integrates information about the location of guide RNAs within a gene and leverages this information to improve the accuracy of gene essentiality predictions.
Expand Down
19 changes: 15 additions & 4 deletions modules/nf-core/mageck/mle/mageck-mle.diff

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions modules/nf-core/mageck/mle/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ params {
library = null
crisprcleanr = null
contrasts = null
mle_control_sgrna = null
mle_design_matrix = null
count_table = null
fasta = null
Expand Down
4 changes: 4 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@
"exists": true,
"description": "Design matrix used for MAGeCK MLE to call essential genes under multiple conditions while considering sgRNA knockout efficiency"
},
"mle_control_sgrna": {
"type": "string",
"description": "control-sgrna file for MAGeCK MLE"
},
"contrasts": {
"type": "string",
"format": "file-path",
Expand Down
13 changes: 10 additions & 3 deletions subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,18 @@ workflow INITIALISATION_CHANNEL_CREATION_SCREENING {
ch_design = Channel.fromPath(params.mle_design_matrix)
}

if(params.mle_control_sgrna) {
ch_mle_control_sgrna = Channel.fromPath(params.mle_control_sgrna)
} else {
ch_mle_control_sgrna = []
}


emit:
library = ch_library // channel: library file
crisprcleanr = ch_crisprcleanr // channel: crisprcleanr file or value
design = ch_design // channel: design matrix file
library = ch_library // channel: library file
crisprcleanr = ch_crisprcleanr // channel: crisprcleanr file or value
design = ch_design // channel: design matrix file
mle_control_sgrna = ch_mle_control_sgrna // channel: negative control sgRNA for MAGeCK MLE
}

/*
Expand Down
6 changes: 3 additions & 3 deletions workflows/crisprseq_screening.nf
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ workflow CRISPRSEQ_SCREENING {
}.set { ch_designed_mle }

ch_mle = ch_designed_mle.combine(ch_counts)
MAGECK_MLE_MATRIX (ch_mle)
MAGECK_MLE_MATRIX (ch_mle, INITIALISATION_CHANNEL_CREATION_SCREENING.out.mle_control_sgrna)
ch_versions = ch_versions.mix(MAGECK_MLE_MATRIX.out.versions)
MAGECK_FLUTEMLE(MAGECK_MLE_MATRIX.out.gene_summary)
ch_versions = ch_versions.mix(MAGECK_FLUTEMLE.out.versions)
Expand All @@ -279,7 +279,7 @@ workflow CRISPRSEQ_SCREENING {
if(params.contrasts) {
MATRICESCREATION(ch_contrasts)
ch_mle = MATRICESCREATION.out.design_matrix.combine(ch_counts)
MAGECK_MLE (ch_mle)
MAGECK_MLE (ch_mle, INITIALISATION_CHANNEL_CREATION_SCREENING.out.mle_control_sgrna)
ch_versions = ch_versions.mix(MAGECK_MLE.out.versions)
MAGECK_FLUTEMLE_CONTRASTS(MAGECK_MLE.out.gene_summary)
ch_versions = ch_versions.mix(MAGECK_FLUTEMLE_CONTRASTS.out.versions)
Expand All @@ -289,7 +289,7 @@ workflow CRISPRSEQ_SCREENING {
}
if(params.day0_label) {
ch_mle = Channel.of([id: "day0"]).merge(Channel.of([[]])).merge(ch_counts)
MAGECK_MLE_DAY0 (ch_mle)
MAGECK_MLE_DAY0 (ch_mle, INITIALISATION_CHANNEL_CREATION_SCREENING.out.mle_control_sgrna)
ch_versions = ch_versions.mix(MAGECK_MLE_DAY0.out.versions)
MAGECK_FLUTEMLE_DAY0(MAGECK_MLE_DAY0.out.gene_summary)
ch_versions = ch_versions.mix(MAGECK_FLUTEMLE_DAY0.out.versions)
Expand Down

0 comments on commit 7acb16b

Please sign in to comment.