DENOFO Converter
The DENOFO Converter is a tool for converting the denofo annotation format
between different file formats (e.g., *.dngf to *.gff or *.fasta).
There are two interfaces for the converter: a command-line interface (CLI) and a graphical user interface (GUI).
Command-line interface (CLI)
- denofo.converter.converter_cli.main()
The main function of the program including argument parsing.
Graphical user interface (GUI)
Converter logic implementation
- denofo.converter.convert.annotate_fasta(dnga_model: DeNovoGeneAnnotation, fasta_file: Path, outf: Path | None = None, identifiers: set[str] | None = None) str
Annotate a FASTA file with the model short string representation.
- Parameters:
dnga_model (DeNovoGeneAnnotation) – DeNovoGeneAnnotation model to annotate with
fasta_file (Path) – additional input file path
outf (Path, optional) – output file path, defaults to None
identifiers (set[str], optional) – identifiers to filter, defaults to None
- Returns:
annotated FASTA string, if outf is None
- Return type:
str
- denofo.converter.convert.annotate_gff(dnga_model: DeNovoGeneAnnotation, gff_file: Path, outf: Path | None = None, feature: str = 'gene', identifiers: set[str] | None = None) str
Annotate a GFF file with the model short string representation.
- Parameters:
dnga_model (DeNovoGeneAnnotation) – DeNovoGeneAnnotation model to annotate with
gff_file (Path) – GFF file path
outf (Path, optional) – output file path, defaults to None
feature (str, optional) – feature to annotate, defaults to “gene”
identifiers (set[str], optional) – identifiers to filter, defaults to None
- Returns:
annotated GFF string, if outf is None
- Return type:
str
- denofo.converter.convert.convert_to_json(dnga_model: DeNovoGeneAnnotation, outf: Path | None = None) str
Convert a DeNovoGeneAnnotation model to a JSON file.
- Parameters:
dnga_model (DeNovoGeneAnnotation) – DeNovoGeneAnnotation model to convert
outf (Path, optional) – output file path, defaults to None
- Returns:
JSON string
- Return type:
str
- denofo.converter.convert.convert_to_pickle(dnga_model: DeNovoGeneAnnotation, outf: Path | None = None) bytes
Convert a DeNovoGeneAnnotation model to a pickle file.
- Parameters:
dnga_model (DeNovoGeneAnnotation) – DeNovoGeneAnnotation model to convert
outf (Path, optional) – output file path, defaults to None
- Returns:
pickled model
- Return type:
bytes
- denofo.converter.convert.decode_short_str(short_str: str) DeNovoGeneAnnotation
Decode a short representation string into a DeNovoGeneAnnotation model.
- Parameters:
short_str (str) – short representation string
- Returns:
DeNovoGeneAnnotation model
- Return type:
- denofo.converter.convert.encode_short_str(dnga_model: DeNovoGeneAnnotation) str
Encode a DeNovoGeneAnnotation model as a short representation string.
- Parameters:
dnga_model (DeNovoGeneAnnotation) – DeNovoGeneAnnotation model to encode
- Returns:
short representation string
- Return type:
str
- denofo.converter.convert.load_from_fasta(fasta_file: Path, identifiers: set[str] | None = None) DeNovoGeneAnnotation
Load a DeNovoGeneAnnotation model from a FASTA file.
- Parameters:
fasta_file (Path) – FASTA file path
identifiers (set[str], optional) – identifiers to filter, defaults to None
- Returns:
DeNovoGeneAnnotation model
- Return type:
- denofo.converter.convert.load_from_gff(gff_file: Path, feature: str = 'gene', identifiers: set[str] | None = None) DeNovoGeneAnnotation
Load a DeNovoGeneAnnotation model from a GFF file.
- Parameters:
gff_file (Path) – GFF file path
feature (str, optional) – feature to load, defaults to “gene”
identifiers (set[str], optional) – identifiers to filter, defaults to None
- Returns:
DeNovoGeneAnnotation model
- Return type:
- denofo.converter.convert.load_from_json(json_file: Path) DeNovoGeneAnnotation
Load a DeNovoGeneAnnotation model from a JSON file.
- Parameters:
json_file (Path) – JSON file path
- Returns:
DeNovoGeneAnnotation model
- Return type:
- denofo.converter.convert.load_from_pickle(pkl_file: Path) DeNovoGeneAnnotation
Load a DeNovoGeneAnnotation model from a pickle file.
- Parameters:
pkl_file (Path) – pickle file path
- Returns:
DeNovoGeneAnnotation model
- Return type: