I am submitting this problem to the  R forum , rather than the Bioconductor forum, because its nature is closer to programming style than any  Bioinformatic contents.
I have implemented an R script to extracts many strings  through querying 3 Bioinformatic databases in the same loop cycle. Ideally, the script should perform as many cycles as necessary to extract all available data of interest.
Inevitably it triggers a BioMart exception after running many cycles in a row. The exception seems to be independent of the script instructions because if I restart the script from the point where it got interrupted then it runs for another while, extracting also the data where the exception occurred with no problem at all.
Sometimes, though, the script does not respond any more, it hangs up, even if no exception has apparently occurred, and the only way to regain control is to kill the R process. This way I lose memory of how many data have been processed and stored to disk files (unless I manually count them ... there are thousands ..). If I restart the script then it restarts processing the data strings from scratch. I guess it may be a memory problem as the task manager (Windows/XP) shows that the hung-up R script is taking more than 70% of the available RAM.
I wonder whether there is any system command to make the script self-aware of its memory requirements and running time.
Ideally the script should be able to trap the exception and be sensitive to its current RAM / CPU time requirements, self-exit after freezing and saving the current program status so that when rerun it would not restart from scratch but rather pick up from where it exited.
Maybe this is asking too much from a non-compiled language ?

Thank you in advance,
Maura 


tutti i telefonini TIM!


	[[alternative HTML version deleted]]


