Package Biskit :: Package Mod :: Module modUtils
[hide private]
[frames] | no frames]

Module modUtils

source code

utility funtions for Mod package

Classes [hide private]
  Test
Test class

Functions [hide private]
{key:value} parse_tabbed_file(fname)
Parse the chaim index file written by TemplateSearcher TemplateSearcher.F_CHAIN_INDEX.
str format_fasta(seq, width=60)
Transform a given sequence to fasta format
True/False verify_fasta(target)
Verify that a given file or string is in Fasta format.

Variables [hide private]
  test = Test()

Function Details [hide private]

parse_tabbed_file(fname)

source code 

Parse the chaim index file written by TemplateSearcher TemplateSearcher.F_CHAIN_INDEX.
Parameters:
  • fname (str) - name of file to parse
Returns: {key:value}
key : value mapping

format_fasta(seq, width=60)

source code 

Transform a given sequence to fasta format
Parameters:
  • seq (str) - sequence
  • width (int) - length of a line in characters (default: 60)
Returns: str
string sequence in fasta format

verify_fasta(target)

source code 

Verify that a given file or string is in Fasta format. The definition used for a fasta file here is that:
  • first line starts with '>'
  • the following sequence lines are not longer that 80 characters
  • the characters has to belong to the standard amino acid codes
Parameters:
  • target (str OR [str]) - name of fasta file OR file contents as list of strings
Returns: True/False
conforms to the fsata format

Variables Details [hide private]

test

Value:
Test()