it's amazing working. thank you very much :)
• 0 views
•
link
Hello, I'm trying to use the parallel command to use GATK tools faster. However, I cannot set the F1 and F2 parameters in the FastqToSam tool. How can I do that? The method I'm trying is this:
ls ~/fastqfolder/*R1* | parallel --bar -j 8 "gatk FastqToSam -F1 {} -F2 {} -O {}.sam
I can export the F1 file with this command, but I couldn't figure out how to export the F2 file. Can you help me?
Imagine your files are like Basename_R1.fastq.gz and Basename_R2.fastq.gz you can first list all R1 files, extract the basename and then feed this into parallel:
ls *_R1.fastq.gz \
| awk -F "_R1.fastq.gz" '{print $1}' \
| parallel "gatk FastqToSam -F1 {}_R1.fastq.gz -F2 {}_R2.fastq.gz -O {}.sam"
Guess who asked the same question when he was new to the field :) https://stackoverflow.com/questions/45843483/basename-in-gnu-parallel
it's amazing working. thank you very much :)
Log in to answer this question.