comparison tools/seq_filter_by_id/seq_filter_by_id.py @ 8:2d4537dbf0bc draft

v0.2.6 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
author peterjc
date Wed, 10 May 2017 13:18:01 -0400
parents fb1313d79396
children 141612f8c3e3
comparison
equal deleted inserted replaced
7:fb1313d79396 8:2d4537dbf0bc
25 (formerly the Scottish Crop Research Institute, SCRI), UK. All rights reserved. 25 (formerly the Scottish Crop Research Institute, SCRI), UK. All rights reserved.
26 See accompanying text file for licence details (MIT license). 26 See accompanying text file for licence details (MIT license).
27 27
28 Use -v or --version to get the version, -h or --help for help. 28 Use -v or --version to get the version, -h or --help for help.
29 """ 29 """
30
30 import os 31 import os
32 import re
31 import sys 33 import sys
32 import re 34
33 from optparse import OptionParser 35 from optparse import OptionParser
34 36
35 # Parse Command Line 37 # Parse Command Line
36 usage = """Use as follows: 38 usage = """Use as follows:
37 39
141 global name_warn 143 global name_warn
142 if not name_warn and len(parts) > 1: 144 if not name_warn and len(parts) > 1:
143 name_warn = "WARNING: Some of your identifiers had white space in them, " + \ 145 name_warn = "WARNING: Some of your identifiers had white space in them, " + \
144 "using first word only. e.g.:\n%s\n" % name 146 "using first word only. e.g.:\n%s\n" % name
145 return parts[0] 147 return parts[0]
148
146 149
147 if drop_suffices: 150 if drop_suffices:
148 def clean_name(name): 151 def clean_name(name):
149 """Remove suffix.""" 152 """Remove suffix."""
150 name = check_white_space(name) 153 name = check_white_space(name)