Skip to content

Commit

Permalink
Check that AGFusion .exons.txt file exists, otherwise use .exons.csv …
Browse files Browse the repository at this point in the history
…file

The exons file ending was updated to .csv in version 1.251 (commit
murphycj/AGFusion@9afac87).
This change allows for compatibility with all current AGFusion versions.
  • Loading branch information
susannasiebert committed Apr 28, 2020
1 parent 660097f commit 12db5ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/input_file_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ def determine_fusion_sequence(self, full_sequence, variant_type):

def parse_exon_file(self, input_file):
exon_file = input_file.replace('_protein.fa', '.exons.txt')
if not os.path.exists(exon_file):
exon_file = exon_file.replace('.txt', '.csv')
five_prime_positions, three_prime_positions = [], []
with open(exon_file, 'r') as fh:
dialect = csv.Sniffer().sniff(fh.read())
Expand Down

0 comments on commit 12db5ff

Please sign in to comment.