annotate COG/bac-genomics-scripts/po2group_stats/README.md @ 15:dbde253606c5 draft default tip

Uploaded
author dereeper
date Wed, 11 Dec 2024 08:25:06 +0000
parents e42d30da7a74
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
1 po2group_stats
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
2 ==============
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
3
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
4 `po2group_stats.pl` is a script to categorize orthologs from [Proteinortho5](http://www.bioinf.uni-leipzig.de/Software/proteinortho/) output according to genome groups. In the [prot_finder](/prot_finder) workflow is a script, `binary_group_stats.pl`, which does the same thing for column groups in a delimited TEXT binary matrix.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
5
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
6 * [Synopsis](#synopsis)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
7 * [Description](#description)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
8 * [Usage](#usage)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
9 * [cds_extractor](#cds_extractor)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
10 * [Proteinortho5](#proteinortho5)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
11 * [po2group_stats](#po2group_stats)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
12 * [Options](#options)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
13 * [Mandatory options](#mandatory-options)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
14 * [Optional options](#optional-options)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
15 * [Output](#output)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
16 * [Dependencies](#dependencies)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
17 * [Run environment](#run-environment)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
18 * [Author - contact](#author---contact)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
19 * [Citation, installation, and license](#citation-installation-and-license)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
20 * [Changelog](#changelog)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
21
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
22 ## Synopsis
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
23
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
24 perl po2group_stats.pl -i matrix.proteinortho -d genome_fasta_dir/ -g group_file.tsv -p > overall_stats.tsv
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
25
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
26 ## Description
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
27
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
28 Categorize the genomes in an ortholog/paralog output matrix (option **-i**) from a
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
29 [**Proteinortho5**](http://www.bioinf.uni-leipzig.de/Software/proteinortho/)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
30 calculation according to group affiliations. The group
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
31 affiliations of the genomes are intended to get overall
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
32 presence/absence statistics for groups of genomes and not simply
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
33 single genomes (e.g. comparing 'marine', 'earth', 'commensal',
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
34 'pathogenic' etc. genome groups). Percentage inclusion (option
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
35 **-cut\_i**) and exclusion (option **-cut\_e**) cutoffs can be set to
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
36 define how strict the presence/absence of genome groups within an
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
37 orthologous group (OG) are defined. Of course groups can also hold
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
38 only single genomes to get single genome statistics. Group
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
39 affiliations are defined in a mandatory **tab-delimited** group input
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
40 file (option **-g**) with **minimal two** and **maximal four** groups.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
41
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
42 Only alphanumeric (a-z, A-Z, 0-9), underscore (\_), dash (-), and
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
43 period (.) characters are allowed for the **group names** in the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
44 group file to avoid downstream problems with the operating/file
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
45 system. As a consequence, also no whitespaces are allowed in these!
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
46 Additionally, **group names**, **genome filenames** (should be
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
47 enforced by the file system), and **FASTA IDs** considering **all**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
48 genome files (mostly locus tags; should be enforced by Proteinortho5)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
49 need to be **unique**.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
50
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
51 **Proteinortho5** (PO) has to be run with option **-singles** to
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
52 include also genes without orthologs, so-called singletons/ORFans,
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
53 for each genome in the PO matrix (see the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
54 [PO manual](http://www.bioinf.uni-leipzig.de/Software/proteinortho/manual.html)).
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
55 Additionally, option **-selfblast** is recommended to enhance
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
56 paralog detection by PO.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
57
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
58 To explain the logic behind the categorization, the following
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
59 annotation for example groups will be used. A '1' exemplifies a
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
60 group genome count in a respective OG >= the rounded inclusion
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
61 cutoff, a '0' a group genome count <= the rounded exclusion cutoff.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
62 The presence and absence of OGs for the group affiliations are
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
63 structured in different categories depending on the number of
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
64 groups. For **two groups** (e.g. A and B) there are five categories:
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
65 'A specific' (A:B = 1:0), 'B specific' (0:1), 'cutoff core' (1:1),
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
66 'underrepresented' (0:0), and 'unspecific'. Unspecific OGs have a
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
67 genome count for at least **one** group outside the cutoffs
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
68 (exclusion cutoff < genome count < inclusion cutoff) and
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
69 thus cannot be categorized. These 'unspecific' OGs will only be
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
70 printed to a final annotation result file with option **-u**. Overall
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
71 stats for all categories are printed to *STDOUT* in a final
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
72 tab-delimited output matrix.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
73
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
74 **Three groups** (A, B, and C) have the following nine categories: 'A
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
75 specific' (A:B:C = 1:0:0), 'B specific' (0:1:0), 'C specific'
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
76 (0:0:1), 'A absent' (0:1:1), 'B absent' (1:0:1), 'C absent' (1:1:0),
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
77 'cutoff core' (1:1:1), 'underrepresented' (0:0:0), and 'unspecific'.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
78
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
79 **Four groups** (A, B, C, and D) are classified in 17 categories: 'A
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
80 specific' (A:B:C:D = 1:0:0:0), 'B specific' (0:1:0:0), 'C specific'
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
81 (0:0:1:0), 'D specific' (0:0:0:1), 'A-B specific' (1:1:0:0), 'A-C
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
82 specific' (1:0:1:0), 'A-D specific' (1:0:0:1), 'B-C specific'
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
83 (0:1:1:0), 'B-D specific' (0:1:0:1), 'C-D specific' (0:0:1:1), 'A
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
84 absent' (0:1:1:1), 'B absent' (1:0:1:1), 'C absent' (1:1:0:1), 'D
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
85 absent' (1:1:1:0), 'cutoff core' (1:1:1:1), 'underrepresented'
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
86 (0:0:0:0), and 'unspecific'.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
87
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
88 The resulting group presence/absence (according to the cutoffs) can
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
89 also be printed to a binary matrix (option **-b**) in the result
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
90 directory (option **-r**), excluding the 'unspecific' category. Since
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
91 the categories are the logics underlying venn diagrams, you can also
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
92 plot the results in a venn diagram using the binary matrix (option
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
93 **-p**). The 'underrepresented' category is exempt from the venn
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
94 diagram, because it is outside of venn diagram logics.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
95
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
96 Here are venn diagrams illustrating the logic categories (see folder ['pics'](./pics)):
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
97
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
98 <p align="center">
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
99 <img alt="venn diagram logics" src="https://github.com/aleimba/bac-genomics-scripts/raw/master/po2group_stats/pics/venn_diagram_logics.png">
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
100 </p>
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
101
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
102 There are two optional categories (which are only considered for the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
103 final print outs and in the final stats matrix, not for the binary
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
104 matrix and the venn diagram): 'strict core' (option **-co**) for
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
105 OGs where **all** genomes have an ortholog, independent of the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
106 cutoffs. Of course all the 'strict core' OGs are also included in
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
107 the 'cutoff\_core' category ('strict core' is identical to 'cutoff
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
108 core' with **-cut\_i** 1 and **-cut\_e** 0). Option **-s** activates the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
109 detection of 'singleton/ORFan' OGs present in only **one** genome.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
110 Depending on the cutoffs and number of genomes in the groups,
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
111 category 'underrepresented' includes most of these singletons.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
112
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
113 Additionally, annotation is retrieved from multi-FASTA files created
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
114 with [`cds_extractor.pl`](/cds_extractor). See
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
115 [`cds_extractor.pl`](/cds_extractor) for a description of the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
116 format. These files are used as input for the PO analysis and with
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
117 option **-d** for `po2group_stats.pl`. The annotations are printed
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
118 in category output files in the result directory.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
119
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
120 Annotations are only pulled from one representative genome for each
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
121 category present in the current OG. With option **-co** you can set a
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
122 specific genome for the representative annotation for category
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
123 'strict core'. For all other categories the representative genome is
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
124 chosen according to the order of the genomes in the group files,
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
125 depending on the presence in each OG. Thus, the best annotated
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
126 genome should be in the first group at the topmost position
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
127 (especially for 'cutoff core'), as well as the best annotated ones
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
128 at the top in all other groups.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
129
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
130 In the result files, each orthologous group (OG) is listed in a row
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
131 of the resulting category files, the first column holds the OG
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
132 numbers from the PO input matrix (i.e. line number minus one). The
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
133 following columns specify the ID for each CDS, gene, EC number(s),
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
134 product, and organism are shown depending on their presence in the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
135 CDS's annotation. The ID is in most cases the locus tag (see
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
136 [`cds_extractor.pl`](/cds_extractor)). If several EC numbers exist
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
137 for a single CDS they are separated by a ';'. If the representative
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
138 genome within an OG includes paralogs (co-orthologs) these will be
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
139 printed in the following row(s) **without** a new OG number in the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
140 first column.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
141
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
142 The number of OGs in the category annotation result files are the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
143 same as listed in the venn diagram and the final stats matrix.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
144 However, since only annotation from one representative annotation is
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
145 used the CDS number will be different to the final stats. The final
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
146 stats include **all** the CDS in this category in **all** genomes
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
147 present in the OG in groups >= the inclusion cutoff (i.e. for
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
148 'strict core' the CDS for all genomes in this OG are counted). Two
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
149 categories are different, for 'unspecific' all unspecific groups are
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
150 included, for 'underrepresented' all groups <= the exclusion
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
151 cutoffs. This is also the reason, the 'pangenome' CDS count is
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
152 greater than the 'included in categories' CDS count in the final
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
153 stats matrix, as genomes in excluded groups are exempt from the CDS
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
154 counts for most categories. 'Included in categories' is the OG/CDS
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
155 sum of all non-optional categories ('\*specific', '\*absent', 'cutoff
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
156 core', 'underrepresented', and 'unspecific'), since the optional
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
157 categories are included in non-optionals. An exception to the
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
158 difference in CDS counts are the 'singletons' category where OG and
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
159 CDS counts are identical in the result files and in the overall
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
160 final output matrix (as there is only one genome), as well as in
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
161 group-'specific' categories for groups including only one genome.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
162
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
163 At last, if you want the respective representative sequences for a
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
164 category you can first filter the locus tags from the result file
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
165 with Unix command-line tools:
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
166
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
167 grep -v "^#" result_file.tsv | cut -f 2 > locus_tags.txt
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
168
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
169 And then feed the locus tag list to
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
170 [`cds_extractor.pl`](/cds_extractor) with option **-l**.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
171
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
172 As a final note, in the [prot_finder](/prot_finder) workflow is a
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
173 script, `binary_group_stats.pl`, based upon `po2group_stats.pl`,
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
174 which can calculate overall presence/absence statistics for column
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
175 groups in a delimited TEXT binary matrix (as with genomes here).
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
176
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
177 ## Usage
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
178
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
179 ### [`cds_extractor`](/cds_extractor)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
180
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
181 for i in *.[gbk|embl]; do perl cds_extractor.pl -i $i [-p|-n]; done
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
182
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
183 ### [**Proteinortho5**](http://www.bioinf.uni-leipzig.de/Software/proteinortho/)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
184
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
185 proteinortho5.pl -graph [-synteny] -cpus=# -selfblast -singles -identity=50 -cov=50 -blastParameters='-use_sw_tback [-seg no|-dust no]' *.[faa|ffn]
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
186
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
187 ### po2group_stats
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
188
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
189 perl po2group_stats.pl -i matrix.[proteinortho|poff] -d genome_fasta_dir/ -g group_file.tsv -r result_dir -cut_i 0.7 -cut_e 0.2 -b -p -co genome4.[faa|ffn] -s -u -a > overall_stats.tsv
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
190
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
191 ## Options
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
192
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
193 ### Mandatory options
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
194
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
195 - **-i**=_str_, **-input**=_str_
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
196
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
197 Proteinortho (PO) result matrix (\*.proteinortho or \*.poff)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
198
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
199 - **-d**=_str_, **-dir\_genome**=_str_
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
200
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
201 Path to the directory including the genome multi-FASTA PO input files (\*.faa or \*.ffn), created with [`cds_extractor.pl`](/cds_extractor)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
202
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
203 - **-g**=_str_, **-groups\_file**=_str_
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
204
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
205 Tab-delimited file with group affiliation for the genomes with **minimal two** and **maximal four** groups (easiest to create in a spreadsheet software and save in tab-separated format). **All** genomes from the PO matrix need to be included. Group names can only include alphanumeric (a-z, A-Z, 0-9), underscore (\_), dash (-), and period (.) characters (no whitespaces allowed either). Example format with two genomes in group A, three genomes in group B and D, and one genome in group C:
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
206
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
207 group\_A&emsp;group\_B&emsp;group\_C&emsp;group\_D<br>
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
208 genome1.faa&emsp;genome2.faa&emsp;genome3.faa&emsp;genome4.faa<br>
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
209 genome5.faa&emsp;genome6.faa&emsp;&emsp;genome7.faa<br>
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
210 &emsp;genome8.faa&emsp;&emsp;genome9.faa
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
211
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
212 ### Optional options
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
213
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
214 - **-h**, **-help**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
215
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
216 Help (perldoc POD)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
217
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
218 - **-r**=_str_, **-result\_dir**=_str_
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
219
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
220 Path to result folder \[default = inclusion and exclusion percentage cutoff, './results\_i#\_e#'\]
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
221
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
222 - **-cut\_i**=_float_, **-cut\_inclusion**=_float_
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
223
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
224 Percentage inclusion cutoff for genomes in a group per OG, has to be > 0 and <= 1. Cutoff will be rounded according to the genome number in each group and has to be > the rounded exclusion cutoff in this group. \[default = 0.9\]
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
225
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
226 - **-cut\_e**=_float_, **-cut\_exclusion**=_float_
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
227
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
228 Percentage exclusion cutoff, has to be >= 0 and < 1. Rounded cutoff has to be < rounded inclusion cutoff. \[default = 0.1\]
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
229
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
230 - **-b**, **-binary\_matrix**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
231
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
232 Print a binary matrix with the presence/absence genome group results according to the cutoffs (excluding 'unspecific' category OGs)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
233
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
234 - **-p**, **-plot\_venn**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
235
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
236 Plot venn diagram from the binary matrix (except 'unspecific' and 'underrepresented' categories) with function `venn` from **R** package **gplots**, requires option **-b**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
237
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
238 - **-co**=(_str_), **-core_strict**=(_str_)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
239
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
240 Include 'strict core' category in output. Optionally, give a genome name from the PO matrix to use for the representative output annotation. \[default = topmost genome in first group\]
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
241
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
242 - **-s**, **-singletons**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
243
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
244 Include singletons/ORFans for each genome in the output, activates also overall genome OG/CDS stats in final stats matrix for genomes with singletons
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
245
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
246 - **-u**, **-unspecific**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
247
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
248 Include 'unspecific' category representative annotation file in result directory
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
249
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
250 - **-a**, **-all\_genomes\_overall**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
251
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
252 Report overall stats for all genomes (appended to the final stats matrix), also those without singletons; will include all overall genome stats without option **-s**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
253
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
254 - **-v**, **-version**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
255
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
256 Print version number to *STDERR*
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
257
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
258 ## Output
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
259
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
260 - *STDOUT*
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
261
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
262 The tab-delimited final stats matrix is printed to *STDOUT*. Redirect or pipe into another tool as needed.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
263
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
264 - ./results_i#_e#
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
265
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
266 All output files are stored in a results folder
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
267
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
268 - ./results_i#_e#/[\*_specific|\*_absent|cutoff_core|underrepresented]_OGs.tsv
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
269
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
270 Tab-delimited files with OG annotation from a representative genome for non-optional categories
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
271
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
272 - (./results_i#_e#/[\*_singletons|strict_core|unspecific]_OGs.tsv)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
273
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
274 Optional category tab-delimited output files with representative annotation
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
275
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
276 - (./results_i#_e#/binary_matrix.tsv)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
277
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
278 Tab-delimited binary matrix of group presence/absence results according to cutoffs (excluding 'unspecific' category)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
279
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
280 - (./results_i#_e#/venn_diagram.pdf)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
281
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
282 Venn diagram for non-optional categories (except 'unspecific' and 'underrepresented' categories)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
283
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
284 ## Dependencies
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
285
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
286 - **Statistical computing language [R](http://www.r-project.org/)**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
287
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
288 `Rscript` is needed to plot the venn diagram with option **-p**, tested with version 3.2.2
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
289
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
290 - **gplots (https://cran.r-project.org/web/packages/gplots/index.html)**
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
291
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
292 Package needed for **R** to plot the venn diagram with function `venn`. Tested with **gplots** version 2.17.0.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
293
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
294 ## Run environment
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
295
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
296 The Perl script runs under UNIX and Windows flavors.
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
297
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
298 ## Author - contact
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
299
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
300 Andreas Leimbach (aleimba[at]gmx[dot]de; Microbial Genome Plasticity, Institute of Hygiene, University of Muenster)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
301
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
302 ## Citation, installation, and license
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
303
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
304 For [citation](https://github.com/aleimba/bac-genomics-scripts#citation), [installation](https://github.com/aleimba/bac-genomics-scripts#installation-recommendations), and [license](https://github.com/aleimba/bac-genomics-scripts#license) information please see the repository main [*README.md*](https://github.com/aleimba/bac-genomics-scripts/blob/master/README.md).
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
305
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
306 ## Changelog
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
307
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
308 * v0.1.3 (06.06.2016)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
309 * included check for file system conformity for group names
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
310 * some minor syntax changes and additions to error messages, basically adapting to [`binary_group_stats.pl`](/prot_finder)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
311 * v0.1.2 (19.11.2015)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
312 * added `pod2usage`-die for Getopts::Long call
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
313 * minor POD/README change
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
314 * v0.1.1 (30.10.2015)
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
315 * fixed bug for representative annotation in output files, the representative genome was not chosen according to genome order in the groups file
e42d30da7a74 Uploaded
dereeper
parents:
diff changeset
316 * v0.1 (23.10.2015)