PyDNAnac module


A class used for computing different types of DNA descriptors!

You can freely use and distribute it. If you have any problem,

you could contact with us timely.

Authors: Zhijiang Yao and Dongsheng Cao.

Date: 2016.10.11

Email: gadsby@163.com and oriental-cds@163.com


PyDNAnac.CheckNacPara(k, normalize=False, upto=False, alphabet='ACGT')[source]
PyDNAnac.GetIdKmer(data, hs, non_hs, **kwargs)[source]

Make IDKmer vector.

Parameters:
  • data – Need to processed FASTA file.
  • hs – Positive FASTA file.
  • non_hs – Negative FASTA file.
  • k – int, the k value of kmer, it should be larger than 0.
  • upto – bool, whether to generate 1-kmer, 2-kmer, ..., k-mer.
  • alphabet – string.
PyDNAnac.GetKmer(data, **kwargs)[source]

Make a kmer dictionary with options k, upto, revcomp, normalize.

Parameters:
  • k – int, the k value of kmer, it should be larger than 0.
  • normalize – bool, normalize the result vector or not.
  • upto – bool, whether to generate 1-kmer, 2-kmer, ..., k-mer.
  • alphabet – string.
  • data – file object or sequence list.
Returns:

kmer vector.

PyDNAnac.GetKmerList(k, upto, alphabet)[source]

Get the kmer list.

Parameters:
  • k – int, the k value of kmer, it should be larger than 0.
  • upto – bool, whether to generate 1-kmer, 2-kmer, ..., k-mer.
  • alphabet – string.
PyDNAnac.GetRevcKmer(data, **kwargs)[source]

Make a reverse compliment kmer dictionary with options k, upto, normalize.

Parameters:data – file object or sequence list.
Returns:reverse compliment kmer vector.