Run merge-paired-reads script for multiple files at the same time (SortMeRNA)
2
0
Entering edit mode
5.9 years ago
Sillpositive ▴ 20

Hello everybody. right now I'm trying to assemble the fast q files with reverse and forward read with the SortMeRNA script and then filter (r RNA). but however, I have a lot of files. I would like to know it is possible to launch a script that takes my first script (merge-paired-reads.sh) and does the work on all on all my files.

how does work merge-paired-reads.sh:

bash scripts/merge-paired-reads.sh file_R1.fastq file_R2.fastq combined.fastq.

I have lot of files like this (54 to be precise):

example :

SRR3571052_1.fastq
SRR3571064_1.fastq
SRR3571072_1.fastq
SRR3571148_1.fastq
SRR3571158_1.fastq
SRR3571167_1.fastq
SRR3571179_1.fastq
SRR3571052_2.fastq
alignment Assembly genome • 3.0k views
ADD COMMENT
0
Entering edit mode

Thank you so much Pierre ( Merci beaucoup ) !

Another Question , it possible to delete old files ( ${F}_1.fastq ${F}_2.fastq ${F} ) to save hard drive space at the same time ?

Encore Merci !

ADD REPLY
0
Entering edit mode

it's a very basic bash question , consider this as an exercise.

ADD REPLY
0
Entering edit mode

Thank you so much again but i don't know, how and where i can put this condition rm -f ${F}_1.fastq* {F}_2.fastq* ?

ADD REPLY
0
Entering edit mode

Never delete original data files unless you have a backup. You will regret doing that later, if something goes wrong and you need to start over.

ADD REPLY
0
Entering edit mode

Thank you for response but I have a backup and no more space so I need to know how delete forward and reverse at the same time.

ADD REPLY
0
Entering edit mode

Hi, could you please share the dummy code which I can relate to, for the whole workflow (uncompressing, merging,sortMeRNA, unmerging). as I am a newbie for programming. I have the same problem. Thanks in advance.

ADD REPLY
1
Entering edit mode
5.9 years ago
find . -type f -name  "*_1.fastq" | sed 's/_1.fastq$//'   | while read F; do bash scripts/merge-paired-reads.sh ${F}_1.fastq ${F}_2.fastq ${F}.combined.fastq ; done
ADD COMMENT

Login before adding your answer.

Traffic: 2519 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