Example #1
0
def main( options ):
    ofile = options.ofile
    is_gz = ofile.endswith(".gz")
    fd = gzip.open( ofile, "wb" ) if is_gz else open( ofile, "w" )
    infile = options.ifile if options.ifile is not None else options.ifiles
    for line, _, _, _ in open_rosetta_file( infile, options.ifile is None, check_symmetry=False ):
        fd.write( line.encode('utf-8') if is_gz else line )
Example #2
0
def update_data(log: Logger, data: Dict, wpaths: Dict) -> Dict:
    """Update data to link final files.
    """
    data['silent_files']['assembly'] = list(
        wpaths['outdir'].glob('*_hyb.silent'))
    data['silent_files']['design'] = list(
        wpaths['outdir'].glob('*_des.silent'))
    data['minisilent']['assembly'] = wpaths['main'].joinpath(
        'output_hyb.minisilent.gz')
    data['minisilent']['design'] = wpaths['main'].joinpath(
        'output_des.minisilent.gz')
    for k in data['minisilent']:
        log.info(f'Generating minisilent file at {data["minisilent"][k]}\n')
        fd = gzip.open(data['minisilent'][k], "wb")
        for line, _, _, _ in open_rosetta_file(
            [str(x) for x in data['silent_files'][k]],
                True,
                check_symmetry=False):
            fd.write(line.encode('utf-8'))
    return data
Example #3
0
def update_data(data: Dict, wpaths: Dict) -> Dict:
    """Update data to link final files.
    """
    data['silent_files']['folding'] = list(
        wpaths['outdir'].glob('*_funfol.silent'))
    data['silent_files']['design'] = list(
        wpaths['outdir'].glob('*_des.silent'))
    data['minisilent']['folding'] = wpaths['main'].joinpath(
        'output_funfol.minisilent.gz')
    data['minisilent']['design'] = wpaths['main'].joinpath(
        'output_des.minisilent.gz')
    for k in data['minisilent']:
        if TBcore.get_option('system', 'verbose'):
            sys.stdout.write('Generating minisilent file at {}\n'.format(
                data['minisilent'][k]))
        fd = gzip.open(data['minisilent'][k], "wb")
        for line, _, _, _ in open_rosetta_file(
            [str(x) for x in data['silent_files'][k]],
                True,
                check_symmetry=False):
            fd.write(line.encode('utf-8'))
    return data