Ejemplo n.º 1
0
 def in_out_kappa(self):
     df = pd.read_csv(self.train_fpi, sep='\t', index_col=0)
     df = df[df['y'] == 0]
     seqs = list(df['Sequence'])
     for seq in seqs:
         ms = motif_seq.LcSeq(seq, self.k, self.lca, 'lca')
         in_seq, out_seq = ms.seq_in_motif()
         SeqOb = SequenceParameters(in_seq)
         print(SeqOb.get_kappa())
         seqOb = SequenceParameters(out_seq)
         print(seqOb.get_kappa())
         print('')
Ejemplo n.º 2
0
def get_features_charge(seq):
    """Return dictionary of all features associated with charge."""
    SeqOb = SequenceParameters(seq)
    return {'FCR': FCR(seq), 'NCPR': NCPR(seq),
            'net_charge': net_charge(seq), 'net_charge_P': net_charge_P(seq),
            'RK_ratio': RK_ratio(seq), 'ED_ratio': ED_ratio(seq),
            'kappa': SeqOb.get_kappa(), 'omega': SeqOb.get_Omega(), 'SCD': SeqOb.get_SCD()}
Ejemplo n.º 3
0
def feat_charge(seq):
    SeqOb = SequenceParameters(seq)
    return {
        'FCR': FCR(seq),
        'NCPR': NCPR(seq),
        'net_charge': net_charge(seq),
        'net_charge_P': net_charge_P(seq),
        'RK_ratio': RK_ratio(seq),
        'ED_ratio': ED_ratio(seq),
        'kappa': SeqOb.get_kappa(),
        'omega': SeqOb.get_Omega(),
        'SCD': SeqOb.get_SCD()
    }
Ejemplo n.º 4
0
def get_kappa(sequence):
####-CREATE A SEQUENCEOBJECT FROM THE AMINO ACID SEQUENCE-##############################################################
    SeqOb = SequenceParameters(sequence)
####-KAPPA RANGES: 0 < K < 1 --------------- LOW KAPPA:EXTENDED ---- HIGH KAPPA:COMPACTED --------------################
    kappa = SeqOb.get_kappa()
    return kappa