I agree with Eleanor. Sftools was designed for a different purpose. I does have a batch mode but I am not sure it will solve your problems completely and the little notice on top already indicates that this was never considered to be an ideal solution. Here is the MODE help page. You can give it a try but you may have to go back to good old CAD.
Bart selected: MODE Notice: This option is will become obsolete in the next release. Try to avoid using it in scripts. OPTION: MODE BATCH | INTERACTIVE ================================ Bring the program in or out of Batch mode Use MODE BATCH when running SFTOOLS in batch This surpresses some questions by SFTOOLS, e.g. to hit return to see the next page in LIST REF Use MODE INTERACTIVE to return to interactive mode if that would ever be useful EXAMPLES: MODE BATCH MODE INTERACTIVE On Wed, Jan 7, 2015 at 2:57 AM, Eleanor Dodson <eleanor.dod...@york.ac.uk> wrote: > Easier to use CAD for this! > SFTOOLS is too clever.. > Eleanor > > On 7 January 2015 at 03:45, Seth Harris <set...@gmail.com> wrote: > >> Hi all, >> >> I have a heterogeneous collection of mtz files I'm trying to whip into >> some kind of standardized vocabulary shape, namely setting column names and >> types so that subsequent scripts can sensibly make maps and so forth. I >> have set up the ever-useful sftools to do most of this, but of course >> sftools scripts rely on one providing a series of answers to questions you >> think it is going to ask, and by its own admission it was designed to be >> used interactively and includes various "protections" which, also by its >> own admission, makes it harder to use it in batch mode... Because it finds >> files with interesting columns (e.g. only 1's and 0's) that prompt it to >> ask you unexpected questions (e.g. is this an X-plor Rfree column? despite >> the "Rfree_flag title and the 5% population of 1's ; ). , for which your >> prescribed answers no longer apply (and my log files end up with inane >> computer v computer dialogues like "You must answer Y or N! You must answer >> Y or N! You must answer...etc.") >> >> So, presumably the number of exceptional cases is finite (though tedious) >> and I can just carry on dealing with them one after the other and learn to >> be a better coder, but... >> >> My question: is there some way to turn off these protections (i.e. please >> just read in the file without question!), or some version of SFTOOLS that >> is more batch-friendly about which I'm not yet aware? It would be nice to >> have something that can more programmatically interrogate mtz column >> headers and respond sensibly rather than this kind of 20 questions you do >> when you have to read the header and then parse the names and then ask a >> series of "is it Rfree?" "is it CV?" "is it bigger than a breadbox?" type >> stuff. >> >> Again, I know the sftools documentation is clear that the design goal was >> for interactive use and humans have little trouble with such questions, but >> when there might be several thousand of them... >> >> Thanks for any pointers or alternatives! >> >> Seth >> >> >> > -- Bart Hazes Associate Professor Dept. of Medical Microbiology & Immunology University of Alberta