Closed kimh11 closed 5 years ago
find and xargs would work will for this..
an example
%%bash
find /Volumes/Serine/wd/18-04-27/zr2096_*R1* \
| xargs basename -s _s1_R1_val_1.fq.gz | xargs -I{} /Applications/bioinfo/Bismark_v0.19.0/bismark \
--path_to_bowtie /Applications/bioinfo/bowtie2-2.3.4.1-macos-x86_64 \
--genome /Volumes/Serine/wd/18-03-15/genome \
--score_min L,0,-1.2 \
-p 4 \
--non_directional \
-1 /Volumes/Serine/wd/18-04-27/{}_s1_R1_val_1.fq.gz \
-2 /Volumes/Serine/wd/18-04-27/{}_s1_R2_val_2.fq.gz \
2> bismark.err
I'm trying to convert all .sam files to .bam files. To this this, I figured I'll create a list of commands using:
It works and I get a list that looks like this:
I would rather have files called aln-10595.bam and not all-10595.sam.bam. Is there an easy way to this this as part of the for loop?
Thank you!