Question: Pandaseq in a bash for-loop - Error nofile
0
gravatar for fibar
4.1 years ago by
fibar50
Argentina
fibar50 wrote:

I'm merging R1 and R2 files derived from 16S rRNA miseq amplicon-sequencing, and I'd like to perform it on several samples at once. This is my script:

for r1 in *R1*;
do
r2=${r1/R1/R2};
pandaseq -f $r1 -r $r2 -o 10 -w ${r1/R1_001.sic.00.0_0.cor.fastq/pandaseq.fasta};
done

The screen output says this for all my R1 files:

ERR    NOFILE    Order-89-1-1_S1_L001_R1_001.sic.00.0_0.cor.fastq
Too confused to continue.
Try -h for help.

Is there something missing in that script? Thanks a lot!

ADD COMMENTlink modified 21 months ago by mxm26230 • written 4.1 years ago by fibar50

#TIL in-line replace in bash variables (the {//} syntax). Thank you.

ADD REPLYlink written 4.1 years ago by RamRS25k

Hi Fibar..I have the same problem.. Can you please let me know your email..so i can write in detail

Regards Mukil

ADD REPLYlink written 21 months ago by mxm26230

So the solution mentioned below did not work for you?

@fibar has not been seen on Biostars for over a year so your best bet may be to create a new post/thread to describe your problem.

ADD REPLYlink written 21 months ago by genomax78k

@fibar: post example file list. File list you have and code you are using. please don't post screenshots unless it is error.

ADD REPLYlink modified 21 months ago • written 21 months ago by cpad011212k

Hi, I'm sorry for the poor post. @mxm2623 Please read the solution below.

ADD REPLYlink written 21 months ago by fibar50

@fibar.. I am confused. Was this thread edited? Looking at my post, it seems it is unnecessary to tag you in my post (9 days ago). If so, I am sorry.

ADD REPLYlink written 21 months ago by cpad011212k

No you did not tag Fibar. You can't tag a user by just using "@"name. You need to paste their biostar profile link URL in a post.

@Fibar probably had "follow via email" set up for this thread and thus came back to respond.

ADD REPLYlink modified 21 months ago • written 21 months ago by genomax78k

@genomax! My concern was i unnecessarily directed my post @Fibar for some unknown reason. For that I was sorry.

ADD REPLYlink written 21 months ago by cpad011212k
0
gravatar for fibar
4.1 years ago by
fibar50
Argentina
fibar50 wrote:

I found a long solution, but it works. It was a matter of working on that last in-line replacement for the output (w).

#1

for r1 in *R1*;
do
    r2=${r1/R1/R2};
    pandaseq -f $r1 -r $r2 -o 10 -w ${r1/R1/pandaseq};
done

#2

mkdir pandaseq

#3

mv *pandaseq.fastq pandaseq

#4

for r1 in pandaseq/*fastq;
    do
    mv $r1 ${r1/fastq/fasta};
done

This generates now a merged file for each sample, kept in a separate folder.

ADD COMMENTlink modified 8 weeks ago by RamRS25k • written 4.1 years ago by fibar50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1802 users visited in the last hour