tjiangHIT / cuteSV

Long read based human genomic structural variation detection with cuteSV
MIT License
250 stars 36 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/mnt/c/Users/misha/Documents/Forsburg Lab/cuteSV/DEL.sigs' #106

Closed mishakhm closed 2 years ago

mishakhm commented 2 years ago

Hi, I just installed cuteSV and am trying to run it, but I get this error: image This also happens when running without extra arguments, as follows: image

I have tried multiple BAM and reference files and still get this error. Please let me know if I'm doing something wrong and how to resolve the problem. Thank you!

Meltpinkg commented 2 years ago

Hello, @mishakhm

I think the error is caused by the vacancy of variation signatures in the BAM file, and we lack some handling on this event in cuteSV. I have a further question. Can you have a look at the directory /mnt/c/Users/misha/Documents/Forsburg Lab/cutesv/signatures to see if there is any file in the directory? If is, what are the size of these documents? It will be helpful for me to resolve the problem. Thanks a lot!

Best, Shuqi

mishakhm commented 2 years ago

Thanks, I see. These files were created upon running cuteSV, before it errored out: image

Meltpinkg commented 2 years ago

Does your terminal has the commands of sort? cuteSV uses this command to generate SV signatures. In other words, you can try the following commands in your terminal (in the signatures directory), and check whether it throws errors. cat *.bed | grep -w DEL | sort -u -T ./ | sort -k 2,2 -k 3,3n -T ./ | less

mishakhm commented 2 years ago

Yes, that command works fine and displays the following output: image After exiting the view, no errors are shown: image It's an Ubuntu 20.04 shell, though it is running through Windows Subsystem for Linux so there's a slight chance that could be causing the problem? In theory it shouldn't, as it's a full Linux kernel. Thanks for your help so far!

Meltpinkg commented 2 years ago

That seems strange and maybe I still don't know the exact reason... Can you provide a part of your data for me to reproduce this error if it is available? It will help me a lot. My e-mail address is: sakura_qian@163.com By the way, which version of cuteSV did you use?

mishakhm commented 2 years ago

Sure, I just emailed you the files. I was using cuteSV version 2.0.2 and Python 3.8.10.

Meltpinkg commented 2 years ago

I applied cuteSV 2.0.2 on the provided data with the following commands. cuteSV Iso1_Ch1_Bam.bam /data/1/sqcao/ref/hs37d5.fa output.vcf ./ --retain_work_dir It did not throw error and finished successfully. image Also, the sigs file were generated. image

I think maybe something in your environment influenced the running of cuteSV. You can try create a new environment and run cuteSV with the corresponding dependence, and check whether the .sigs file can be generated.

mishakhm commented 2 years ago

I tried to set up a fresh install of Ubuntu and reinstalled cuteSV, but initially still got the error. However, changing my working directory argument from passing in the full path of the current folder to your ./ --retain_work_dir caused it to run successfully: image Just out of curiosity, I tried adding --retain_work_dir to my previous command (passing in the full path) and this also caused an error. I tried both with and without an ending / on my path. image Anyways, I'm glad I got it to work using ./. I'm a little confused why it didn't work with manually passing in the path, as my impression is that ./ should be the same as passing in the full path of the current folder, but maybe I'm wrong. Thanks for all your help!

Meltpinkg commented 2 years ago

@mishakhm I'm glad to hear your success! cuteSV parses the given directory and writes temporary files into it. Maybe you can try to remote the quotation: " from the directory in the commands? I'm not sure whether the quotation causes the failure in parsing the directory path.