Skip to content

Commit

Permalink
exclude files with ~
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Treangen authored and Todd Treangen committed Feb 5, 2015
1 parent da7b194 commit 4d11013
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Parsnp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import inspect
from multiprocessing import *

reroot_tree = False #use --midpoint-reroot
reroot_tree = True #use --midpoint-reroot
try:
import dendropy
except ImportError:
Expand Down Expand Up @@ -653,7 +653,7 @@ def usage():
for file in files:

#any file in genome dir will be added..
if file[0] != "." and file[-1] != "~":#file[-3:] == ".fa" or file[-4:] == ".fna" or file[-6:] == ".fasta" or file[-4:] == ".fas" or file[-6:] == ".scafs" or file[-5:] == ".scfs" or file[-8:] == ".contigs" or file[-4:] == ".scf" or file[-4:] == ".ctg" or file[-5:] == ".ctgs":
if file[0] != "." and file[-1] != "~":

ff = open(seqdir+os.sep+file,'r')
hdr = ff.readline()
Expand All @@ -678,9 +678,7 @@ def usage():
reflen = len(data)
ff.close()
for file in files:

if 1:#file[-3:] == ".fa" or file[-4:] == ".fna" or file[-6:] == ".fasta" or file[-4:] == ".fas" or file[-6:] == ".scafs" or file[-5:] == ".scfs" or file[-8:] == ".contigs" or file[-4:] == ".scf" or file[-4:] == ".ctg" or file[-5:] == ".ctgs":

if file[0] != "." and file[-1] != "~":
ff = open(seqdir+os.sep+file,'r')
hdr = ff.readline()
if hdr[0] == ">":
Expand Down

0 comments on commit 4d11013

Please sign in to comment.