Answer the question
In order to leave comments, you need to log in
How to run two files in a process at the same time?
Hello, just now they helped me with understanding how to script the launch of all files (with the fastqc module) that are in the folder one after the other, suppose in the /home/blabla/files/ folder there are file1.fastq, file2.fastq, file3.fastq, etc. d.
everything that is in the folder one by one - like this
for file in $(find /home/blabla/files/ -name '*.fastq')
do
fastqc "$file" -o /home/blabla/FastQC_out
done
java -jar trimmomatic-0.39.jar PE -phred33 \
/home/blabla/files/file1.fastq /home/blabla/files/file2.fastq
output-file1-FOR.fastq \
output-file1-REV.fastq \
output-file2-FOR.fastq \
output-file2-REV.fastq \
ILLUMINACLIP:TruSeq3-PE-2.fa:2:30:10 LEADING:5 TRAILING:5 SLIDINGWINDOW:4:5 MINLEN:36
java -jar trimmomatic-0.39.jar PE -phred33
andILLUMINACLIP:TruSeq3-PE-2.fa:2:30:10 LEADING:5 TRAILING:5 SLIDINGWINDOW:4:5 MINLEN:36
- these are programs with their arguments, which, in fact, process file1 and file2. Answer the question
In order to leave comments, you need to log in
And if the folder will lie
file1
file3
file4
file5
file1
file10
file2
file3
#~/bin/bash
pat='_([0-9]+)_A'
for file in $(find ./ -name '*.fastq')
do
if
then
java -jar trimmomatic-0.39.jar PE -phred33 \
file_${BASH_REMATCH[1]}_A.fastq \
file_${BASH_REMATCH[1]}_B.fastq \
output-file_${BASH_REMATCH[1]}_A-FOR.fastq \
output-file_${BASH_REMATCH[1]}_A-REV.fastq \
output-file_${BASH_REMATCH[1]}_B-FOR.fastq \
output-file_${BASH_REMATCH[1]}_B-REV.fastq \
ILLUMINACLIP:TruSeq3-PE-2.fa:2:30:10 LEADING:5 TRAILING:5 SLIDINGWINDOW:4:5 MINLEN:36
fi
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question