コード例 #1
0
ファイル: meina.py プロジェクト: mikisi37/mikisi37.github.io
def main():
    option = sys.argv

    if len(option) == 1:
        error(option, 1, 1)

    elif len(option) > 2:
        data = openfile(option)
        data = compile(data)
        data = assembly(data)

        name = 'a.exe'
        option.pop(0)
        op = 0
        while len(option) > op:
            if option[op] in Option:
                if op + 1 < len(option):
                    name = option[op + 1] + '.exe'

            op += 1

        save(data, name)

    else:
        data = openfile(option)
        data = compile(data)
        data = assembly(data)
コード例 #2
0
def test_sample_data(file):
    with tempfile.NamedTemporaryFile(suffix='.fasta') as tmp_file:
        assembly(
            file,
            tmp_file.name,
            DEFAULT_ALGORITHM,
            error_correction=True,
        )
        indexed_result = sh.bowtie2(
            "-a",
            "--local",
            "--mp 2,2",
            "--rdg 10,2",
            "--rfg 10,2",
            "-f",
            "-x ./sample_data/reference/reference",
            f"-U {tmp_file.name}",
        )
        with pysam_sucks(indexed_result) as file:
            evaluation_results = evaluate(file)
        print(evaluation_results)
        assert evaluation_results.overall_score >= 0.01
コード例 #3
0
 def setUp(self):
     self.assy = assy = assembly.assembly(None)
     self.mol = mol = chem.molecule(assy)
     self.a = a = chem.Atom("C", chem.V(0.0, 0.0, 0.0), mol)
     self.a.set_atomtype("sp3", True)
コード例 #4
0
ファイル: go.py プロジェクト: Milker90/itc
#!/usr/bin/python
# coding:utf-8

import metaxml
import conf
import os
import sys
import upload
import conf
import lookup
from archive import Item
import archive
import getpass
import assembly

if __name__ == '__main__':	
    item = Item(conf.iTMSTransporter, conf.distribute_account, conf.distribute_pwd, conf.bundle_short_version_string, conf.bundle_version, conf.project_path, conf.scheme, conf.configuration, conf.provisioning_profile_name, conf.vendor_id)

    # 开始打包
    archive.archive(item)

    # 获取itmsp
    lookup.lookup(item)

    # 准备上传
    assembly.assembly(item)

    # 开始上传
    upload.upload(item)

コード例 #5
0
import metaxml
import conf
import os
import sys
import upload
import conf
import lookup
from archive import Item
import archive
import getpass
import assembly

if __name__ == '__main__':
    item = Item(conf.iTMSTransporter, conf.distribute_account,
                conf.distribute_pwd, conf.bundle_short_version_string,
                conf.bundle_version, conf.project_path, conf.scheme,
                conf.configuration, conf.provisioning_profile_name,
                conf.vendor_id)

    # 开始打包
    archive.archive(item)

    # 获取itmsp
    lookup.lookup(item)

    # 准备上传
    assembly.assembly(item)

    # 开始上传
    upload.upload(item)
コード例 #6
0
from assembly import assembly

# assembly instruction
instruction = [
    ' lw 0 1 five load reg1 with 5 (uses symbolic address)',
    ' lw 1 2 3 load reg2 with -1 (uses numeric address)',
    'start add 1 2 1 decrement reg1',
    ' beq 0 1 2 goto end of program when reg1==0',
    ' beq 0 0 start go back to the beginning of the loop', ' noop',
    'done halt end of program', 'five .fill 5', 'neg1 .fill -1',
    'stAddr .fill start'
]

# main
for x in instruction:
    assembly(x)
コード例 #7
0
from assembly import assembly, DEFAULT_ALGORITHM

SAMPLE_FILES = [
    f'./sample_data/reads_{sample_file}_percent_bad.fasta'
    for sample_file in ['1', '1_to_3', '3_to_5']
]

if __name__ == '__main__':
    for sample_file in SAMPLE_FILES:
        output_file_name = sample_file.split('.')[-2].split('/')[-1]
        assembly(
            input_file_name=sample_file,
            output_file_name=f'./sample_data/output_{output_file_name}.fasta',
            algorithm=DEFAULT_ALGORITHM,
            error_correction=True,
        )
コード例 #8
0
def fem(le, beta_values, num_elements_in_region, total_num_elements, EpsilonR,
        MuR):
    A, B = assembly(num_elements_in_region, total_num_elements, le,
                    beta_values, EpsilonR, MuR)
    eig_values, eig_vectors = solver(A, B)
    return eig_values, eig_vectors