I have been doing this for hours and I have just given up:...
The task: loop through a folder of files and perform 6 scripts on each file to run as one shell script
Each time a file is processed by one script it gets put in another folder. The intention is to pass the resulting file name to the next script. I dont want to keep the folder path and the original .txt or whatever just the filename and the new file extension. Can anyone help?
The scripts are as follows (on a mac as a shell script)
for each file as $file
$ gzcat $file.fq.gz | ./reformat_sequence_data.rb > ./reformatsequence/$file.txt
$ python qualityMask.py ./reformatsequence/$file.txt ./qualitymask/$file.seq 20 1
$ ./unique_seq_counts.rb ./qualitymask/$file.seq > ./uniquecounts/$file.counts.txt
$ cut -f1 ./uniquecounts/$file.counts.txt > ./uniqueseq/$file.uniq.seq
$ ./bowtie-1.1.0/bowtie -r -m1 -v1 ./bowtie-1.1.0/indexes/hg19 ./uniqueseq/$file.uniq.seq > ./alignedunique/$file.bowtie.txt