Hi,
I need help fixing my script to automate multiple file conversions.
I am working in the server so, and i am trying to find a way to convert files automatically
the conversion needs to be made through four formats: sam,bwa, and bcf, and vcf
The files increment at two spots like this
each increment has two file formats: .sai and .fastq
004_001
…2
…3
…4
then*
005_001
…2
…3
…4
I have tried:
Code:
for i in {1…4}
do*
$bwa samse $hg19 $csai $cfas > .sam
done
but it only work with the _001 file all four times.
I have tried setting the end increment to I so instead of _001 its *_00$((i)) to go 1,2,3,4 but its stays at 1.
example of sam conversion
Code:
for i in {1…4}
do*
./bwa samse* /hg19.fa* *_00$((i)).sai _00$((i)).fastq > *_00$((i)).sam
done
I wrote it to run input files with that name and output data to the sam file.*
It works but it converts _001 four time instead of _001 to _004
basically I need to write a script that will automate multiple file conversions
3 file inputs > output 1 file .sam
input .sam file > output .bam file
input bam file > output .bcf file
input .bcf file > output .vcf file