MaestSi / CharONT2

A NextFlow ONT-based pipeline for characterizing long genomic regions
GNU General Public License v3.0
6 stars 1 forks source link

No such file error #1

Closed maximum411 closed 10 months ago

maximum411 commented 11 months ago

Hi,

I am following up on the post at https://community.nanoporetech.com/posts/determining-number-of-uniq

You asked "Are you sure the file exists, has reading permissions and the /home directory is accessible by Docker container?"

The file definitely exists, has read permissions for all users, and the /home directory was specified for Docker access in the config file.

Edit: here is the full original post. I have been trying to use CharONT2, but am struggling to get it to work. I keep getting errors like the one below. Any suggestions?

nextflow -c CharONT2.conf run CharONT2.nf -profile dockerN E X T F L O W  ~  version 23.10.0Launching `CharONT2.nf` [big_colden] DSL2 - revision: 3be7e08046executor >  local (1)[c2/22b57f] process > inSilicoPCR (1)             [  0%] 0 of 1[-        ] process > preliminaryConsensusCalling -[-        ] process > readsAssignment             -[-        ] process > draftConsensusCalling       -[-        ] process > consensusPolishing          -[-        ] process > trfAnnotate                 -ERROR ~ Error executing process > 'inSilicoPCR (1)'
Caused by:  Process `inSilicoPCR (1)` terminated with an error exit status (1)
Command executed:
  mkdir -p results/inSilicoPCR  sample=$(echo $(basename $(realpath /home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq)) | sed 's/\.fa.*//' | sed 's/\.fq.*//')  sam_file_one=$sample"_in_silico_pcr_one.sam"  sam_file_two=$sample"_in_silico_pcr_two.sam"  trimmed_reads_fq=results"/inSilicoPCR/"$sample"_trimmed.fastq"  export PATH=$PATH:/opt/conda/envs/CharONT_env/bin/  mem=$(echo 15 GB | sed 's/ //' | sed 's/B//' | sed 's/G/g/' | sed 's/M/m/')  /opt/conda/envs/CharONT_env/bin/msa.sh in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=$sam_file_one literal=GCCCCTTTTTAGGTTTCAGG qin=33 cutoff=0.8 -Xmx$mem  /opt/conda/envs/CharONT_env/bin/msa.sh in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=$sam_file_two literal=GAGGTCTGGTTTGGCAACTG qin=33 cutoff=0.8 -Xmx$mem  /opt/conda/envs/CharONT_env/bin/cutprimers.sh in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=$trimmed_reads_fq sam1=$sam_file_one sam2=$sam_file_two qin=33 fake=f include=t fixjunk -Xmx$mem  ln -s $trimmed_reads_fq ./trimmed.fastq
Command exit status:  1
Command output:  (empty)
Command error: realpath: /home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq: No such file or directory basename: missing operand Try 'basename --help' for more information. java -ea -Xmx15g -cp /opt/conda/envs/CharONT_env/opt/bbmap-39.01-1/current/ jgi.FindPrimers in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=_in_silico_pcr_one.sam literal=GCCCCTTTTTAGGTTTCAGG qin=33 cutoff=0.8 -Xmx15g Executing jgi.FindPrimers [in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq, out=_in_silico_pcr_one.sam, literal=GCCCCTTTTTAGGTTTCAGG, qin=33, cutoff=0.8, -Xmx15g] java.lang.RuntimeException: Can't find file /home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq     at fileIO.ReadWrite.getRawInputStream(ReadWrite.java:935)      at fileIO.ReadWrite.getInputStream(ReadWrite.java:898)executor > local (1)[c2/22b57f] process > inSilicoPCR (1) [100%] 1 of 1, failed: 1 ✘[- ] process > preliminaryConsensusCalling -[- ] process > readsAssignment -[- ] process > draftConsensusCalling -[- ] process > consensusPolishing -[- ] process > trfAnnotate -ERROR ~ Error executing process > 'inSilicoPCR (1)'
Caused by:  Process `inSilicoPCR (1)` terminated with an error exit status (1)
Command executed:
  mkdir -p results/inSilicoPCR  sample=$(echo $(basename $(realpath /home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq)) | sed 's/\.fa.*//' | sed 's/\.fq.*//')  sam_file_one=$sample"_in_silico_pcr_one.sam"  sam_file_two=$sample"_in_silico_pcr_two.sam"  trimmed_reads_fq=results"/inSilicoPCR/"$sample"_trimmed.fastq"  export PATH=$PATH:/opt/conda/envs/CharONT_env/bin/  mem=$(echo 15 GB | sed 's/ //' | sed 's/B//' | sed 's/G/g/' | sed 's/M/m/')  /opt/conda/envs/CharONT_env/bin/msa.sh in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=$sam_file_one literal=GCCCCTTTTTAGGTTTCAGG qin=33 cutoff=0.8 -Xmx$mem  /opt/conda/envs/CharONT_env/bin/msa.sh in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=$sam_file_two literal=GAGGTCTGGTTTGGCAACTG qin=33 cutoff=0.8 -Xmx$mem  /opt/conda/envs/CharONT_env/bin/cutprimers.sh in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=$trimmed_reads_fq sam1=$sam_file_one sam2=$sam_file_two qin=33 fake=f include=t fixjunk -Xmx$mem  ln -s $trimmed_reads_fq ./trimmed.fastq
