widdowquinn / find_differential_primers

Code for design of diagnostic PCR primers, and metabarcoding markers.
https://widdowquinn.github.io/find_differential_primers/
MIT License
59 stars 25 forks source link

Add debugging code explanantion #4

Closed wjidea closed 8 years ago

wjidea commented 11 years ago

Hi,

I really like your code to find primers from the sequenced bacterial genomes. I am trying to debug the input file, dependencies, and command lines. Recently, I went to the eprimer3 step, I had the error code "problem with multiprocessing run (status: 2)" and "problem with multiprocessing run (status: 1)" . I don't know how to deal with these error codes. could you help me with that?

Thanks,

Jie

widdowquinn commented 11 years ago

Hi Jin,

Firstly, thanks for your interest in the find_differential_primers script. Unfortunately, I'm at the airport at the moment, so it will take me a day or so to get back to you properly. However, I can tell you the following now:

The error codes associated with the multiprocessing run come from the program that the Python script calls, so you need to look at the appropriate documentation for those packages to see what they mean. The relevant script code is:

Add a multiprocessing callback function here

def multiprocessing_callback(val): """ A verbose callback function for multiprocessing runs. It uses the return value to indicate run completion or failure. Failure is indicated by a nonzero return from the multiprocessing call. """ if 0 == val: print >> sys.stderr, \ "... multiprocessing run completed (status: %s) ..." % val else: print >> sys.stderr, \ "... problem with multiprocessing run (status: %s) ..." % val

so you should see that it's a straightforward callback function for whatever the script calls.

Now, it may be that some input/output is not correctly formatted for one or other package that the script calls. To be able to determine this, I need a minimal amount of input (input data and configuration files, plus the command-line you're using) that replicates your error, so I can have a look at debugging it. If you send me that now, I should be able to take a look at your problem when I get back to the UK.

Best wishes,

L.

Leighton Pritchard leightonpritchard@mac.com gpg/pgp:0xDECACFFC

On 3 Sep 2013, at 17:27, Jie Wang notifications@github.com wrote:

Hi,

I really like your code to find primers from the sequenced bacterial genomes. I am trying to debug the input file, dependencies, and command lines. Recently, I went to the eprimer3 step, I had the error code "problem with multiprocessing run (status: 2)" and "problem with multiprocessing run (status: 1)" . I don't know how to deal with these error codes. could you help me with that?

Thanks,

Jie

— Reply to this email directly or view it on GitHub.

wjidea commented 11 years ago

Thank you very much for your timely reply, Dr. Pritchard.

The cmd line input I had was:* *./find_differential_primers.py -i turf_ori.conf --hybridprobe --filtergc3prime --prodigal ~/bin/prodigal --eprimer3 ~/bin/primer3_core --cpus 3 --blastdb ./BLAST_db/non-target --blast_exe /usr/bin/blastn -v --debug -o ~/Documents/output/

My configure and log files were attached in this email. My working OS is Ubuntu 12.04 LTS based on 64bit Intel PC.

Beside this question, I still have a few other things that I wasn't sure. 1) genome with multiple plasmids: In some of my bacterial genomes, I had more than one .ffn and .gbk files. What I did was to cat *.ffn > combile.fas. I am not sure it is correct or not, and the problem come with it was the gbk feature cannot be loaded into the those files. So I decided to use prodigal to predict genes from the stitched fasta file. 2) Another problem I had was to prepare the BLAST database. Based on my understanding of the paper, I merged all of the non-target un-stitched genome sequences together, using makeblastdb to create a non-target database for the BLASTn step.

I really appreciate your help.

Best regards,

Jie

On Tue, Sep 3, 2013 at 12:55 PM, Leighton Pritchard < notifications@github.com> wrote:

Hi Jin,

Firstly, thanks for your interest in the find_differential_primers script. Unfortunately, I'm at the airport at the moment, so it will take me a day or so to get back to you properly. However, I can tell you the following now:

The error codes associated with the multiprocessing run come from the program that the Python script calls, so you need to look at the appropriate documentation for those packages to see what they mean. The relevant script code is:

Add a multiprocessing callback function here

def multiprocessing_callback(val): """ A verbose callback function for multiprocessing runs. It uses the return value to indicate run completion or failure. Failure is indicated by a nonzero return from the multiprocessing call. """ if 0 == val: print >> sys.stderr, \ "... multiprocessing run completed (status: %s) ..." % val else: print >> sys.stderr, \ "... problem with multiprocessing run (status: %s) ..." % val

so you should see that it's a straightforward callback function for whatever the script calls.

Now, it may be that some input/output is not correctly formatted for one or other package that the script calls. To be able to determine this, I need a minimal amount of input (input data and configuration files, plus the command-line you're using) that replicates your error, so I can have a look at debugging it. If you send me that now, I should be able to take a look at your problem when I get back to the UK.

Best wishes,

L.

Leighton Pritchard leightonpritchard@mac.com gpg/pgp:0xDECACFFC

On 3 Sep 2013, at 17:27, Jie Wang notifications@github.com wrote:

Hi,

I really like your code to find primers from the sequenced bacterial genomes. I am trying to debug the input file, dependencies, and command lines. Recently, I went to the eprimer3 step, I had the error code "problem with multiprocessing run (status: 2)" and "problem with multiprocessing run (status: 1)" . I don't know how to deal with these error codes. could you help me with that?

Thanks,

Jie

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/widdowquinn/find_differential_primers/issues/4#issuecomment-23728238 .

widdowquinn commented 11 years ago

Just noticed that the discussion was hanging here - I replied off-list:

""" Hi Jie,

I think I might have found (one of?) the problem(s). The script wasn't respecting command-line options for the ePrimer3 binary location, which may have been a problem if it wasn't in your $PATH. I saw that you provided an absolute location (though a common one that should be in the $PATH) when you called the script.

The modified script is on GitHub, now: https://github.com/widdowquinn/find_differential_primers/commit/92f55f4ac34deb3c459a126a0de0112e8fdaf95a

I couldn't test directly on your data, I'm afraid, but if you give the script another go now, we might find whether it gets past the multiprocessing error.

Cheers,

L.

On 12 Sep 2013, at Thursday, September 12, 04:38, Jie Wang wangjie6@msu.edu wrote:

Thank you Dr. Pritchard for your timely reply. I am really sorry for interrupting you and causing any inconveniences.

No worries - many apologies for being so slow with this - I've been away a lot, recently. Since you've managed to get the data you need, I hope this hasn't caused problems for you.

Cheers,

L. """