diff --git a/GetOrganelleLib/assembly_parser.py b/GetOrganelleLib/assembly_parser.py index f987be1..22f817d 100755 --- a/GetOrganelleLib/assembly_parser.py +++ b/GetOrganelleLib/assembly_parser.py @@ -289,7 +289,7 @@ def parse_gfa(self, gfa_file, default_cov=1., min_cov=0., max_cov=inf): for line in gfa_open: if line.startswith("S\t"): elements = line.strip().split("\t") - record_type = elements.pop(0) # not used + elements.pop(0) # record_type vertex_name = elements.pop(0) # segment name sequence = elements.pop(0) seq_len_tag = None @@ -341,7 +341,13 @@ def parse_gfa(self, gfa_file, default_cov=1., min_cov=0., max_cov=inf): gfa_open.seek(0) for line in gfa_open: if line.startswith("L\t"): - flag, vertex_1, end_1, vertex_2, end_2, alignment_cigar = line.strip().split("\t") + elements = line.strip().split("\t") + elements.pop(0) # flag + vertex_1 = elements.pop(0) + end_1 = elements.pop(0) + vertex_2 = elements.pop(0) + end_2 = elements.pop(0) + alignment_cigar = elements.pop(0) # "head"~False, "tail"~True if vertex_1 in self.vertex_info and vertex_2 in self.vertex_info: # different notation as to our Assembly system @@ -354,9 +360,9 @@ def parse_gfa(self, gfa_file, default_cov=1., min_cov=0., max_cov=inf): for line in gfa_open: if line.startswith("S\t"): elements = line.strip().split("\t") - record_type = elements.pop(0) # not used + elements.pop(0) # record_type vertex_name = elements.pop(0) # segment name - seq_len_tag = int(elements.pop(0)) + int(elements.pop(0)) # seq_len_tag sequence = elements.pop(0) seq_len_tag = None kmer_count = None @@ -405,7 +411,13 @@ def parse_gfa(self, gfa_file, default_cov=1., min_cov=0., max_cov=inf): gfa_open.seek(0) for line in gfa_open: if line.startswith("E\t"): # gfa2 uses E - flag, vertex_1, end_1, vertex_2, end_2, alignment_cigar = line.strip().split("\t") + elements = line.strip().split("\t") + elements.pop(0) # flag + vertex_1 = elements.pop(0) + end_1 = elements.pop(0) + vertex_2 = elements.pop(0) + end_2 = elements.pop(0) + alignment_cigar = elements.pop(0) # "head"~False, "tail"~True if vertex_1 in self.vertex_info and vertex_2 in self.vertex_info: end_1 = {"+": True, "-": False}[end_1] diff --git a/GetOrganelleLib/versions.py b/GetOrganelleLib/versions.py index 5f4408f..4d9ac07 100644 --- a/GetOrganelleLib/versions.py +++ b/GetOrganelleLib/versions.py @@ -5,6 +5,13 @@ def get_versions(): versions = [ + { + "number": "1.7.3.2", + "features": [ + "1. improve support for standard gfa format: E/L with optional fields", + ], + "time": "2021-02-03 13:30 UTC+8" + }, { "number": "1.7.3.1", "features": [