Package core :: Module readandwrite
[hide private]
[frames] | no frames]

Module readandwrite

Created on Nov 11, 2011

Contains various help functions which read or produce an input/ output


Author: Sven Giese

Functions [hide private]
 
aa_dist_seq(seq, txt_file, shallwrite)
Writes the AA distribution in a file and returns the dictionary.
 
gethammingdistance(original, artificial)
Calculates the hamming distances between two sequences.
 
nucleotide_dist_file(file_fasta, txt_file)
Writes the DNA distribution in a file and returns the dictionary.
 
nucleotide_dist_seq(seq, txt_file, shallwrite)
Writes the nucleotide distribution in a file and returns the dictionary.
HTSeq Sequence object
readdna(filename)
Reads in the dna sequence of the given fasta
 
writefile(sequenceObject, filename)
Writes a given sequence object to a fasta file.
 
writeoverview(Ndic_G, aadic_G, Ndic_AR, aadic_AR, filename)
Creates the "delta" file for the comparison of the two chromosoms.
Variables [hide private]
  __package__ = 'core'
Function Details [hide private]

aa_dist_seq(seq, txt_file, shallwrite)

 

Writes the AA distribution in a file and returns the dictionary. adjust s for % results.

Parameters:
  • seq (string) - Nucleotide sequence.
  • txt_file (string) - Output compare file.
  • shallwrite (Bool) - Write output in percentages..

gethammingdistance(original, artificial)

 

Calculates the hamming distances between two sequences.

Parameters:
  • original (list) - Nucleotide sequence from the reference.
  • artificial (list) - Nucleotide sequence from the artificial reference.

nucleotide_dist_file(file_fasta, txt_file)

 

Writes the DNA distribution in a file and returns the dictionary. adjust n for % results

Parameters:
  • file_fasta (string) - DNA Sequence
  • txt_file (string) - Filename for output.

nucleotide_dist_seq(seq, txt_file, shallwrite)

 

Writes the nucleotide distribution in a file and returns the dictionary. adjust s for % results.

Parameters:
  • seq (string) - Nucleotide sequence.
  • txt_file (string) - Output compare file.
  • shallwrite (Bool) - Decides if percentages values are written to the output.

readdna(filename)

 

Reads in the dna sequence of the given fasta

Parameters:
  • filename (string) - Fasta-file used as input.
Returns: HTSeq Sequence object
Reference Fasta.

writefile(sequenceObject, filename)

 

Writes a given sequence object to a fasta file.

Parameters:
  • sequenceObject (HTSeq Sequence object) - Reference sequence as fasta.

writeoverview(Ndic_G, aadic_G, Ndic_AR, aadic_AR, filename)

 

Creates the "delta" file for the comparison of the two chromosoms. This file contains the differences in nucleotide distribution between reference and artificial. input: nucleotid dictionary genom, aa dictionary genome, nucleotid dictionary artificial chromosom, aa dictionary, filename

Parameters:
  • Ndic_G (dictionary) - Nucleotid dictionary genom.
  • aadic_G (dictionary) - AA dictionary genome.
  • Ndic_AR (dictionary) - Nucleotid dictionary artificial.
  • aadic_AR (dictionary) - AA dictionary artificial
  • filename (string) - Output filename.