Hi,
During the process of reading MAF files, it seems that the default encoding used is utf-8 in my laptop, which leads to a failure in reading the file. The following modification is needed to use latin-1 encoding for reading. Hopefully, this will be helpful for others encountering this issue!
diff --git a/AnnotatorCore.py b/AnnotatorCore.py
index a448a7d..6e34f82 100644
--- a/AnnotatorCore.py
+++ b/AnnotatorCore.py
@@ -506,7 +506,7 @@
def processalterationevents(eventfile, outfile, previousoutfile, defaultCancerTy
if os.path.isfile(previousoutfile):
cacheannotated(previousoutfile, defaultCancerType, cancerTypeMap)
outf = open(outfile, 'w+', 1000)
- with open(eventfile, DEFAULT_READ_FILE_MODE) as infile:
+ with open(eventfile, DEFAULT_READ_FILE_MODE, encoding='latin-1') as infile:
reader = csv.reader(infile, delimiter='\t')
headers = readheaders(reader)
Hi, During the process of reading MAF files, it seems that the default encoding used is utf-8 in my laptop, which leads to a failure in reading the file. The following modification is needed to use latin-1 encoding for reading. Hopefully, this will be helpful for others encountering this issue!