![]() |
![]() |
#1 |
May 2009
Dedham Massachusetts USA
84310 Posts |
![]()
Currently, I have a very primitive way of submitting sequences to the database (this is a *.bat file on windows). For example:
aliqueit -c 60 6261388 aliqueit -s 0 6261388 aliqueit -c 60 6261822 aliqueit -s 0 6261822 .... Each number is listed separately (I create the list using emacs macros so long lists isn't an issue). This has some major weaknesses for new sequences like ones over 6 million. The biggest problem is that I hit the 3000 limit, I am not submitting the sequences to the database at all I was thinking of splitting out the sends to the data base from the running of the sequences, but to do that I really need a way to know if I am at the 3000 limit and I need a loop like the following pseudo-code: for each item in a list: Check if we are at the 3000 limit. if so wait 5 min and try again If not at the limit, submit the sequence (using aliqueit -s or some other method) It also occurs to me that submitting from 0 each time is sending too much. An enhancement is to find the length of the sequence in the database and send only the needed part (which may be nothing in which case I can skip the sequence). I could use the current index/length for: aliqueit -s <current index> <sequence> I don't know how expensive it is to find the length of a sequence vs sending the whole thing, but I am thinking finding the length is cheaper. I do know the number of database queries is quite large if I submit from 0 each time. I could look up how to loop in a batch file from the internet, but I have no idea how to find if I am at the limit (optional: or find the length of the sequence from the database). I was wondering if anyone has done this already, or can help me do this. I will be away next week for thanksgiving and I can't respond right away, so thanks in advance for any help anyone can offer. I do have perl, but am not proficient in it if that is better than a batch file. Last fiddled with by Greebley on 2012-11-16 at 18:57 |
![]() |
![]() |
![]() |
#2 |
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3×29×83 Posts |
![]()
I have no idea how to do batch files, and not much better an idea how to do bash scripting (Linux equiv) either. If you have Python, I could whip up whatever you need, if nothing else occurs to you. (LaurV might be able to help with the batch scripting, or perhaps even kladner from "up north".)
For my dinky script that runs aliquot sequences, I pass the "original length" as some of the info so that it doesn't overdo the submit. Code:
#! /usr/bin/python3 import os, sys R = False list = """198786 723 221130 682 229560 612 259716 991 263952 573 275880 811 280686 998 281460 828 297000 766 299184 799 306000 838 307746 918 310100 848 316350 971""" if len(sys.argv) > 1 and sys.argv[1] == '-R': R = True first = list.split()[0] for seq, ind in [line.split() for line in list.splitlines()]: if not (R and seq == first): os.system('wget --cache=off "http://factordb.com/elf.php?seq={}&type=1" -O {}.elf'.format(seq, seq)) os.system('taskset fe nice -n 19 ~/yafu/ali/aliqueit -y {} -d 120'.format(seq)) os.system('~/yafu/ali/aliqueit -s {} {}'.format(ind, seq)) |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scripting startup on multiple systems | stebbo | Software | 5 | 2016-09-17 08:45 |
Is it worth the trouble to "upgrade" Windows 8 to Windows 7? | ixfd64 | Lounge | 23 | 2013-04-13 11:12 |
Windows 7 Windows Update & Prime95 issue!!! | Unregistered | Information & Answers | 14 | 2010-04-10 21:47 |
GMP-ECM for Windows x64 | frmky | GMP-ECM | 4 | 2005-09-30 18:42 |
ECM 5.0.3 for windows | antiroach | Factoring | 12 | 2004-04-26 19:17 |