Mercurial > repos > davidvanzessen > imgt_loader_igg
comparison imgtconvert.py @ 3:191d0df65d28 draft
Uploaded
author | davidvanzessen |
---|---|
date | Tue, 11 Mar 2014 09:24:29 -0400 |
parents | 477cab9c32d1 |
children | 021d39f6bb0e |
comparison
equal
deleted
inserted
replaced
2:477cab9c32d1 | 3:191d0df65d28 |
---|---|
1 import pandas as pd | 1 import pandas as pd |
2 #pd.options.mode.chained_assignment = None # default='warn' | 2 try: |
3 pd.options.mode.chained_assignment = None # default='warn' | |
4 except: | |
5 pass | |
3 import re | 6 import re |
4 import argparse | 7 import argparse |
5 import os | 8 import os |
6 | 9 |
7 def stop_err( msg, ret=1 ): | 10 def stop_err( msg, ret=1 ): |
120 | 123 |
121 #jPattern = re.compile(r"TRBJ[12]-[1-7]") #mouse | 124 #jPattern = re.compile(r"TRBJ[12]-[1-7]") #mouse |
122 #jPattern = re.compile(r"IGHJ[1-6]") #human | 125 #jPattern = re.compile(r"IGHJ[1-6]") #human |
123 jPattern = re.compile(r"IGHJ[1-6]|TRBJ[12]-[1-7]") #mouse and human | 126 jPattern = re.compile(r"IGHJ[1-6]|TRBJ[12]-[1-7]") #mouse and human |
124 | 127 |
128 | |
125 def filterGenes(s, pattern): | 129 def filterGenes(s, pattern): |
126 if type(s) is not str: | 130 if type(s) is not str: |
127 return "NA" | 131 return "NA" |
128 res = pattern.search(s) | 132 res = pattern.search(s) |
129 if res: | 133 if res: |