|
Imported modules
|
|
from Dictionaries import *
import SeqIO
import cp
import os
import string
import sys
|
|
Functions
|
|
descEncode
main
makeDescDict
ozEncode
testMakeDescDict
|
|
|
descEncode
|
descEncode (
seq,
table,
startat=0,
)
seq sequence object
table list of dictionaries from SeqIO.tabulate
returns a list of ints
|
|
|
main
|
main ()
%(filename)s
Numerically encode sequences in a fasta file.
{{out name of outfile}}
{{enc Encoding type
aa default neunet aa encoding
none just print unmodified tab-delimited sequence characters
nucl nucleotides without ambiguties
anucl nucleotides with ambiguties
cvg coverage: gaps get 0's
oz consensus characters are 0, other are 1 (CANNOT be used with -degap option)
desc numbers most common character 1 next most common 2, etc (CANNOT be used with -degap option)}}
{{degap remove gap characters from sequences}}
{{v verbosity
0}}
{{h help}}
{{delim delimiter character for output table
tab}}
{{debug provides some debugging options
interleave}}
{{version print version info and exit}}
%(version)s
|
|
|
makeDescDict
|
makeDescDict ( dictIn, start )
dictIn is dictionary defining aa composition at a
single position as defined by SeqIO.tabulate Encodes most abundant char as startat, next most abundant as startat + 1 , etc
ties are broken by assigning char lower in alphabet the higher value
returns a new dict
|
|
|
ozEncode
|
ozEncode (
seq,
table,
cons=0,
noncons=1,
)
Encodes consensus and noncons chars as specified
seq sequence object
table list of dictionaries from SeqIO.tabulate
returns a list of ints
|
|
|
testMakeDescDict
|
testMakeDescDict (
filename,
position=0,
start=0,
)
|
|