comparison README.md @ 0:aef9a0c2c65e draft default tip

planemo upload commit 232ce39054ce38be27c436a4cabec2800e14f988-dirty
author itaxotools
date Sun, 29 Jan 2023 16:32:28 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:aef9a0c2c65e
1 # DNAconvert
2 Convert between different file formats containing genetic information.
3
4 ## Installation
5 Install the latest version directly using pip (requires Python 3.8 or later):
6 ```
7 pip install git+https://github.com/iTaxoTools/DNAconvert.git#egg=DNAconvert
8 ```
9
10 ## Executables
11 Download and run the standalone executables without installing Python.</br>
12 [See the latest release here.](https://github.com/iTaxoTools/DNAconvert/releases/latest)
13
14 ## Usage
15 usage: DNAconvert [-h] [--cmd] [--allow_empty_sequences]
16 [--informat INFORMAT] [--outformat OUTFORMAT]
17 [infile] [outfile]
18 DNAconvert
19
20 positional arguments:
21 infile the input file
22 outfile the output file
23
24 optional arguments:
25 -h, --help show this help message and exit
26 --cmd activates the command-line interface
27 --allow_empty_sequences
28 set this to keep the empty sequences in the output
29 file
30 --disable_automatic_renaming
31 disables automatic renaming, may result in duplicate
32 sequence names in Phylip and Nexus files
33 --informat INFORMAT format of the input file
34 --outformat OUTFORMAT
35 format of the output file
36
37 ### Batch processing
38
39 If `infile` is a directory, all files in it will be converted. In this case `informat` and `outformat` arguments are required.
40
41 Specifying names of the output files:
42 * `outfile` contains a '#' character: '#' will be replaced with the base names of input files.
43 * `outfile` is a directory: the output files will be written in it, with the same names as input files.
44
45 ## Supported formats
46 * `tab`: [Internal tab format][1]
47 * `tab_noheaders`: [Internal tab format][1] without headers
48 * `fasta`: FASTA format
49 * `relaxed_phylip`: relaxed Phylip format
50 * `fasta_hapview`: FASTA format for Haplotype Viewer
51 * `phylip`: Phylip format
52 * `fastq`: FASTQ format
53 * `fasta_gbexport`: FASTA format for export into Genbank repository
54 * `nexus`: NEXUS format
55 * `nexml`: DnaCharacterMatrix in NeXML format
56 * `genbank`: Genbank flat file format
57 * `mold_fasta`: FASTA format with sequence name matching requirements for the tool MolD
58
59 ## Recognised extension
60 If format is not provided, the program can infer it from the file extension
61
62 Currently recognised:
63 * `.tab`, `.txt`, `.tsv`: [Internal tab format][1]
64 * `.fas`, `.fasta`, `.fna`: FASTA format
65 * `.rel.phy`: relaxed Phylip format
66 * `.hapv.fas`: FASTA format for Haplotype Viewer
67 * `.phy`: Phylip format
68 * `.fastq`, `.fq`: FASTQ format
69 * `.fastq.gz`, `.fq.gz`: FASTQ format compressed with Gzip
70 * `.gb.fas`: FASTA format for export into Genbank repository
71 * `.nex`: NEXUS format
72 * `.xml`: NeXML format
73 * `.gb`: Genbank flat file format
74
75 Files with extension `.gz` are uncompressed automatically
76
77 ## Adding new formats
78 [Link to documentation](docs/ADDING_FORMATS.md)
79
80 [1]: docs/TAB_FORMAT.md
81
82 ## Options
83 DNAconvert uses two parsers for NEXUS format: internal (default) and the one from python-nexus package.
84
85 In the file `DNAconvert/config.json` (found in `%APPDATA%\iTaxoTools` or in `$XDG_CONFIG_HOME$/`) the key-value pair
86 ```
87 "nexus_parser" : "(method)""
88 ```
89 determines the parser. `(method)` is either `internal` or `python-nexus`.
90
91 ## Generating an executable
92 Using [PyInstaller](http://www.pyinstaller.org) is recommended. You should first clone the repository and install DNAconvert with all dependencies (includes PyInstaller):
93 ```
94 git clone https://github.com/iTaxoTools/DNAconvert.git
95 cd DNAconvert
96 pip install ".[dev]"
97 ```
98
99 After the following instruction, the directory `dist` will be created (among others) and the executable will be inside it:
100 ```
101 pyinstaller scripts/DNAconvert.spec
102 ```
103
104 ## Dependencies
105 Automatically installed when using pip:
106 * [python\-nexus](https://pypi.org/project/python-nexus/)
107 * [dendropy](https://pypi.org/project/DendroPy/)