Error while processing files: /dev/fd/63 file or directory not found

Hi,
I´m trying to run metaphlan3 on a slurm node with 32 cores and Ubuntu 20.4 on a set of paired-end gzipped fastQ files using the following command:

mkdir $PATH_output
#Loop through all the raw fastQ files
for fastq in $PATH_input/$Fw.$FileType
do
SampleName=$(basename $fastq| cut -d ‘_’ -f 1)
if [ -d $PATH_output/$SampleName
]
then
echo “Sample was already analysed”
else
metaphlan --input_type fastq <(zcat $fastq $(echo $fastq | sed “s/$Fw.$FileType$/$Rv.$FileType/1”)) --bowtie2out $PATH_output/$SampleName.bowtie2.bz2 --nproc $cpu -o $PATH_output/profiled_$SampleName.txt --unknown_estimation --bowtie2db $List
#metaphlan --input_type fastq <(zcat $fastq) --bowtie2out $PATH_output/$SampleName.bowtie2.bz2 --nproc $cpu -o $PATH_output/profiled_$SampleName.txt --unknown_estimation --bowtie2db $List
fi
done

However, I get the error
Traceback (most recent call last):
File “/molmyc/miniconda3/envs/metaphlan/bin/read_fastx.py”, line 10, in
sys.exit(main())
File "/molmyc/miniconda3/envs/metaphlan/lib/python3.6/site-packages/metaphlan>
nreads += read_and_write_raw(f, opened=False, min_len=min_len)
File "/molmyc/miniconda3/envs/metaphlan/lib/python3.6/site-packages/metaphlan>
with fopen(fd) as inf:
File "/molmyc/miniconda3/envs/metaphlan/lib/python3.6/site-packages/metaphlan>
return open(fn)
FileNotFoundError: [Errno 2] No such file or directory: ‘/dev/fd/63’

Anybody an idea?

Have you tried piping zcat $fastq instead of using the redirection?

Hi!
Apparently metaphlan3 also accepts gzipped files, so actually no need to zcat.
Following code worked for me:

for fastq in $PATH_input/*$Fw.$FileType

do

 SampleName=$(basename $fastq| cut -d '.' -f 1)
 fastqR2=$(echo $fastq | sed "s/$Fw.$FileType$/$Rv.$FileType/1")
 if [ -d $PATH_output/$SampleName* ]
 then
	# echo "Sample was already analysed"
 else
	metaphlan $fastq,$fastqR2 --input_type fastq --bowtie2out $PATH_output/$SampleName.bowtie2.bz2 --nproc $cpu -o $PATH_output/profiled_$SampleName.txt --unknown_estimation --bowtie2db $List
 fi

done