Skip to content

Commit

Permalink
1.7.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinggerm committed Feb 3, 2021
1 parent 107a8f1 commit d43673f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
22 changes: 17 additions & 5 deletions GetOrganelleLib/assembly_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand Down
7 changes: 7 additions & 0 deletions GetOrganelleLib/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit d43673f

Please sign in to comment.