Hi I am trying to convert
bam files generated from Ion Torrent Proton sequencing to
fastq format so that I can upload them to KBase for analysis.
The files are named as follows:
01_thu159_IX_RNA_001.bam 01_thu163_IX_RNA_001.bam 01_thu164_IX_RNA_001.bam 01_thu190_IX_RNA_001.bam
So I tried:
samtools fastq *.bam > *.fastq
However, that did not work. But, I know it is possible to use a placeholder for the name in code by using something like
$f or I have also seen
%N%. I am just not sure how to basically use those placeholders to be able to quickly apply a
for loop, which will convert the files to fastq format without having to do each one individually. I have 28 samples each containing 4
bam files. Any advice on how I can do this would be greatly appreciated.