cutadapt not working when calling in a bash code with qsub
1
0
Entering edit mode
10 weeks ago
Meghan.T • 0

I am using a server that allows job submission via qsub. In the interactive mode, cutadapt works fine, but when I try to run a pipeline that uses cutadapt with qsub like : qsub -cwd run_script.sh I get the following error and trimming does not happen:

 Traceback (most recent call last):
  File "/mnt/storage/apps/Python-3.6.13/bin/cutadapt", line 8, in <module>
    sys.exit(main_cli())
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/cutadapt/__main__.py", line 965, in main_cli
    main(sys.argv[1:])
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/cutadapt/__main__.py", line 1028, in main
    args, default_outfile, file_opener, adapter_names, adapter_names2
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/cutadapt/__main__.py", line 508, in open_output_files
    out, out2 = file_opener.xopen_pair(args.output, args.paired_output, "wb")
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/cutadapt/utils.py", line 222, in xopen_pair
    file1 = self.xopen_or_none(path1, mode)
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/cutadapt/utils.py", line 214, in xopen_or_none
    return self.xopen(path, mode)
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/cutadapt/utils.py", line 205, in xopen
    xopen, path, mode, compresslevel=self.compression_level, threads=threads
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/cutadapt/utils.py", line 51, in open_raise_limit
    f = func(*args, **kwargs)
  File "/mnt/storage/apps/Python-3.6.13/lib/python3.6/site-packages/xopen/__init__.py", line 827, in xopen
    opened_file = open(filename, mode, **text_mode_kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '${trimmed_dir}/r1.fq'

I have specified export PATH="/mnt/storage/apps/Python-3.6.13/bin:$PATH" at the beginning of my code, but still I get the same error.

cross posted here : https://stackoverflow.com/questions/79071046/cutadapt-not-working-when-calling-in-a-bash-code-with-qsub

qsub trim cutadpat • 342 views
ADD COMMENT
1
Entering edit mode
10 weeks ago

no such file or directory: '${trimmed_dir}/r1.fq

it looks like you escaped a dollar sign in your script. The variable is not replaced (used in single quote ? an antislash before the '$' ? , etc...)

ADD COMMENT
0
Entering edit mode

So,

no such file or directory: '${trimmed_dir}/r1.fq

refers to the output of the cutadapt. since cutadapt did not work , the script could not find the output either.

ADD REPLY
0
Entering edit mode

Please show full script and replace the single by double quotes so the variable can expand.

ADD REPLY

Login before adding your answer.

Traffic: 1928 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6