Dear All, I would like to ask for help on how to read different files automatically and do analysis using scripts. 1. Description of the data 1.1. there are 5 text files, each of which contains cleaned data for the same 100 SNPs. Observations (e.g., position on gnome, alelle type, ...) for SNPs are rows ordered by the SNP numbers, 1.2. there are 1 text file, containing the expression level of mRNAs 9 (and other information), which are rows ordered by mRNA numbers, So for each SNP the sample size is 5. 2. Description of aim Take SNP 1 and mRNA 1 for example. Write a scrip that can 2.1 extract row 1 from each of the 5 text files for SNP data 2.2 extract row 1 from the mRNA text file 2.3 regress mRNA 1 counts on SNP 1 2.4 store regression results, SNP number, mRNA number and their positions on gnome 3. key thing I need help automatic extraction of observations for one particular SNP from SNP data files, since there are actually 400 SNP data files, or more generally extract information automatically from different files and store it properly for operation. Thanks a lot! Chee [[alternative HTML version deleted]]