Input/Output in files — pbxplore.io
¶
Deals with writing and reading of files in various formats.
Fasta¶
-
pbxplore.io.
read_fasta
(name)[source]¶ Read fasta file and output sequences in a list.
Parameters: name (str) – Name of file containing sequences in fasta format. Returns: - header_lst (list) – List of headers (str)
- sequence_lst (list) – List of sequences (str)
Results of an assignation¶
Results af analyses¶
-
pbxplore.io.
write_count_matrix
(pb_count, outfile, first=1)[source]¶ Write a PB occurence matrix in a file.
Parameters: - pb_count (an occurence matrix as a 2D numpy array.) –
- outfile (an open file where to write the matrix.) –
- first (the residue number of the first position.) –
-
pbxplore.io.
write_neq
(outfile, neq_array, residue_min=1, residue_max=None)[source]¶ Write the Neq matrix in an open file
Parameters: - outfile (file descriptor) – The file descriptor to write in. It must allow writing.
- neq_array (numpy array) – a 1D array containing the neq values.
- residue_min (int) – the lower bound of residue frame
- residue_max (int) – the upper bound of residue frame