summaryrefslogtreecommitdiff
path: root/python-greedyfas.spec
blob: 9e3b22b02ec7e03ac81e4b7bd482bfad39775f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
%global _empty_manifest_terminate_build 0
Name:		python-greedyFAS
Version:	1.17.2
Release:	1
Summary:	A tool to compare protein feature architectures
License:	GPL-3.0
URL:		https://github.com/BIONF/FAS
Source0:	https://mirrors.aliyun.com/pypi/web/packages/0d/28/b69f2e0224af73bd552febe8b6c572866268d0b94a0fc9a224b8e9100c14/greedyFAS-1.17.2.tar.gz
BuildArch:	noarch

Requires:	python3-biopython
Requires:	python3-tqdm
Requires:	python3-graphviz
Requires:	python3-gnureadline
Requires:	python3-GitPython
Requires:	python3-pathlib

%description
# FAS - Feature Architecture Similarity
[![PyPI version](https://badge.fury.io/py/greedyFAS.svg)](https://badge.fury.io/py/greedyFAS)
[![GPLv3-license](https://anaconda.org/bionf/hamstr/badges/license.svg)](https://www.gnu.org/licenses/gpl-3.0.de.html)
![Github Build](https://github.com/BIONF/FAS/workflows/build/badge.svg)

FAS is a new release of the original [FACT](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-11-417) algorithm. It calculates the so called FAS-score which is a measure of how similar the feature architectures of two proteins are. This is done by combining the Multiplicity Score (MS) and the Positional Score (PS) from FACT. Unlike the original FACT, FAS can resolve feature architectures that have overlapping features by searching for the best overlap-free path. This can be done either extensively or by using the priority mode, a greedy approach. FAS also allows for more options in the weighting of features.

# Table of Contents
* [Installation](#installation)
* [Usage](#usage)
  * [Annotate protein features](#annotate-protein-features)
  * [Compare protein feature architectures](#compare-protein-feature-architectures)
* [Additional Information](#additional-information)
* [Contributors](#contributors)
* [Contact](#contact)

# Installation

FAS is provided as a python package and compatible with **Python3**.

You can install FAS with pip:
```
python3 -m pip install greedyFAS
```

(\*) In case you **do not have admin rights**, and don't use package systems like Anaconda to manage environments you need to use the **--user** option (not recommended):
```
python3 -m pip install --user greedyFAS
```

and then add the following line to the end of your `.bashrc` or `.bash_profile` file, restart the current terminal to apply the change:
```
export PATH=$HOME/.local/bin:$PATH
```

# Usage

## Download and install annotation tools
Before using FAS, some annotation tools and databases need to be installed. FAS' standard databases/annotation tools are: [PFAM](https://www.ebi.ac.uk/interpro/download/Pfam/), [SMART](https://software.embl-em.de/software/18), [fLPS](http://biology.mcgill.ca/faculty/harrison/flps.html), [SEG](https://mendel.imp.ac.at/METHODS/seg.server.html), [COILS](https://mybiosoftware.com/coils-2-2-prediction-coiled-coil-regions-proteins.html), [THMHH 2.0c](http://www.cbs.dtu.dk/services/TMHMM/) and [SignalP 4.1g](http://www.cbs.dtu.dk/services/SignalP/). To get these tools and make a configuration file for FAS, please use the `setupFAS` function:
```
fas.setup -t /directory/where/you/want/to/save/annotation/tools
```
Inside the output directory you will find a file called *annoTools.txt* that contains all installed annotation tools. If you wish to discard any of them from the annotation process, you can just remove the unneeded tools from that file.

*Please read our [wiki page of setupFAS](https://github.com/BIONF/FAS/wiki/setupFAS) for other use-cases, such as how to use your old annotation tools with the new FAS, etc.*

__*NOTE: we provide compiled code only for PFAM, COILS and SEG. fLPS will be automatically downloaded and installed. For SMART, you need to download it from [EMBLEM](https://software.embl-em.de/software/18) and give the path to `fas.setup`. For TMHMM and SignalP, you can decide if you want to include those two tools to the annotation step (recommended) or ignore them. For using TMHMM version 2.0c and SignalP version 4.1g, you need to request a license from the authors at https://services.healthtech.dtu.dk, and save the downloaded files in the same directory. FAS will do the rest for you ;-)*__

__*NOTE2: SignalP 5.0b is not supported yet!!!*__

We suggest you test the annotation tools by running this command:
```
fas.doAnno -i test_annofas.fa -o test_output
```
*`test_annofas.fa` is a demo multiple fasta file, which is saved in the installed greedyFAS directory.*

## Perform feature annotation

If you only want to annotate your protein sequences without calculating the FAS scores, you can use the `doAnno` function.

```
fas.doAnno --fasta your_proteins.fa --outPath /annotation/path/
```

The annotation output (`your_proteins.json` by default) will be saved in `/annotation/path/`.

Alternatively, you can do the annotation using [InterProScan](https://www.ebi.ac.uk/interpro/about/interproscan/) and use the function `parseAnno` to convert the InterProScan's *tsv* output into *json format* for using with FAS.

```
fas.parseAnno -i INPUT.tsv -o /annotation/path/INPUT.json -t <tool_name> -f <feature columns> ...
```

Please check the usage of `parseAnno` for more info (using `fas.parseAnno -h`).

## Compare protein feature architectures

The main purpose of FAS is to calculate the similarity score between 2 given proteins (or two list of proteins). This can be done using the `run` function.

```
fas.run -s seed.fa -q query.fa -a /annotation/path/ -o /output/path/
```
If the annotations of *seed* and *query* protein(s) already exist in `/annotation/path/` (*seed.json* and *query.json*, respectively), `run` will use these annotations for calculating the FAS scores. Otherwise, it will first annotate the proteins and then compare the feature architectures of those two protein sets.

# Additional Information

A thorough guide to all FAS commands and options can be found at [our WIKI page](https://github.com/BIONF/FAS/wiki).

# Contributors
- [Ingo Ebersberger](https://github.com/ebersber)
- [Julian Dosch](https://github.com/JuRuDo)
- [Holger Bergmann](https://github.com/holgerbgm)
- [Vinh Tran](https://github.com/trvinh)

# Contact
Julian Dosch dosch@bio.uni-frankfurt.de

Ingo Ebersberger ebersberger@bio.uni-frankfurt.de




%package -n python3-greedyFAS
Summary:	A tool to compare protein feature architectures
Provides:	python-greedyFAS
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-greedyFAS
# FAS - Feature Architecture Similarity
[![PyPI version](https://badge.fury.io/py/greedyFAS.svg)](https://badge.fury.io/py/greedyFAS)
[![GPLv3-license](https://anaconda.org/bionf/hamstr/badges/license.svg)](https://www.gnu.org/licenses/gpl-3.0.de.html)
![Github Build](https://github.com/BIONF/FAS/workflows/build/badge.svg)

FAS is a new release of the original [FACT](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-11-417) algorithm. It calculates the so called FAS-score which is a measure of how similar the feature architectures of two proteins are. This is done by combining the Multiplicity Score (MS) and the Positional Score (PS) from FACT. Unlike the original FACT, FAS can resolve feature architectures that have overlapping features by searching for the best overlap-free path. This can be done either extensively or by using the priority mode, a greedy approach. FAS also allows for more options in the weighting of features.

# Table of Contents
* [Installation](#installation)
* [Usage](#usage)
  * [Annotate protein features](#annotate-protein-features)
  * [Compare protein feature architectures](#compare-protein-feature-architectures)
* [Additional Information](#additional-information)
* [Contributors](#contributors)
* [Contact](#contact)

# Installation

FAS is provided as a python package and compatible with **Python3**.

You can install FAS with pip:
```
python3 -m pip install greedyFAS
```

(\*) In case you **do not have admin rights**, and don't use package systems like Anaconda to manage environments you need to use the **--user** option (not recommended):
```
python3 -m pip install --user greedyFAS
```

and then add the following line to the end of your `.bashrc` or `.bash_profile` file, restart the current terminal to apply the change:
```
export PATH=$HOME/.local/bin:$PATH
```

# Usage

## Download and install annotation tools
Before using FAS, some annotation tools and databases need to be installed. FAS' standard databases/annotation tools are: [PFAM](https://www.ebi.ac.uk/interpro/download/Pfam/), [SMART](https://software.embl-em.de/software/18), [fLPS](http://biology.mcgill.ca/faculty/harrison/flps.html), [SEG](https://mendel.imp.ac.at/METHODS/seg.server.html), [COILS](https://mybiosoftware.com/coils-2-2-prediction-coiled-coil-regions-proteins.html), [THMHH 2.0c](http://www.cbs.dtu.dk/services/TMHMM/) and [SignalP 4.1g](http://www.cbs.dtu.dk/services/SignalP/). To get these tools and make a configuration file for FAS, please use the `setupFAS` function:
```
fas.setup -t /directory/where/you/want/to/save/annotation/tools
```
Inside the output directory you will find a file called *annoTools.txt* that contains all installed annotation tools. If you wish to discard any of them from the annotation process, you can just remove the unneeded tools from that file.

*Please read our [wiki page of setupFAS](https://github.com/BIONF/FAS/wiki/setupFAS) for other use-cases, such as how to use your old annotation tools with the new FAS, etc.*

__*NOTE: we provide compiled code only for PFAM, COILS and SEG. fLPS will be automatically downloaded and installed. For SMART, you need to download it from [EMBLEM](https://software.embl-em.de/software/18) and give the path to `fas.setup`. For TMHMM and SignalP, you can decide if you want to include those two tools to the annotation step (recommended) or ignore them. For using TMHMM version 2.0c and SignalP version 4.1g, you need to request a license from the authors at https://services.healthtech.dtu.dk, and save the downloaded files in the same directory. FAS will do the rest for you ;-)*__

__*NOTE2: SignalP 5.0b is not supported yet!!!*__

We suggest you test the annotation tools by running this command:
```
fas.doAnno -i test_annofas.fa -o test_output
```
*`test_annofas.fa` is a demo multiple fasta file, which is saved in the installed greedyFAS directory.*

## Perform feature annotation

If you only want to annotate your protein sequences without calculating the FAS scores, you can use the `doAnno` function.

```
fas.doAnno --fasta your_proteins.fa --outPath /annotation/path/
```

The annotation output (`your_proteins.json` by default) will be saved in `/annotation/path/`.

Alternatively, you can do the annotation using [InterProScan](https://www.ebi.ac.uk/interpro/about/interproscan/) and use the function `parseAnno` to convert the InterProScan's *tsv* output into *json format* for using with FAS.

```
fas.parseAnno -i INPUT.tsv -o /annotation/path/INPUT.json -t <tool_name> -f <feature columns> ...
```

Please check the usage of `parseAnno` for more info (using `fas.parseAnno -h`).

## Compare protein feature architectures

The main purpose of FAS is to calculate the similarity score between 2 given proteins (or two list of proteins). This can be done using the `run` function.

```
fas.run -s seed.fa -q query.fa -a /annotation/path/ -o /output/path/
```
If the annotations of *seed* and *query* protein(s) already exist in `/annotation/path/` (*seed.json* and *query.json*, respectively), `run` will use these annotations for calculating the FAS scores. Otherwise, it will first annotate the proteins and then compare the feature architectures of those two protein sets.

# Additional Information

A thorough guide to all FAS commands and options can be found at [our WIKI page](https://github.com/BIONF/FAS/wiki).

# Contributors
- [Ingo Ebersberger](https://github.com/ebersber)
- [Julian Dosch](https://github.com/JuRuDo)
- [Holger Bergmann](https://github.com/holgerbgm)
- [Vinh Tran](https://github.com/trvinh)

# Contact
Julian Dosch dosch@bio.uni-frankfurt.de

Ingo Ebersberger ebersberger@bio.uni-frankfurt.de




%package help
Summary:	Development documents and examples for greedyFAS
Provides:	python3-greedyFAS-doc
%description help
# FAS - Feature Architecture Similarity
[![PyPI version](https://badge.fury.io/py/greedyFAS.svg)](https://badge.fury.io/py/greedyFAS)
[![GPLv3-license](https://anaconda.org/bionf/hamstr/badges/license.svg)](https://www.gnu.org/licenses/gpl-3.0.de.html)
![Github Build](https://github.com/BIONF/FAS/workflows/build/badge.svg)

FAS is a new release of the original [FACT](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-11-417) algorithm. It calculates the so called FAS-score which is a measure of how similar the feature architectures of two proteins are. This is done by combining the Multiplicity Score (MS) and the Positional Score (PS) from FACT. Unlike the original FACT, FAS can resolve feature architectures that have overlapping features by searching for the best overlap-free path. This can be done either extensively or by using the priority mode, a greedy approach. FAS also allows for more options in the weighting of features.

# Table of Contents
* [Installation](#installation)
* [Usage](#usage)
  * [Annotate protein features](#annotate-protein-features)
  * [Compare protein feature architectures](#compare-protein-feature-architectures)
* [Additional Information](#additional-information)
* [Contributors](#contributors)
* [Contact](#contact)

# Installation

FAS is provided as a python package and compatible with **Python3**.

You can install FAS with pip:
```
python3 -m pip install greedyFAS
```

(\*) In case you **do not have admin rights**, and don't use package systems like Anaconda to manage environments you need to use the **--user** option (not recommended):
```
python3 -m pip install --user greedyFAS
```

and then add the following line to the end of your `.bashrc` or `.bash_profile` file, restart the current terminal to apply the change:
```
export PATH=$HOME/.local/bin:$PATH
```

# Usage

## Download and install annotation tools
Before using FAS, some annotation tools and databases need to be installed. FAS' standard databases/annotation tools are: [PFAM](https://www.ebi.ac.uk/interpro/download/Pfam/), [SMART](https://software.embl-em.de/software/18), [fLPS](http://biology.mcgill.ca/faculty/harrison/flps.html), [SEG](https://mendel.imp.ac.at/METHODS/seg.server.html), [COILS](https://mybiosoftware.com/coils-2-2-prediction-coiled-coil-regions-proteins.html), [THMHH 2.0c](http://www.cbs.dtu.dk/services/TMHMM/) and [SignalP 4.1g](http://www.cbs.dtu.dk/services/SignalP/). To get these tools and make a configuration file for FAS, please use the `setupFAS` function:
```
fas.setup -t /directory/where/you/want/to/save/annotation/tools
```
Inside the output directory you will find a file called *annoTools.txt* that contains all installed annotation tools. If you wish to discard any of them from the annotation process, you can just remove the unneeded tools from that file.

*Please read our [wiki page of setupFAS](https://github.com/BIONF/FAS/wiki/setupFAS) for other use-cases, such as how to use your old annotation tools with the new FAS, etc.*

__*NOTE: we provide compiled code only for PFAM, COILS and SEG. fLPS will be automatically downloaded and installed. For SMART, you need to download it from [EMBLEM](https://software.embl-em.de/software/18) and give the path to `fas.setup`. For TMHMM and SignalP, you can decide if you want to include those two tools to the annotation step (recommended) or ignore them. For using TMHMM version 2.0c and SignalP version 4.1g, you need to request a license from the authors at https://services.healthtech.dtu.dk, and save the downloaded files in the same directory. FAS will do the rest for you ;-)*__

__*NOTE2: SignalP 5.0b is not supported yet!!!*__

We suggest you test the annotation tools by running this command:
```
fas.doAnno -i test_annofas.fa -o test_output
```
*`test_annofas.fa` is a demo multiple fasta file, which is saved in the installed greedyFAS directory.*

## Perform feature annotation

If you only want to annotate your protein sequences without calculating the FAS scores, you can use the `doAnno` function.

```
fas.doAnno --fasta your_proteins.fa --outPath /annotation/path/
```

The annotation output (`your_proteins.json` by default) will be saved in `/annotation/path/`.

Alternatively, you can do the annotation using [InterProScan](https://www.ebi.ac.uk/interpro/about/interproscan/) and use the function `parseAnno` to convert the InterProScan's *tsv* output into *json format* for using with FAS.

```
fas.parseAnno -i INPUT.tsv -o /annotation/path/INPUT.json -t <tool_name> -f <feature columns> ...
```

Please check the usage of `parseAnno` for more info (using `fas.parseAnno -h`).

## Compare protein feature architectures

The main purpose of FAS is to calculate the similarity score between 2 given proteins (or two list of proteins). This can be done using the `run` function.

```
fas.run -s seed.fa -q query.fa -a /annotation/path/ -o /output/path/
```
If the annotations of *seed* and *query* protein(s) already exist in `/annotation/path/` (*seed.json* and *query.json*, respectively), `run` will use these annotations for calculating the FAS scores. Otherwise, it will first annotate the proteins and then compare the feature architectures of those two protein sets.

# Additional Information

A thorough guide to all FAS commands and options can be found at [our WIKI page](https://github.com/BIONF/FAS/wiki).

# Contributors
- [Ingo Ebersberger](https://github.com/ebersber)
- [Julian Dosch](https://github.com/JuRuDo)
- [Holger Bergmann](https://github.com/holgerbgm)
- [Vinh Tran](https://github.com/trvinh)

# Contact
Julian Dosch dosch@bio.uni-frankfurt.de

Ingo Ebersberger ebersberger@bio.uni-frankfurt.de




%prep
%autosetup -n greedyFAS-1.17.2

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-greedyFAS -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Fri Jun 09 2023 Python_Bot <Python_Bot@openeuler.org> - 1.17.2-1
- Package Spec generated