Hi All. I have tried to run crispr-seq pipeline an...
# crisprseq
a
Hi All. I have tried to run crispr-seq pipeline and I was able to get the mageck mle data but after that the pipeline breaks. I tried different ways to address the errors but no luck; here's the summary of the error- nf-core/crisprseq pipeline is failing at the final step (MAGECK_FLUTEMLE) due to a SSL certificate verification error when trying to download a Singularity container. 1. Container Download Timeout- ◦ 20-minute timeout when trying to pull the bioconductor-mageckflute container ◦ This happens even when using
--skip_mageckflute
flag 2. System Compatibility? ◦ Using Nextflow version 25.04.4 steps completed successfully: • FASTQC • MAGECK_COUNT • MAGECK_MLE_MATRIX What's Missing: MAGECK_FLUTEMLE step (visualization and additional analysis) error-
Copy code
[7f/5646e5] NFC…:FASTQC (1-GFAP-WT-PP-PRE) | 4 of 4, cached: 4 ✔
[e2/2a2daa] NFC…_COUNT (PRE,PRE,POST,POST) | 1 of 1, cached: 1 ✔
[ee/e62498] NFC…MLE_MATRIX (design_matrix) | 1 of 1, cached: 1 ✔
[-        ] NFC…_SCREENING:MAGECK_FLUTEMLE -
[-        ] NFC…RISPRSEQ_SCREENING:MULTIQC -
Pulling Singularity image <https://depot.galaxyproject.org/singularity/bioconductor-mageckflute:2.6.0--r43hdfd78af_0> [cache /hpc/crispr-screen-jun18/work/singularity/depot.galaxyproject.org-singularity-bioconductor-mageckflute-2.6.0--r43hdfd78af_0.img]
WARN: Singularity cache directory has not been defined -- Remote image will be stored in the path: /hpc/crispr-screen-jun18/work/singularity -- Use the environment variable NXF_SINGULARITY_CACHEDIR to specify a different location
ERROR ~ Error executing process > 'NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_FLUTEMLE (1)'

Caused by:
  Failed to pull singularity image
    command: singularity pull  --name depot.galaxyproject.org-singularity-bioconductor-mageckflute-2.6.0--r43hdfd78af_0.img.pulling.1750968555251 <https://depot.galaxyproject.org/singularity/bioconductor-mageckflute:2.6.0--r43hdfd78af_0> > /dev/null
    status : 255
    hint   : Try and increase singularity.pullTimeout in the config (current is "20m")
    message:
      FATAL:   Error making http request: Head "<https://depot.galaxyproject.org/singularity/bioconductor-mageckflute:2.6.0--r43hdfd78af_0>": tls: failed to verify certificate: x509: certificate signed by unknown authority

 -- Check '.nextflow.log' file for details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: <https://nf-co.re/docs/usage/troubleshooting>

 -- Check '.nextflow.log' file for details
-[nf-core/crisprseq] Pipeline completed with errors-
i tried : --skip_mageckflute and
Copy code
nextflow run nf-core/crisprseq -r dev \
--input samplesheet.csv \
--mle_design_matrix design_matrix.txt \
--library PP_library_fixed.tsv \
--analysis screening \
--outdir output \
-profile singularity \
-with-singularity {--nohttps} \
-resume \
-config <(echo "singularity { pullTimeout = '5h' }")
current command that got me the above outputs is-
command: nextflow run nf-core/crisprseq -r dev --input samplesheet.csv --mle_design_matrix design_matrix.txt --library PP_library_fixed.tsv --analysis screening  --outdir output -profile standard -resume
How can i fix this? thank you in advance!
m
Hi Aastha, it seems that you are having trouble downloading the singularity contianer image for fluteMLE. Can you please try to run the command
singularity pull  --name depot.galaxyproject.org-singularity-bioconductor-mageckflute-2.6.0--r43hdfd78af_0.img.pulling.1750968555251 <https://depot.galaxyproject.org/singularity/bioconductor-mageckflute:2.6.0--r43hdfd78af_0>
and let me know what you get?
a
Thank you @Matteo Bonfanti. I will look into singularity image and if i can download it this way. Also, i looked into how i can use the mle output and get some plots. I used the below script and i got a volcano plot which doesn't look correct. I wonder what is going wrong? I also attached the screenshot of the gene_summary.txt file. Why is sgrna 1? Can you help in understanding the output? Thank you so much! 🙂
Copy code
library(MAGeCKFlute)
library(ggplot2)

file3 = file.path("~/design_matrix.gene_summary.txt")
dd = ReadBeta(file3)

