Skip to content

Commit

Permalink
Merge pull request #10 from jvhagey/main
Browse files Browse the repository at this point in the history
Encoding Fix
  • Loading branch information
rastanton authored Aug 25, 2022
2 parents 1507a08 + bb3454b commit 4b90f7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion GAMMA-S.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
getcontext().prec = 4
import math
import argparse
from unidecode import unidecode

##Written by Richard Stanton ([email protected])
##Requires Python/3+ and blat
Expand Down Expand Up @@ -581,7 +582,9 @@ def Best_List(input_contig_list, length_minimum):
if Add == 1 and Star == 0 and float(List1[14]) > (length_minimum / 100):
Output_List.append(items)
elif Add == 1 and Star == 1 and float(List1[14]) > (length_minimum / 100):
List1[0] = List1[0] + '‡'
#endcoding '‡'
double_cross = '‡'
List1[0] = List1[0] + double_cross.encode('ascii', 'ignore').decode('utf-8')
Out = '\t'.join(List1)
Output_List.append(Out)
return(Output_List)
Expand Down
5 changes: 4 additions & 1 deletion GAMMA.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
getcontext().prec = 4
import math
import argparse
from unidecode import unidecode

##Written by Richard Stanton ([email protected])
##Requires Python/3+ and blat
Expand Down Expand Up @@ -910,7 +911,9 @@ def Best_List(input_contig_list):
Out = '\t'.join(List1[0:8]) + '\t' + List1[13] + '\t' + '\t'.join(List1[8:13]) + '\t' + List1[-1]
Output_List.append(Out)
elif Add == 1 and float(List1[10]) > 0.5 and Star == 1:
List1[0] = List1[0] + '‡'
#encoding '‡'
double_cross = '‡'
List1[0] = List1[0] + double_cross.encode('ascii', 'ignore').decode('utf-8')
Out = '\t'.join(List1[0:8]) + '\t' + List1[13] + '\t' + '\t'.join(List1[8:13]) + '\t' + List1[-1]
Output_List.append(Out)
return(Output_List)
Expand Down

0 comments on commit 4b90f7f

Please sign in to comment.