Mercurial > repos > jjohnson > ensembl_variant_report
comparison ensembl_variant_report.py @ 6:d9fad18ffdb1 draft
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/ensembl_variant_report commit e6aa05bbbee3cc7d98f16354fc41c674f439ff1b-dirty
author | jjohnson |
---|---|
date | Thu, 14 Jun 2018 17:50:33 -0400 |
parents | 9e83cc05d384 |
children | d5cb252c68da |
comparison
equal
deleted
inserted
replaced
5:9e83cc05d384 | 6:d9fad18ffdb1 |
---|---|
111 if options.debug: print >> sys.stderr, "\n%s" % (fields) | 111 if options.debug: print >> sys.stderr, "\n%s" % (fields) |
112 (chrom, pos, id, ref, alts, qual, filter, info) = fields[0:8] | 112 (chrom, pos, id, ref, alts, qual, filter, info) = fields[0:8] |
113 alt_list = alts.split(',') | 113 alt_list = alts.split(',') |
114 pos = int(pos) | 114 pos = int(pos) |
115 qual = float(qual) | 115 qual = float(qual) |
116 dp = None | |
117 dpr = None | |
116 for info_item in info.split(';'): | 118 for info_item in info.split(';'): |
117 if info_item.find('=') < 0: continue | 119 if info_item.find('=') < 0: continue |
118 (key, val) = info_item.split('=', 1) | 120 (key, val) = info_item.split('=', 1) |
119 if key == 'DP': | 121 if key == 'DP': |
120 dp = int(val) | 122 dp = int(val) |
121 if key == 'DPR': | 123 if key == 'DPR': |
122 dpr = dpr = [int(x) for x in val.split(',')] | 124 dpr = [int(x) for x in val.split(',')] |
123 if key in ['EFF','ANN']: | 125 if key in ['EFF','ANN']: |
124 for effect in val.split(','): | 126 for effect in val.split(','): |
125 if options.debug: print >> sys.stderr, "\n%s" % (effect.split('|')) | 127 if options.debug: print >> sys.stderr, "\n%s" % (effect.split('|')) |
126 if key == 'ANN': | 128 if key == 'ANN': |
127 (alt,eff,impact,gene_name,gene_id,feature_type,transcript,biotype,exon,c_hgvs,p_hgvs,cdna,cds,aa,distance,info) = effect.split('|') | 129 (alt,eff,impact,gene_name,gene_id,feature_type,transcript,biotype,exon,c_hgvs,p_hgvs,cdna,cds,aa,distance,info) = effect.split('|') |