<commit_before>from helps import *

def formatdb(**args):
    ''' run NCBI formatdb '''
    
    database = args['database']
    
    cmd = ' '.join([
        '~/cram/bin/formatdb',
        '-i %s' % database,
    ])
    
    ohai('running formatdb')
    
    run(cmd, generates='%s.psq' % database)

def blastp(**args):
    ''' run BLASTALL (default is blastp, can be overriden with program=) '''
    
    cmd = ' '.join([
        '~/cram/bin/blastall',
        '-p %s' % args.get('program', 'blastp'),
        '-d %s' % args['database'],
        '-i %s' % args['query'],
        '-e %s' % args.get('evalue', 10),
        '-o %s' % args['out'],
        '-v %s' % args.get('alignments', 1),
        '-b %s' % args.get('descriptions', 1),
        '-a %s' % args.get('threads', 1),
        '-m %s' % args.get('format', 1)
    ])
    
    ohai('running blastp')
    
    run(cmd, generates=args['out'])<commit_msg>format = 8 not 1<commit_after>from helps import *

def formatdb(**args):
    ''' run NCBI formatdb '''
    
    database = args['database']
    
    cmd = ' '.join([
        '~/cram/bin/formatdb',
        '-i %s' % database,
    ])
    
    ohai('running formatdb')
    
    run(cmd, generates='%s.psq' % database)

def blastp(**args):
    ''' run BLASTALL (default is blastp, can be overriden with program=) '''
    
    cmd = ' '.join([
        '~/cram/bin/blastall',
        '-p %s' % args.get('program', 'blastp'),
        '-d %s' % args['database'],
        '-i %s' % args['query'],
        '-e %s' % args.get('evalue', 10),
        '-o %s' % args['out'],
        '-v %s' % args.get('alignments', 1),
        '-b %s' % args.get('descriptions', 1),
        '-a %s' % args.get('threads', 1),
        '-m %s' % args.get('format', 8)
    ])
    
    ohai('running blastp')
    
    run(cmd, generates=args['out'])
{'fraction_non_alphanumeric': 0.21863013698630138, 'fraction_numerical': 0.007671232876712329, 'mean_word_length': 2.048414023372287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6049041', 'n_tokens_mistral': 675, 'n_tokens_neox': 644, 'n_words': 148}