PyPretreatDNA module¶
Created on Wed May 18 14:06:37 2016
@author: yzj
-
PyPretreatDNA.
ALPHABET
= 'ACGT'¶ Used for process original data.
-
PyPretreatDNA.
Frequency
(tol_str, tar_str)[source]¶ Generate the frequency of tar_str in tol_str.
Parameters: - tol_str – mother string.
- tar_str – substring.
-
PyPretreatDNA.
GeneratePhycheValue
(k, phyche_index=None, all_property=False, extra_phyche_index=None)[source]¶ Combine the user selected phyche_list, is_all_property and extra_phyche_index to a new standard phyche_value. #################################################################
-
PyPretreatDNA.
GetData
(input_data, desc=False)[source]¶ Get sequence data from file or list with check.
Parameters: - input_data – type file or list
- desc – with this option, the return value will be a Seq object list(it only works in file object).
Returns: sequence data or shutdown.
-
PyPretreatDNA.
GetSequenceCheckDna
(f)[source]¶ Read the fasta file.
Input: f: HANDLE to input. e.g. sys.stdin, or open(<file>)
-
PyPretreatDNA.
IsFasta
(seq)[source]¶ Judge the Seq object is in FASTA format. Two situation: 1. No seq name. 2. Seq name is illegal. 3. No sequence.
Parameters: seq – Seq object.
-
PyPretreatDNA.
IsSequenceList
(sequence_list)[source]¶ Judge the sequence list is within the scope of alphabet and change the lowercase to capital. #################################################################
-
PyPretreatDNA.
IsUnderAlphabet
(s, alphabet)[source]¶ Judge the string is within the scope of the alphabet or not.
Parameters: - s – The string.
- alphabet – alphabet.
-
PyPretreatDNA.
ReadFasta
(f)[source]¶ Read a fasta file.
Parameters: f – HANDLE to input. e.g. sys.stdin, or open(<file>)
-
PyPretreatDNA.
ReadFastaCheckDna
(f)[source]¶ Read the fasta file, and check its legality.
Parameters: f – HANDLE to input. e.g. sys.stdin, or open(<file>)