# -*- coding: utf-8 *-* import sys import os import errno import time # global configuration import vprimer.glv as glv import vprimer.utils as utl from vprimer.logging_config import LogConf log = LogConf.open_log(__name__) import vcfpy from vprimer.allele_select import AlleleSelect class Variant(object): def __init__(self): pass def pick_variant(self): """ """ # open vcf through vcfpy reader = vcfpy.Reader.from_path(glv.conf.vcf_file)
def open_log(self): global log log = LogConf.open_log(__name__)
def open_log_enzyme(self): # in glv global log log = LogConf.open_log(__name__) self.default_enzyme_names = [ ['# A'], ['AluI', 'AGCT', 'AG^_CT', '4'], ['ApaI', 'GGGCCC', 'G_GGCC^C', '6'], ['AscI', 'GGCGCGCC', 'GG^CGCG_CC', '8'], ['AvrII', 'CCTAGG', 'C^CTAG_G', '6'], [''], ['# B'], ['BamHI', 'GGATCC', 'G^GATC_C', '6'], ['BbsI', 'GAAGAC', 'GAAGACNN^NNNN_N', '6'], ['BclI', 'TGATCA', 'T^GATC_A', '6'], ['BglII', 'AGATCT', 'A^GATC_T', '6'], ['BsaI', 'GGTCTC', 'GGTCTCN^NNNN_N', '6'], ['BsiWI', 'CGTACG', 'C^GTAC_G', '6'], ['BsmFI', 'GGGAC', 'GGGACNNNNNNNNNN^NNNN_N', '5'], ['BspHI', 'TCATGA', 'T^CATG_A', '6'], ['BssHII', 'GCGCGC', 'G^CGCG_C', '6'], ['Bst1107I', 'GTATAC', 'GTA^_TAC', '6'], ['BstBI', 'TTCGAA', 'TT^CG_AA', '6'], ['BstEII', 'GGTNACC', 'G^GTNAC_C', '7'], ['BstXI', 'CCANNNNNNTGG', 'CCAN_NNNN^NTGG', '12'], [''], ['# C'], ['ClaI', 'ATCGAT', 'AT^CG_AT', '6'], [''], ['# D'], ['DdeI', 'CTNAG', 'C^TNA_G', '5'], ['DpnI', 'GATC', 'GA^_TC', '4'], ['DraI', 'TTTAAA', 'TTT^_AAA', '6'], ['DraIII', 'CACNNNGTG', 'CAC_NNN^GTG', '9'], [''], ['# E'], ['Eco52I', 'CGGCCG', 'C^GGCC_G', '6'], ['EcoO109I', 'RGGNCCY', 'RG^GNC_CY', '7'], ['EcoO65I', 'GGTNACC', 'G^GTNAC_C', '7'], ['EcoRI', 'GAATTC', 'G^AATT_C', '6'], ['EcoRV', 'GATATC', 'GAT^_ATC', '6'], ['EcoT14I', 'CCWWGG', 'C^CWWG_G', '6'], [''], ['# F'], ['FseI', 'GGCCGGCC', 'GG_CCGG^CC', '8'], [''], ['# H'], ['HaeII', 'RGCGCY', 'R_GCGC^Y', '6'], ['HincII', 'GTYRAC', 'GTY^_RAC', '6'], ['HindIII', 'AAGCTT', 'A^AGCT_T', '6'], ['HinfI', 'GANTC', 'G^ANT_C', '5'], ['HpaI', 'GTTAAC', 'GTT^_AAC', '6'], ['HphI', 'GGTGA', 'GGTGANNNNNNN_N^N', '5'], [''], ['# K'], ['KpnI', 'GGTACC', 'G_GTAC^C', '6'], [''], ['# M'], ['MluI', 'ACGCGT', 'A^CGCG_T', '6'], ['MseI', 'TTAA', 'T^TA_A', '4'], [''], ['# N'], ['NcoI', 'CCATGG', 'C^CATG_G', '6'], ['NdeI', 'CATATG', 'CA^TA_TG', '6'], ['NheI', 'GCTAGC', 'G^CTAG_C', '6'], ['NlaIII', 'CATG', '_CATG^', '4'], ['NotI', 'GCGGCCGC', 'GC^GGCC_GC', '8'], ['NruI', 'TCGCGA', 'TCG^_CGA', '6'], ['NsiI', 'ATGCAT', 'A_TGCA^T', '6'], [''], ['# P'], ['PacI', 'TTAATTAA', 'TTA_AT^TAA', '8'], ['PmeI', 'GTTTAAAC', 'GTTT^_AAAC', '8'], ['PmlI', 'CACGTG', 'CAC^_GTG', '6'], ['Psp1406I', 'AACGTT', 'AA^CG_TT', '6'], ['PstI', 'CTGCAG', 'C_TGCA^G', '6'], ['PvuII', 'CAGCTG', 'CAG^_CTG', '6'], [''], ['# R'], ['RsaI', 'GTAC', 'GT^_AC', '4'], [''], ['# S'], ['SacI', 'GAGCTC', 'G_AGCT^C', '6'], ['SacII', 'CCGCGG', 'CC_GC^GG', '6'], ['SalI', 'GTCGAC', 'G^TCGA_C', '6'], ['SapI', 'GCTCTTC', 'GCTCTTCN^NNN_N', '7'], ['SbfI', 'CCTGCAGG', 'CC_TGCA^GG', '8'], ['ScaI', 'AGTACT', 'AGT^_ACT', '6'], ['SfiI', 'GGCCNNNNNGGCC', 'GGCCN_NNN^NGGCC', '13'], ['SmaI', 'CCCGGG', 'CCC^_GGG', '6'], ['SnaBI', 'TACGTA', 'TAC^_GTA', '6'], ['SpeI', 'ACTAGT', 'A^CTAG_T', '6'], ['SphI', 'GCATGC', 'G_CATG^C', '6'], ['SspI', 'AATATT', 'AAT^_ATT', '6'], ['StuI', 'AGGCCT', 'AGG^_CCT', '6'], ['SwaI', 'ATTTAAAT', 'ATTT^_AAAT', '8'], [''], ['# T'], ['TaqI', 'TCGA', 'T^CG_A', '4'], ['Tth111I', 'GACNNNGTC', 'GACN^N_NGTC', '9'], [''], ['# X'], ['XbaI', 'TCTAGA', 'T^CTAG_A', '6'], ['XhoI', 'CTCGAG', 'C^TCGA_G', '6'], ['XmaI', 'CCCGGG', 'C^CCGG_G', '6'], [''], ['# end'], ]
def open_log_vcffile(self): # in glv global log log = LogConf.open_log(__name__)