comparison SalmID.py @ 40:f918518b7d7b

Uploaded
author estrain
date Sat, 07 Sep 2019 19:47:33 -0400
parents 9438261e43e0
children
comparison
equal deleted inserted replaced
39:3eaa774bc1ee 40:f918518b7d7b
6 import pickle 6 import pickle
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from argparse import ArgumentParser 10 from argparse import ArgumentParser
11 #try: 11 try:
12 # from .version import SalmID_version 12 from .version import SalmID_version
13 #except ImportError: 13 except ImportError:
14 # SalmID_version = "version unknown" 14 SalmID_version = "version unknown"
15 SalmID_version = '0.1.23' 15
16 16
17 def reverse_complement(sequence): 17 def reverse_complement(sequence):
18 """return the reverse complement of a nucleotide (including IUPAC ambiguous nuceotide codes)""" 18 """return the reverse complement of a nucleotide (including IUPAC ambiguous nuceotide codes)"""
19 complement = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A', 'N': 'N', 'M': 'K', 'R': 'Y', 'W': 'W', 19 complement = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A', 'N': 'N', 'M': 'K', 'R': 'Y', 'W': 'W',
20 'S': 'S', 'Y': 'R', 'K': 'M', 'V': 'B', 'H': 'D', 'D': 'H', 'B': 'V'} 20 'S': 'S', 'Y': 'R', 'K': 'M', 'V': 'B', 'H': 'D', 'D': 'H', 'B': 'V'}
264 else: 264 else:
265 return rpoB, invA, (average_read_length * number_of_reads) / 5000000 265 return rpoB, invA, (average_read_length * number_of_reads) / 5000000
266 266
267 267
268 def main(): 268 def main():
269 #ex_dir = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
270 ex_dir = os.path.dirname(os.path.realpath(__file__)) 269 ex_dir = os.path.dirname(os.path.realpath(__file__))
271 args = parse_args() 270 args = parse_args()
272 input_file = args.input_file 271 input_file = args.input_file
273 if input_file != 'None': 272 if input_file != 'None':
274 files = [input_file] 273 files = [input_file]