comparison scripts/hyphy_summary.py @ 2:d7c01f81739b draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hyphy/ commit 9fa2234b56facaf70fce12e5c60638d801997594"
author iuc
date Fri, 18 Jun 2021 15:37:03 +0000
parents f304c108aa1f
children bd90215b7d15
comparison
equal deleted inserted replaced
1:37887c2733a3 2:d7c01f81739b
334 if len(self.include_in_annotation): 334 if len(self.include_in_annotation):
335 for i in self.include_in_annotation: 335 for i in self.include_in_annotation:
336 report = self.annotation_json[self.include_in_annotation[i]] 336 report = self.annotation_json[self.include_in_annotation[i]]
337 report['fade'] = {} 337 report['fade'] = {}
338 for residue, info in self.fade['MLE']['content'].items(): 338 for residue, info in self.fade['MLE']['content'].items():
339 # Skip anything past the end of this section.
340 if i >= len(info['0']):
341 continue
339 if len(residue) == 1: 342 if len(residue) == 1:
340 report['fade'][residue] = {'rate': info['0'][i][1], 'BF': info['0'][i][-1]} 343 report['fade'][residue] = {'rate': info['0'][i][1], 'BF': info['0'][i][-1]}
341 344
342 def bgm_summary(self): 345 def bgm_summary(self):
343 self.bgm = self._load_json(self.arguments.bgm) 346 self.bgm = self._load_json(self.arguments.bgm)
371 if len(listified_input) == 1: 374 if len(listified_input) == 1:
372 self.aligned_str = listified_input[0] 375 self.aligned_str = listified_input[0]
373 376
374 def ignore_record(x): 377 def ignore_record(x):
375 pass 378 pass
379
376 for s in self.ref_genes: 380 for s in self.ref_genes:
377 _align_par(SeqRecord(Seq(s[1]), id=s[0]), [SeqRecord(Seq(ref_seq), id='ref')], 381 _align_par(SeqRecord(Seq(s[1]), id=s[0]), [SeqRecord(Seq(ref_seq), id='ref')],
378 self.score_matrix_, False, False, 0.8, ignore_record, output_record) 382 self.score_matrix_, False, False, 0.8, ignore_record, output_record)
379 if (self.aligned_str is not None): 383 if (self.aligned_str is not None):
380 break 384 break
385
381 self.ref_map = self.aligned_str.seq.strip('-') 386 self.ref_map = self.aligned_str.seq.strip('-')
382 c = 0 387 c = 0
383 i = 0 388 i = 0
384 map_to_genome = [] 389 map_to_genome = []
385 while i < len(self.ref_map): 390 while i < len(self.ref_map):