Skip to content

Commit

Permalink
Merge pull request #3 from labgem/dev
Browse files Browse the repository at this point in the history
Update Readme et fix writting graphML
  • Loading branch information
baudstam authored Feb 14, 2023
2 parents 0f75b12 + 9b7553b commit d7cf5ff
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 34 deletions.
47 changes: 16 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,45 @@
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/netsyn/README.html)
[![installs](https://img.shields.io/conda/dn/bioconda/netsyn.svg?style=flag&label=BioConda%20install)](https://anaconda.org/bioconda/netsyn)

# NetSyn: detect synteny conservation among a list of protein targets

NetSyn is a tool to detect conserved genomic contexts (i.e. synteny conservation) among a set of protein (call protein targets). Synteny are computed using a re-implementation of the method described in Boyer *et al.* article ([https://doi.org/10.1093/bioinformatics/bti711](https://doi.org/10.1093/bioinformatics/bti711)).

## Installation

Prerequisites: python 3.8 and MMseqs2.

Netsyn installation: `python3 setup.py install`

For the installation of MMseqs2 please refer to https://github.com/soedinglab/MMseqs2/wiki#installation

Python library list:

- pyyaml

- igraph
### Installation with BioConda

- jsonschema
Netsyn can be easilly installed with bioconda

- networkx (>= 2.8)
```bash

- markov_clustering
conda create -n netsyn -c bioconda netsyn

- urllib3

- biopython

- requests

You can easely install NetSyn using an virtual environment with pip (command lines example below):

- virtualenv venv_netsyn
```

- source venv_netsyn/bin/activate

- pip install pyyaml
### Manual installation

- pip install igraph
You can easely install NetSyn with pip. Netsyn requires python >= 3.8

- pip install jsonschema
```bash

- pip install networkx
git clone https://github.com/labgem/netsyn

- pip install markov_clustering
pip install netsyn/

- pip install urllib3
```

- git clone https://github.com/labgem/netsyn
Netsyn requires MMseqs2 as a 3rd party software which must be installed and executable. For the installation of MMseqs2 please refer to https://github.com/soedinglab/MMseqs2/wiki#installation

- python3 setup.py install

## Basic Usage

NetSyn can be used with 2 different input file formats. One is a file containing a list of UniProt accessions (`-u` option), while the other one is a correspondences file (`-c` option). The two types of file are described in the Input Data part. It is possible to start an analysis with both input file formats. It leads to 3 NetSyn basic usage callings:

- with the UniProt accessions list:
- with the UniProt accessions list:
`netsyn -u <UniProtAC.list> -o <OutputDirName>`

- with the correspondences file:
Expand Down
7 changes: 6 additions & 1 deletion netsyn/netsyn_dataExport.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import logging
import os
import igraph as ig
import networkx as nx
import re
#############
# Functions #
Expand Down Expand Up @@ -638,7 +639,11 @@ def run(nodesFile, edgesFile, organismsFile, proteinsFile, metadataFile, redunda

mergeResultIntoHTML(
htmlOut, common.global_dict['htmlTemplate'], common.global_dict['jsTemplate'], netsynResult)
full_graph.write_graphml(graphmlOut)

# full_graph.write_graphml(graphmlOut)
logger.debug('Writting graphML output...')
full_graph_nx = full_graph.to_networkx()
nx.write_graphml_lxml(full_graph_nx, graphmlOut, named_key_ids=True)

# COM: Storage of information to write ClusteringSynthesis files
logger.info('Analysis synthesis process...')
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@
'pyyaml',
'python-igraph',
'jsonschema',
'networkx',
'networkx>=2.8',
'markov_clustering',
'urllib3',
'biopython',
'requests'
],

include_package_data=True,

url='http://github.com/labgem/netsyn',

classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)',
'Topic :: Scientific/Engineering :: Bio-Informatics'
],
Expand Down

0 comments on commit d7cf5ff

Please sign in to comment.