Skip to content

Commit

Permalink
Perform the new stitching in the denovo pipeline
Browse files Browse the repository at this point in the history
One thing to make sure is that we are passing `str` instead of
`Bio.Seq` to the stitcher.
  • Loading branch information
Donaim committed Nov 17, 2023
1 parent 7ab3666 commit db03b42
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions micall/core/denovo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from Bio.SeqRecord import SeqRecord

from micall.core.project_config import ProjectConfig
from micall.core.contig_stitcher import GenotypedContig
from micall.core.contig_stitcher import GenotypedContig, stitch_consensus

IVA = "iva"
DEFAULT_DATABASE = os.path.join(os.path.dirname(__file__),
Expand Down Expand Up @@ -49,9 +49,9 @@ def read_assembled_contigs(group_refs, genotypes, contigs_fasta_path: str) -> ty
ref_seq = None

yield GenotypedContig(name=record.name,
seq=seq,
seq=str(seq),
ref_name=ref_name,
ref_seq=ref_seq,
ref_seq=str(ref_seq),
match_fraction=match_fraction)


Expand Down Expand Up @@ -84,6 +84,7 @@ def write_contig_refs(contigs_fasta_path,
group_refs=group_refs)

contigs = list(read_assembled_contigs(group_refs, genotypes, contigs_fasta_path))
contigs = list(stitch_consensus(contigs))

for contig in contigs:
writer.writerow(dict(ref=contig.ref_name,
Expand Down

0 comments on commit db03b42

Please sign in to comment.