STOmics / SAW

GNU General Public License v3.0
145 stars 34 forks source link

Files cannot be read when mapping. #140

Closed regenerativescience closed 3 months ago

regenerativescience commented 3 months ago

Hello,

I encountered an issue while running stereoPipeline_v6.sh. During the mapping execution, the following error occurred:

Error, cannot access /data/group1/z40265r/RawData/Stereo/C02536A6.barcodeToPos.h5

However, the path was not wrong and I thought it might be a permissions issue, so I tried 777 and it didn't work.

I'm unsure what the problem might be. Could you please provide guidance on how to resolve this issue?

Due to the need to run the script on a shared high-performance computer, I made the following modifications to stereoPipeline_v6.sh:

Here are the standard output and standard error logs from the .sh file:

output

Wed Aug 14 11:54:19 JST 2024 singularity check: pass, and singularity path is /home/center/opt/x86_64/apps/singularity/4.1.2/bin/singularity Wed Aug 14 11:54:19 JST 2024 singularity image file check: file exist and SIF path is /home/z40265r/tool/SAW_6.1.sif Wed Aug 14 11:54:19 JST 2024 => splitMask, compute CID count and predict the memory of mapping start......

error

Error, cannot access /data/group1/z40265r/RawData/Stereo/C02536A6.barcodeToPos.h5

Thank you for your assistance.

Best regards,

Clouate commented 3 months ago

@regenerativescience Hi, could you try to change singularity exec --bind ${PWD}:${PWD} ${sif} to singularity exec --bind /home,/data ${sif}? That is to mount all the root directories where Stereo-seq data are stored.

regenerativescience commented 3 months ago

@Clouate Thank you for your prompt assistance.

However, I received the following error. This was also the case when I used the singularity exec ${sif} without commenting out SINGULARITY_BIND.

BAMoutput.cpp:86:BAMoutput: exiting because of OUTPUT FILE error: could not create output file /data/group1/z40265r/analysis/Stereo/Exp056_山田先生/Result/00.mapping/Exp56-Stereoseq-yamada_S1_L001_R1._STARtmp//BAMsort/5/11 SOLUTION: check that the path exists and you have write permission for this file. Also check ulimit -n and increase it to allow more open files.

Aug 14 12:53:00 ...... FATAL ERROR, exiting

Sometimes BAMsort/5/11 is BAMsort/5/12. Incidentally, the size of all files in BAMsort/[1-5]/ was 0. Disk space is available.

Since BAMsort/5/0~10 was generated, I thought it was not a problem with the path or permissions listed in the SOLUTION. So I set ulimit -n to 4 times 40960. (ulimit -v is still 33170449147) But no change.

Clouate commented 3 months ago

@regenerativescience Hi, could you run the following code and show the output? tree /data/group1/z40265r/analysis/Stereo/Exp056_山田先生/Result/00.mapping/Exp56-Stereoseq-yamada_S1_L001_R1._STARtmp/|wc -l If it reaches around 40960, it means that your ulimit -n setting is effective but still insufficient. Since SAW mapping was developed based on alexdobin/STAR(https://github.com/alexdobin/STAR), the reason for this error is that there are too many intermediate files during bam file sorting, so ulimit -n needs to be set to a larger value. Regarding the setting of ulimit -n, you could refer to STAR's recommendation, (runThreadN+1)*outBAMsortingBinsN If not reached, it means that your settings are not effective and you may need to consult your computer administrator to find how to make it effective.

regenerativescience commented 3 months ago

@Clouate Thank you for your guidance. I ran the command and the result was 271.

Incidentally, when I tried it with v7, it passed mapping, but it did not pass 03.regsiter due to a version issue with ImageStadio, so I switched to v6 and tried running it. #135 The .sh was reproduced by following the edit history. It also rebuilt the STAR index to run it on v6.

Before contacting the computer administrator, I would appreciate it if you have any idea why the error does not occur in v7 but in v6. (I should add that I had no problems with singularity exec --bind ${PWD}:${PWD} ${sif} in v7).

Clouate commented 3 months ago

Because SAW mapping program has been greatly optimized and reconstructed in v7, the corresponding STAR version has also been updated. Regarding your issue, since SAW v7 could run successfully, we recommend using ImageStudio v3.0.4 to re-QC the image and then use SAW v7.

regenerativescience commented 3 months ago

Thank you very much. I will contact the administrator in the meantime.