Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_FLUTEMLE file is not in PNG format #161

Closed
bolenala opened this issue Jul 2, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@bolenala
Copy link

bolenala commented Jul 2, 2024

Description of the bug

The process NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_FLUTEMLE starts the FluteMLE command using the data of the gene_summary.txt file. It downloads several pathway files until pathway 'hsa05213' were it stops due to the error shown below.

The error did not occur when running only the 2.2.0/templates/template_fluteMLE.R script on my computer using the gene_summary.txt file. I also tried to use the latest image of mageckflute in the 2.2.0/modules/local/mageck/flutemle.nf with the same output.

Command used and terminal output

nextflow run 2.2.0 -params-file params.yaml -profile normal,singularity -resume -with-report -with-trace -with-timeline > log.txt

params.yaml
input: 'sample_sheet.csv'
outdir: 'results'
analysis: 'screening'
library: 'sgRNA_library.txt'
mle_design_matrix: 'design_matrices/T0_vs_T1_or_T2.txt' 
crisprcleanr: 'library_targets.csv'
min_reads: 3

error message:
  'select()' returned 1:1 mapping between keys and columns
  Info: Working in directory /dnext/project/78/a60432643daa4e4bad087f59d46236
  Info: Writing image file hsa05213.pathview.multi.png
  Error in png::readPNG(figure, native = FALSE) : file is not in PNG format
  Calls: FluteMLE ... arrangePathview -> lapply -> FUN -> <Anonymous> -> <Anonymous>
  In addition: There were 24 warnings (use warnings() to see them)
  Execution halted

Relevant files

No response

System information

Nextflow version: 23.04.0
Hardware: HPC
Executor: slurm
Container engine: Singularity
Version of nf-core/crisprseq: 2.2.0

@bolenala bolenala added the bug Something isn't working label Jul 2, 2024
@LaurenceKuhl
Copy link
Contributor

Hi @bolenala, would you mind giving me your mle output and count table so i can also try locally to see if i can reproduce locally + on the pipeline? I wonder if this issue happens if you run it with conda or docker?

@bolenala
Copy link
Author

bolenala commented Jul 9, 2024

Hi @LaurenceKuhl, thank you for your response. Unfortunately, I cannot share the output with you as this is unpublished data. Do you have example data I can use to run the pipeline?
I used the docker container in the pipeline on the cluster. But I also run the R script on my computer after installing the packages, so without a conda or docker. And then it worked.

@LaurenceKuhl
Copy link
Contributor

hi @bolenala thanks a lot for reporting this bug, we have now have fixed and it running it in the pipeline should now work.

@bolenala
Copy link
Author

bolenala commented Aug 8, 2024

Hi @LaurenceKuhl, thank you so much! It works now.
I have another issue, which I solved, but wanted to share the solution with you. In the process CRISPRCLEANR_NORMALIZE I use a custom library file which results in running the code in the else loop. The column name of the count_file is "Gene" and not "gene" resulting in an error. I just copied the lines of the if loop into the else loop resulting in:

else {
        try(library <- read.delim('${library_file}',header=T,sep = ","))
        duplicates <- duplicated(library[, 1])
        unique_rows <- !duplicates
        library <- library[unique_rows, , drop = FALSE]
        rownames(library) = library[,1]
        library = library[order(rownames(library)),]
        library = library[,-1]
        names(count_file)[names(count_file) == 'Gene'] <- 'gene'
        count_file_to_normalize <- count_file %>% dplyr::select(sgRNA, gene, everything())
        }

and then it worked without errors.

@LaurenceKuhl
Copy link
Contributor

Hey closing this issue as it's now merged in the dev version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants