DBSCAN-SWA icon indicating copy to clipboard operation
DBSCAN-SWA copied to clipboard

Error code on successful finish

Open beardymcjohnface opened this issue 3 years ago • 6 comments

The program throws an exit code 1 instead of 0 when it fails to find any prophage regions.

beardymcjohnface avatar Dec 09 '21 05:12 beardymcjohnface

I am sorry for this problem. Could you please give some details about the errors when running you data? or you could attach the input sequence file ?

gancao avatar Dec 10 '21 03:12 gancao

I think I misread the error message. It looked like it was finishing normally but there was an error message for line 2731 thread_num not defined. It wasn't happening for all of the genomes I was testing. I had changed all of the num_threads = 20 to num_threads = 1 as I wanted to benchmark with one thread; I don't know if that's related to the issue.

I managed a workaround by hard-coding thread_num of 1 like so: line 2731: if (len(threading.enumerate()) <= int(1)):

beardymcjohnface avatar Dec 14 '21 03:12 beardymcjohnface

I am sorry for this error. But I think this error shouldn’t occur. In addition, I think you should use the latest dbscan-swa.py and you’d better to not change the thread_num =1 I attached this script file in the following.

| | 甘草 | | @.*** | 签名由网易邮箱大师定制

On 12/14/2021 @.***> wrote:

I think I misread the error message. It looked like it was finishing normally but there was an error message for line 2731 thread_num not defined. It wasn't happening for all of the genomes I was testing. I had changed all of the num_threads = 20 to num_threads = 1 as I wanted to benchmark with one thread; I don't know if that's related to the issue.

I managed a workaround by hard-coding thread_num of 1 like so: line 2731: if (len(threading.enumerate()) <= int(1)):

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

gancao avatar Dec 14 '21 03:12 gancao

I have corrected the possibly related code on https://github.com/gancao/DBSCAN-SWA-1

| | 甘草 | | @.*** | 签名由网易邮箱大师定制

On 12/14/2021 @.***> wrote: I am sorry for this error. But I think this error shouldn’t occur. In addition, I think you should use the latest dbscan-swa.py and you’d better to not change the thread_num =1 I attached this script file in the following.

| | 甘草 | | @.*** | 签名由网易邮箱大师定制

On 12/14/2021 @.***> wrote:

I think I misread the error message. It looked like it was finishing normally but there was an error message for line 2731 thread_num not defined. It wasn't happening for all of the genomes I was testing. I had changed all of the num_threads = 20 to num_threads = 1 as I wanted to benchmark with one thread; I don't know if that's related to the issue.

I managed a workaround by hard-coding thread_num of 1 like so: line 2731: if (len(threading.enumerate()) <= int(1)):

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

gancao avatar Dec 14 '21 03:12 gancao

Thanks, I'll try this fork. Should this fork be used in the future or will the HIT-ImmunologyLab repo be updated?

So I finished rerunning my tests and only one genome is now throwing the error. I think it is related to lines 1378-1380:

	if len(contents)==1:
		print('0 prophage region was detected in the query bacterial genome!')
		sys.exit(1)

I've attached the log file for this run below. As far as I can tell it ran error-free, found no prophages and terminated with error code 1. In this instance I think it the program should generate an empty output file and end with an exit code 0.

dbscan.log

beardymcjohnface avatar Dec 14 '21 04:12 beardymcjohnface

I will take your advice. If no prophage is detected, the program will create an empty output file

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2021年12月14日 12:03 | | 收件人 | @.> | | 抄送至 | @.@.> | | 主题 | Re: [HIT-ImmunologyLab/DBSCAN-SWA] Error code on successful finish (Issue #6) |

Thanks, I'll try this fork. Should this fork be used in the future or will the HIT-ImmunologyLab repo be updated?

So I finished rerunning my tests and only one genome is now throwing the error. I think it is related to lines 1378-1380:

iflen(contents)==1: print('0 prophage region was detected in the query bacterial genome!') sys.exit(1)

I've attached the log file for this run below. As far as I can tell it ran error-free, found no prophages and terminated with error code 1. In this instance I think it the program should generate an empty output file and end with an exit code 0.

dbscan.log

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

gancao avatar Dec 14 '21 15:12 gancao