sdparekh / zUMIs

zUMIs: A fast and flexible pipeline to process RNA sequencing data with UMIs
GNU General Public License v3.0
269 stars 67 forks source link

Getting error after the mapping step #306

Closed luckysardar closed 2 years ago

luckysardar commented 2 years ago

Hello, Thanks for this tool

I am able generate bam file succesfully but at the end I am getting below error can you please help me to resolve this issue

You provided these parameters: YAML file: runExample.yaml zUMIs directory: /DATA/Projects/IMP/Tools/zUMIs STAR executable STAR samtools executable samtools pigz executable pigz Rscript executable Rscript RAM limit: 20 zUMIs version 2.9.7

Friday 18 March 2022 01:56:26 PM IST WARNING: The STAR version used for mapping is 2.5.4b and the STAR index was created using the version 20201. This may lead to an error while mapping. If you encounter any errors at the mapping stage, please make sure to create the STAR index using STAR 2.5.4b. Filtering... Friday 18 March 2022 01:56:34 PM IST [1] "43 barcodes detected." [1] "193783 reads were assigned to barcodes that do not correspond to intact cells." Mapping... [1] "2022-03-18 13:56:35 IST" Mar 18 13:56:36 ..... started STAR run Mar 18 13:56:36 ..... loading genome Mar 18 13:56:53 ..... processing annotations GTF Mar 18 13:57:01 ..... inserting junctions into the genome indices Mar 18 13:59:09 ..... started mapping Mar 18 13:59:20 ..... finished successfully Friday 18 March 2022 01:59:20 PM IST Counting... [1] "2022-03-18 13:59:26 IST" [1] "9e+07 Reads per chunk" [1] "Loading reference annotation from:" [1] "/DATA/Data_analysis/zUMI/Example_data/run_test/Example.final_annot.gtf" [1] "Annotation loaded!" [1] "Assigning reads to features (ex)"

    ==========     _____ _    _ ____  _____  ______          _____  
    =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
      =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
        ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
          ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
    ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
   Rsubread 1.32.4
//========================== featureCounts setting ===========================\ Input files : 1 BAM file S Example.filtered.tagged.Aligned.out.bam
Annotation : R data.frame
Assignment details : .featureCounts.bam
(Note that files are saved to the output directory)
Dir for temp files : .
Threads : 8
Level : meta-feature level
Paired-end : yes
Multimapping reads : counted
Multiple alignments : primary alignment only
Multi-overlapping reads : not counted
Min overlapping bases : 1
Chimeric reads : not counted
Both ends mapped : not required

\===================== http://subread.sourceforge.net/ ======================//

//================================= Running ==================================\ Load annotation file .Rsubread_UserProvidedAnnotation_pid63774 ... Features : 352439 Meta-features : 61541 Chromosomes/contigs : 47
Process BAM file Example.filtered.tagged.Aligned.out.bam...
Single-end reads are included.
Assign alignments to features...
Total alignments : 853296
Successfully assigned alignments : 358382 (42.0%)
Running time : 0.01 minutes

\===================== http://subread.sourceforge.net/ ======================//

[1] "Assigning reads to features (in)"

    ==========     _____ _    _ ____  _____  ______          _____  
    =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
      =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
        ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
          ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
    ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
   Rsubread 1.32.4
//========================== featureCounts setting ===========================\ Input files : 1 BAM file S Example.filtered.tagged.Aligned.out.bam.ex ...
Annotation : R data.frame
Assignment details : .featureCounts.bam
(Note that files are saved to the output directory)
Dir for temp files : .
Threads : 8
Level : meta-feature level
Paired-end : yes
Multimapping reads : counted
Multiple alignments : primary alignment only
Multi-overlapping reads : not counted
Min overlapping bases : 1
Chimeric reads : not counted
Both ends mapped : not required

\===================== http://subread.sourceforge.net/ ======================//

//================================= Running ==================================\ Load annotation file .Rsubread_UserProvidedAnnotation_pid63774 ... Features : 241362 Meta-features : 28534 Chromosomes/contigs : 33
Process BAM file Example.filtered.tagged.Aligned.out.bam.ex.featureCou ...
Single-end reads are included.
Assign alignments to features...
Total alignments : 853296
Successfully assigned alignments : 207150 (24.3%)
Running time : 0.01 minutes

\===================== http://subread.sourceforge.net/ ======================//

[1] "2022-03-18 14:01:04 IST" [1] "Coordinate sorting final bam file..." [bam_sort_core] merging from 0 files and 8 in-memory blocks... [1] "2022-03-18 14:01:08 IST" [1] "Here are the detected subsampling options:" [1] "Automatic downsampling" [1] "Working on barcode chunk 1 out of 1" [1] "Processing 43 barcodes in this chunk..." Error in rbindlist(rsamtools_reads, fill = TRUE, use.names = TRUE) : Item 1 of input is not a data.frame, data.table or list Calls: reads2genes_new -> rbindlist In addition: Warning message: In mclapply(1:nrow(idxstats), function(x) { : all scheduled cores encountered errors in user code Execution halted Friday 18 March 2022 02:01:08 PM IST Loading required package: yaml Loading required package: Matrix [1] "loomR found" Error in gzfile(file, "rb") : cannot open the connection Calls: rds_to_loom -> readRDS -> gzfile In addition: Warning message: In gzfile(file, "rb") : cannot open compressed file '/DATA/Data_analysis/zUMI/Example_data/run_test/zUMIs_output/expression/Example.dgecounts.rds', probable reason 'No such file or directory' Execution halted Friday 18 March 2022 02:01:10 PM IST Descriptive statistics... [1] "I am loading useful packages for plotting..." [1] "2022-03-18 14:01:10 IST" Error in gzfile(file, "rb") : cannot open the connection Calls: readRDS -> gzfile In addition: Warning message: In gzfile(file, "rb") : cannot open compressed file '/DATA/Data_analysis/zUMI/Example_data/run_test/zUMIs_output/expression/Example.dgecounts.rds', probable reason 'No such file or directory' Execution halted Friday 18 March 2022 02:01:14 PM IST

yaml file

project: Example sequence_files: file1: name: /DATA/Data_analysis/zUMI/Example_data/Fastq/barcoderead_HEK.1mio.fq.gz base_definition:

cziegenhain commented 2 years ago

Hi,

Please post the full verbose log and the yaml file you used. This error could for instance occur if none of the detected barcodes has any assigned genes (so there could be an upstream problem with the alignment or gene annotations)

Best, Christoph

luckysardar commented 2 years ago

Hi, Christoph

Thanks for the response I am trying on test dataset given. And updated my issue with log and yaml file can you please take a look where I am doing wrong. one problem is with STAR even though I am mapping with the same version of STAR still getting the WARNING but that is because version name is not properly filed by STAR writing some other name. So in mapping there is no problem came please help me to figure it out where I am doing wrong

Thank you

luckysardar commented 2 years ago

Hi, Christoph

Can you please help me with the issue.

cziegenhain commented 2 years ago

Hi,

So do I understand correct that now you are testing using the 1 mio reads we provide as an example dataset? The STAR versioning warning is okay I would say, seems like the mapping succeeds and you also can see in the featureCounts reports that you get assignment to genes.

From reading your log, the failure seems to occur when loading reads from the assigned bam file for making the gene expression tables. It could be a version issue of the RSamtools package.

I recommend that you use the conda environment we provide to have a more controlled environment in terms of versions (zUMIs.sh -c -y yaml_file.yaml).