Skip to content

Commit

Permalink
Merge pull request #39 from Rappsilber-Laboratory/rework-dependencies
Browse files Browse the repository at this point in the history
simplify repository
  • Loading branch information
gieses authored Feb 26, 2021
2 parents f10aa7a + f91ea73 commit 6b2f79b
Show file tree
Hide file tree
Showing 30 changed files with 33,465 additions and 60,672 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ snakemake
.Python
pipenv
build/
sample_run/
results/
tests/results/
intern_data/
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "pypi"

[packages]
numpy = "*"
pandas = "1.0.5"
pandas = "*"
pyteomics = "*"
sklearn = "*"
tensorflow = "*"
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,23 @@ Conda will take care of the CUDA libraries and other dependencies. Note, xiRT ru
or GPUs. To use a GPU specify CuDNNGRU/CuDNNLSTM as type in the LSTM settings, to use a CPU set the
type to GRU/LSTM.

> conda create --name xirt_env python=3.7
> conda create --name xirt_env python=3.8
>
>conda activate xirt_env
>
> pip install xirt
>
> conda install tensorflow-gpu

Hint:
The plotting functionality for the network is not enabled per default because
pydot and graphviz sometimes make trouble when they are installed via pip. If on linux,
simply use *sudo apt-get install graphviz*, on windows download latest graphviz package from
[here](https://www2.graphviz.org/Packages/stable/windows/), unzip the content of the file and the
*bin* directory path to the windows PATH variable. These two packages allow the vizualization
of the neural network architecture. If this feature is not desired, the steps above can be omitted.
*bin* directory path to the windows PATH variable. These two packages allow the visualization
of the neural network architecture. xiRT will function also without this functionality.

Older versions of TensorFlow will require the separate installation of tensorflow-gpu. We recommend
to install tensorflow in conda, especially if GPU usage is desired.

#### Usage
The command line interface (CLI) requires three inputs:
Expand All @@ -97,7 +100,7 @@ The command line interface (CLI) requires three inputs:
3) another YAML file to configure the general training / prediction behaviour, called setup-config

Probed configs are either available via github or up-to-date configs can be generated from the
xirt package itself. To generate documented example configs, run the following commands and adapt
xiRT package itself. To generate documented example configs, run the following commands and adapt
the configs to your needs.

> xirt -p learning_params.yaml
Expand Down Expand Up @@ -125,15 +128,18 @@ Please find a working example / quick-start guide [here](https://xirt.readthedoc
| peptide sequence 2 | Peptide2 | Second peptide sequence for crosslinks, or empty | ELRVIS |
| fasta description 1 | Fasta1 | FASTA header / description of protein 1 | SUCD_ECOLI Succinate--CoA ligase [ADP-forming] |
| fasta description 2 | Fasta2 | FASTA header / description of protein 2 | SUCC_ECOLI Succinate--CoA ligase [ADP-forming] |
| PSMID | PSMID | A unique identifier for the identification | 1 |
| link site 1 | LinkPos1 | Crosslink position in the first peptide (0-based) | 3 |
| link site 2 | LinkPos2 | Crosslink position in the second peptide (0-based | 2 |
| score | score | Single score from the search engine | 17.12 |
| unique id | PSMID | A unique index for each entry in the result table | 0 |
| TT | isTT | Binary column which is True for any TT identification and False for TD, DD ids | True |
| TT | isTT | Binary column which is True for any TT | True |
| TD | isTD | Binary column which is True for any TD | True |
| DD | isDD | Binary column which is True for any DD | True |
| fdr | fdr | Estimated false discovery rate | 0.01 |

The first four columns should be self explanatory, if not check the [sample input](https://github.com/Rappsilber-Laboratory/xiRT/tree/master/sample_data).
The fifth column ("PSMID") is a unique(!) integer that can be used as to retrieve CSMs. In addition,
The fifth column ("PSMID") is a unique(!) integer that can be used as to retrieve CSMs/PSMs. In addition,
depending on the number retention time domains that should be learned/predicted the RT columns
need to be present. The column names need to match the configuration in the network parameter yaml.
Note that xiRT swaps the sequences such that peptide1 is longer than peptide 2. In order to
Expand Down
43 changes: 23 additions & 20 deletions documentation/source/installation.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
Installation
==============
To install xiRT simply run the command below. We recommend to use an isolated python environment,
for example by using pipenv or conda.

Pipenv
******
To use pipenv as package manager, first make sure that pipenv is installed and run::
#### Installation
To install xiRT simply run the command below. We recommend to use an isolated python environment,
for example by using pipenv **or** conda. Installation should finish within minutes.

Using pipenv:
>pipenv shell
>
>pip install xirt

conda
*****

To enable CUDA support, the easiest thing is to create a conda environment. Conda will take care of
the CUDA libraries and other dependencies::
To enable CUDA support, using a [conda environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands) is the easiest solution.
Conda will take care of the CUDA libraries and other dependencies. Note, xiRT runs either on CPUs
or GPUs. To use a GPU specify CuDNNGRU/CuDNNLSTM as type in the LSTM settings, to use a CPU set the
type to GRU/LSTM.

>conda create --name xirt_env python=3.7
> conda create --name xirt_env python=3.8
>
>conda activate xirt_env
>pip install xirt
>conda install tensorflow-gpu
>
> pip install xirt


Hint
*****
pydot and graphviz sometimes make trouble when they are installed via pip. If on debian,
Hint:
The plotting functionality for the network is not enabled per default because
pydot and graphviz sometimes make trouble when they are installed via pip. If on linux,
simply use *sudo apt-get install graphviz*, on windows download latest graphviz package from
[here](https://www2.graphviz.org/Packages/stable/windows/), unzip the content of the file, and then
add the *bin* directory from the graphviz folder to the windows PATH variable.
[here](https://www2.graphviz.org/Packages/stable/windows/), unzip the content of the file and the
*bin* directory path to the windows PATH variable. These two packages allow the visualization
of the neural network architecture. xiRT will function also without this functionality.

Older versions of TensorFlow will require the separate installation of tensorflow-gpu. We recommend
to install tensorflow in conda, especially if GPU usage is desired.
4 changes: 2 additions & 2 deletions documentation/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Quick start

The GitHub repository contains a few example files. Download the following files from `HERE <https://github.com/Rappsilber-Laboratory/xiRT/tree/master/sample_data>`_:

- DSS_xisearch_fdr_CSM50percent.csv
- DSS_xisearch_fdr_CSM50percent_minimal.csv
- xirt_params_3RT.yaml
- learning_params_training_cv.yaml

Expand All @@ -46,7 +46,7 @@ To run xiRT on the data call the main function as follows after successfull inst

.. code-block:: console
> xirt -i DSS_xisearch_fdr_CSM50percent.csv -o xirt_results22/ -x xirt_params_rp.yaml -l learning_params_training_cv.yaml
> xirt -i DSS_xisearch_fdr_CSM50percent_minimal.csv -o xirt_results22/ -x xirt_params_rp.yaml -l learning_params_training_cv.yaml
Expand Down
158 changes: 0 additions & 158 deletions requirements_versions.txt

This file was deleted.

Loading

0 comments on commit 6b2f79b

Please sign in to comment.