Skip to content

Commit

Permalink
Do not translate HIVIntact errors to HIVSeqinR ones
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Sep 19, 2023
1 parent 56d06d9 commit eae7b0f
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions gene_splicer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,19 +391,6 @@ def align(target_seq,
else:
return alignment_path


HIVINTACT_TRANSLATION_TABLE = {
'APOBECHypermutationDetected': 'Hypermut',
'LongDeletion': 'LargeDeletion',
'PackagingSignalDeletion': '5DEFECT',
'PackagingSignalNotComplete': '5DEFECT',
'MajorSpliceDonorSiteMutated': '5DEFECT',
'WrongORFNumber': 'PrematureStop_OR_AAtooLong_OR_AAtooShort',
}

def translate_hivintact_error(error):
return HIVINTACT_TRANSLATION_TABLE.get(error, error)

HIVINTACT_ERRORS_TABLE = [
'NonHIV',
'LongDeletion',
Expand All @@ -427,7 +414,7 @@ def iterate_hivintact_data(name, outpath):

def get_verdict(SEQID, all_errors):
ordered = sorted(all_errors, key=HIVINTACT_ERRORS_TABLE.index)
verdict = translate_hivintact_error(ordered[0])
verdict = ordered[0]
return [SEQID, verdict]

for d in glob.glob(str(outpath / 'hivintact*')):
Expand Down

0 comments on commit eae7b0f

Please sign in to comment.