Skip to content

Commit

Permalink
Move denovo.py to core folder - part of #442.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkirkby committed Oct 12, 2018
1 parent 5fde2cd commit e05ab10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions micall/utils/denovo.py → micall/core/denovo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def geno(f, contigs):
print("unknown,{}".format(record.seq), file=contigs)
rec += 1

def main(fq1, fq2, contigs):
def denovo(fq1, fq2, contigs):
prefix = "sample"

with TemporaryDirectory() as tmp_dir:
Expand Down Expand Up @@ -68,4 +68,4 @@ def main(fq1, fq2, contigs):
parser.add_argument('contigs', type=argparse.FileType('w'))

args = parser.parse_args()
main(args.fastq1, args.fastq2, args.contigs)
denovo(args.fastq1, args.fastq2, args.contigs)
4 changes: 2 additions & 2 deletions micall/drivers/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from micall.core.sam2aln import sam2aln
from micall.core.trim_fastqs import trim
from micall.g2p.fastq_g2p import fastq_g2p, DEFAULT_MIN_COUNT, MIN_VALID, MIN_VALID_PERCENT
from micall.utils.denovo import main as denovo_main
from micall.core.denovo import denovo

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -115,7 +115,7 @@ def process(self,

logger.info('Running de novo assembly on %s.', self)
with open(self.contigs_csv, 'w') as contigs_csv:
denovo_main(self.trimmed1_fastq, self.trimmed2_fastq, contigs_csv)
denovo(self.trimmed1_fastq, self.trimmed2_fastq, contigs_csv)

logger.info('Running fastq_g2p on %s.', self)
with open(self.trimmed1_fastq) as fastq1, \
Expand Down

0 comments on commit e05ab10

Please sign in to comment.