DBSCAN-SWA
DBSCAN-SWA copied to clipboard
IndentationError: unindent does not match any outer indentation level
Hi, when I run this command 'python DBSCAN-SWA-master/bin/dbscan-swa.py --h' and then: File "/home/lfb/Public/Lfb/pha/DBSCAN-SWA-master/bin/dbscan-swa.py", line 2761 global diamond_thread_num ^ IndentationError: unindent does not match any outer indentation level How do I solve this problem? Thanks
I'm no python expert but looks like there's an error in the file dbscan-swa.py Got to line 2761 in dbscan-swa.py with the text "global diamond_thread_num" and replace the spaces at the front of the line with a single tab.
Indentations in python need to be consistent, using spaces or tabs but not both.
It hits upon the classic spaces vs. tabs issue: https://thenewstack.io/spaces-vs-tabs-a-20-year-debate-and-now-this-what-the-hell-is-wrong-with-go/ which has a great reference to the debate in the series Silicon Valley.
nahlgren's recommendation worked
Indeed, there is a small inaccuracy in the dbscan-swa.py script. The correction proposed by nahlgren worked great!
Hi i did try but it didn't work
python dbscan-swa.py File "/home/bvsbic/neelam/DBSCAN-SWA/bin/DBSCAN-SWA/bin/dbscan-swa.py", line 2761 global diamond_thread_num ^ IndentationError: unindent does not match any outer indentation level
**- if not os.path.exists(outdir):
-
mkdir(outdir)
-
global prefix
-
if args.prefix:
-
prefix = args.prefix
-
else:
-
prefix = 'bac'
-
print('Warning:The program will specify the prefix of the ouput files bac!If you want to use another prefix,please use the parameter:--prefix <prefix>!')
-
if args.add_annotation:
-
add_annotation = args.add_annotation
-
else:
-
print('Warning:The parameter add_annotation default:PGPD,If you want to run fast, please set add_annotation to none')
-
add_annotation = 'PGPD'
-
global blastp_evalue
-
if args.evalue:
-
blastp_evalue = args.evalue
-
if float(blastp_evalue)>1e-7:
-
print('Warning:The evalue %s can not be larger than 1e-4!'%blastp_evalue)
-
blastp_evalue = 1e-7
-
print('The evalue of homology search for virus uniprot database has been set to 1e-4')
-
else:
-
blastp_evalue = 1e-7
-
global per,idn,cov
-
if args.per:
-
per = args.per
-
else:
-
per = 30
-
if args.idn:
-
idn = args.idn
-
else:
-
idn = 70
-
if args.cov:
-
cov = args.cov
-
else:
-
cov = 30
-
thread_num = 10
-
if args.thread_num:
-
thread_num = args.thread_num
-
else:
-
thread_num = 10
-
**_global diamond_thread_num_**
-
if args.diamond_thread_num:
-
diamond_thread_num = args.diamond_thread_num
-
else:
-
diamond_thread_num = 20
-
global att_pro_num
-
if args.protein_number:
-
att_pro_num = args.protein_number
-
if int(att_pro_num)<1:
-**