Command exit status:  1
Command output:  (empty)
Command error: realpath: /home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq: No such file or directory basename: missing operand Try 'basename --help' for more information. java -ea -Xmx15g -cp /opt/conda/envs/CharONT_env/opt/bbmap-39.01-1/current/ jgi.FindPrimers in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq out=_in_silico_pcr_one.sam literal=GCCCCTTTTTAGGTTTCAGG qin=33 cutoff=0.8 -Xmx15g Executing jgi.FindPrimers [in=/home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq, out=_in_silico_pcr_one.sam, literal=GCCCCTTTTTAGGTTTCAGG, qin=33, cutoff=0.8, -Xmx15g] java.lang.RuntimeException: Can't find file /home/gorbunova/CharONT2/P53_canon_mluc/P53_basecall_sup.fastq     at fileIO.ReadWrite.getRawInputStream(ReadWrite.java:935)      at fileIO.ReadWrite.getInputStream(ReadWrite.java:898)      at fileIO.ByteFile1.open(ByteFile1.java:330)      at fileIO.ByteFile1.<init>(ByteFile1.java:100)      at fileIO.ByteFile2$BF1Thread.<init>(ByteFile2.java:237)      at fileIO.ByteFile2.open(ByteFile2.java:215)      at fileIO.ByteFile2.<init>(ByteFile2.java:86)      at fileIO.ByteFile.makeByteFile(ByteFile.java:35)      at fileIO.ByteFile.makeByteFile(ByteFile.java:27)      at stream.FastqReadInputStream.<init>(FastqReadInputStream.java:59)      at stream.ConcurrentReadInputStream.getReadInputStream(ConcurrentReadInputStream.java:116)      at stream.ConcurrentReadInputStream.getReadInputStream(ConcurrentReadInputStream.java:52)      at jgi.FindPrimers.process(FindPrimers.java:193)      at jgi.FindPrimers.main(FindPrimers.java:45)
Work dir:  /home/gorbunova/CharONT2/work/c2/22b57f9b2d55e53078226e9bb6cab8
Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`
 -- Check '.nextflow.log' file for details
MaestSi commented 11 months ago

Hi, based on: mkdir -p results/inSilicoPCR it seems to me that you did not specify a full path for the --results_dir parameter. Please try to fix this and let me know if this solves the issue. Best, SM

maximum411 commented 11 months ago

Thanks. I changed this and tried various full paths but got the same issue. Also, I just want to check where the scripts directory should be? Is this referring to the scripts folder in the CharONT2 folder?

MaestSi commented 11 months ago

Yes, the scripts folder is the one in the CharONT2 folder. I would suggest to start testing the installation with the toy dataset available in the repository. Once you are done with that, in case it fails, could you please provide the full .conf file and the command that you ran? That would be helpful to troubleshoot. SM

maximum411 commented 10 months ago

Sorry for the delay. I get the same error with the test data set.

I attached a text file which contains the command + error message output from the terminal, as well as a text file of the .conf (it will only allow me to upload a .txt here but it is a .conf when I use it).

CharONT2_conf.txt command_error.txt

MaestSi commented 10 months ago

Hi, containerOptions = '-v /home --user root' is not the correct way to mount home dir, you should use instead: containerOptions = '-v /home:/home' Moreover, I don’t think you can run with --user root option, you should properly configure Docker to run for your user. SM

maximum411 commented 10 months ago

Thank you! It looks like this was the issue and it seems to be working now. I appreciate your patience.

I had added the --user root option at some point during troubleshooting, but it did not seem to affect the appearance of the error message. But changing to containerOptions = '-v /home:/home' fixed it.

MaestSi commented 10 months ago

Great! Best, SM