Hi everyone,
I'm new to linux and shell scripting and am having particular trouble figuring out how exactly to approach/script the following that I wish to do. Any help would be much, much appreciated.
I am running an application called QuantiSNP (
http://groups.google.co.uk/group/qua...uantisnp-usage). The binary file is "quantisnp2", called upon in the "run_quantisnp2.sh" supplied by the authors. I am only able to run the application for single file processing (e.g. 1 input file for 1 sample; I can't run the batch file processing because I don't have the necessary BeadStudio report files, which has different formatting for the input files).
The difficulty is that I have 300 samples (300 unique sample IDs) and 3 input files for each sample for a total of 900 runs of this application. I am wondering how would I be able to automate this process as a shell script instead of basically manually changing the sample ID and respective input files every time a run completes? I bolded the single file processing shell script command line options below that need to be changed for each sample/input single file processing run. The command line option "--sampleid" is for the name given to the processed output files corresponding to the sample of interest and there are 3 input files for each sample.
/home2/jason/QuantiSNP/quantisnp/linux64/run_quantisnp2.sh /home2/jason/QuantiSNP/MCR/v79/ --config /home2/jason/QuantiSNP/quantisnp/config/params.dat --levels /home2/jason/QuantiSNP/quantisnp/config/levels-affy.dat --outdir /home2/jason/QuantiSNP/quantisnp_out/ --sampleid
sample1 --gender female --input-files
/home2/jason/files/sample1_input.txt
-------------
Note that each sample has 3 input files, for a total of 3 runs of "quantisnp2" for each sample.
e.g.
SAMPLEID INFILE
sample1 /home2/jason/files/sample1_input.txt
sample1 /home2/jason/files/sample1_input2.txt
sample1 /home2/jason/files/sample1_input3.txt
sample2 /home2/jason/files/sample2_input.txt
sample2 /home2/jason/files/sample2_input2.txt
sample2 /home2/jason/files/sample2_input3.txt
...etc.
-------------
Thanks again! Please feel free to let me know if anything I wrote above needs clarification.