gene_summary <- read.delim(file3, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
head(gene_summary)
#rename
colnames(gene_summary)[which(names(gene_summary) == "treatment.beta")] <- "logFC"
colnames(gene_summary)[which(names(gene_summary) == "treatment.fdr")] <- "FDR"
#volcano plot
volcano_data <- gene_summary[, c("Gene", "logFC", "treatment.p.value")]

# Get the top 15 genes by logFC for labeling
label_genes <- volcano_data[order(-volcano_data$logFC), ][1:15, ]

# Create the plot
ggplot(volcano_data, aes(x = logFC, y = -log10(p_value), color = Significance))
Btw, the singluarity image downloading finished but gives the following error-
Copy code
[-        ] NFC…CRISPRSEQ_SCREENING:FASTQC -
[-        ] NFC…SEQ_SCREENING:MAGECK_COUNT -
[-        ] NFC…CREENING:MAGECK_MLE_MATRIX -
[-        ] NFC…_SCREENING:MAGECK_FLUTEMLE -
[-        ] NFC…RISPRSEQ_SCREENING:MULTIQC -
Pulling Singularity image <https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0> [cache /crispr-screen-jun18/depot.galaxyproject.org-singularity-fastqc-0.12.1--hdfd78af_0.img]
Pulling Singularity image <https://depot.galaxyproject.org/singularity/mageck:0.5.9.5--py39h1f90b4d_3> [cache /crispr-screen-jun18/depot.galaxyproject.org-singularity-mageck-0.5.9.5--py39h1f90b4d_3.img]
ERROR ~ Error executing process > 'NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_COUNT (1)'

Caused by:
  Failed to pull singularity image
    command: singularity pull  --name depot.galaxyproject.org-singularity-mageck-0.5.9.5--py39h1f90b4d_3.img.pulling.1751150367218 <https://depot.galaxyproject.org/singularity/mageck:0.5.9.5--py39h1f90b4d_3> > /dev/null
    status : 255
    hint   : Try and increase singularity.pullTimeout in the config (current is "1h")
    message:
      FATAL:   Error making http request: Head "<https://depot.galaxyproject.org/singularity/mageck:0.5.9.5--py39h1f90b4d_3>": tls: failed to verify certificate: x509: certificate signed by unknown authority



 -- Check '.nextflow.log' file for details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: <https://nf-co.re/docs/usage/troubleshooting>

 -- Check '.nextflow.log' file for details
-[nf-core/crisprseq] Pipeline completed with errors-
command used-
Copy code
nextflow run nf-core/crisprseq -r dev -profile singularity -resume \
--input samplesheet.csv \
--outdir output_jun28 \
--analysis screening \
--library PP_library_fixed.tsv \
--mle_design_matrix design_matrix.txt \
-with-singularity depot.galaxyproject.org-singularity-bioconductor-mageckflute-2.6.0--r43hdfd78af_0.img.pulling.1750968555251
m
Hi, Regarding the volcano plot, I think that a better measure of the significance of the test in the case of the MLE test is the "wald-fdr" column (you can check the documentation of Mageck for the info about the MLE gene summary file https://sourceforge.net/p/mageck/wiki/output/#gene_summary_txt-in-mle-subcommand ) The name of the guides should come directly from your table with the guides, the one that you provided with the
--library
option. Regarding the singularity command that I suggested, it was just to double check that you had no issue downloading the container from the singularity registry, but it was not meant to fix your run. Did the command work? Did you manage to actually dowload the sif file
depot.galaxyproject.org-singularity-bioconductor-mageckflute-2.6.0--r43hdfd78af_0.img.pulling.1750968555251
? If this is the case, I think that you only need to give a longer pullTimeout to nextflow, you can put a directive like
singularity.pullTimeout = "1h"
in your nextflow configuration
a
Thank you so much. I was able to run my mageck mle using the singularity image-
singularity exec --bind $(pwd):/data /singularity_cache/depot.galaxyproject.org-singularity-mageck-0.5.9.5--py39h1f90b4d_3.img mageck mle -k /data/count_table.count.txt -d design_matrix.txt -n beta_results
But the output i get shows no significance (high p-value). Also, this is a super simple experiment where i am testing treatment vs control. How can I look for the genes that are just enriched? using beta score (which is how the genes are ranked, p-value and fdr value?) colnames(data_MLE) [1] "Gene" "sgRNA" "treatment.beta" [4] "treatment.z" "treatment.p.value" "treatment.fdr" [7] "treatment.wald.p.value" "treatment.wald.fdr" I also did the RRA analysis-
singularity exec --bind $(pwd):/data /singularity_cache/depot.galaxyproject.org-singularity-mageck-0.5.9.5--py39h1f90b4d_3.img mageck test -k /data/count_table.count.txt -t POST_1, POST_2 -c PRE_1,PRE_2 -n peptide_results --pdf-report
colnames: [1] "id" "num" "neg.score" "neg.p.value" "neg.fdr" [6] "neg.rank" "neg.goodsgrna" "neg.lfc" "pos.score" "pos.p.value" [11] "pos.fdr" "pos.rank" "pos.goodsgrna" "pos.lfc" which one would you recommend? I would liek to identify only enriched genes and plot as a volcano plot. I am using mageckflute package in R but the volcano plot looks weird. Not sure what is wrong.
m
Hi, The two tests are based on two different statistical approaches, the main differences are described in hte mageck documentation: https://sourceforge.net/p/mageck/wiki/demo/#the-fourth-tutorial-using-mageck-mle-module In both cases, there is a measure of the effect size (beta for MLE and LFC for RRA) and a measure of the significance (non multiple testing corrected p-values, and the related FDR). If you want to plot the volcano, you should probably get treatment.beta vs treatment.wald.fdr for the MLE, neg.lfc vs neg.fdr for the RRA negative test, and pos.lfc vs pos.fdr for the RRA positive test.