Skip to content

Commit

Permalink
Perform referenceless contig stitching in sample.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Jan 2, 2025
1 parent 9ec9792 commit 6ae894c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion micall/drivers/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from micall.utils.driver_utils import makedirs
from micall.utils.fasta_to_csv import fasta_to_csv
from micall.utils.referencefull_contig_stitcher import referencefull_contig_stitcher
from micall.utils.referenceless_contig_stitcher import referenceless_contig_stitcher
from contextlib import contextmanager

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -426,10 +427,14 @@ def run_denovo(self, excluded_seeds):
merged_contigs_csv,
)

with open(self.unstitched_contigs_fasta, 'r') as unstitched_contigs_fasta, \
open(self.stitched_contigs_fasta, 'w') as stitched_contigs_fasta:
referenceless_contig_stitcher(unstitched_contigs_fasta, stitched_contigs_fasta)

with open(self.unstitched_contigs_csv, 'w') as unstitched_contigs_csv, \
open(self.merged_contigs_csv, 'r') as merged_contigs_csv, \
open(self.blast_csv, 'w') as blast_csv:
fasta_to_csv(Path(self.unstitched_contigs_fasta),
fasta_to_csv(Path(self.stitched_contigs_fasta),
unstitched_contigs_csv,
merged_contigs_csv,
blast_csv=blast_csv,
Expand Down

0 comments on commit 6ae894c

Please sign in to comment.