Limbo
Limbo

Reputation: 29

Fastp can not open a file

I used fastp like this

> cat test | while read id
> do
>     name=`echo $id |awk '{print $1}'`
>     read1=`echo $id |awk '{print $2}'`
>     read2=`echo $id |awk '{print $3}'`
>     echo $name 
>     echo $read1 
>     echo $read2
>     fastp \
>         -i $read1 \
>         -o ./test_R1.fq \
>         -I $read2 \
>         -O ./test_R2.fq
> done

The test file is a txt file separate with \t

Then I got a error

But when I use fastp direct

fastp -i /home/imp008/private_hx_176/W034803N_HTW7JDSXX-L1_R1.fastq.gz -I /home/imp008/private_hx_176/W034803N_HTW7JDSXX-L1_R2.fastq.gz -o ./test_R1.fq -O ./test_R2.fq

It works! So can you tell me why it can not open the R2 file? Thanks!!

I used fastp but it return a error "can not open the file", but it works if I used fastp direct

Upvotes: 0

Views: 733

Answers (1)

Jenni Jane
Jenni Jane

Reputation: 1

The order of your arguments in fastp is wrong in your script. Try: -i read1 -I read2 You are using the correct order when you do it directly.

Upvotes: 0

Related Questions