Skip to main content

Cluster DNA Sequences based on orthology

Project description

REPORTH

List of Contents

Installation

The tool can be installed with the command:

pip install reporth

Introduction

repin_clusterer is a tool developed for the clustering of REPIN sequences based on their position in the genome. REPIN Sequences that are present in orthologous regions will be placed in the same cluster. The orthology is determined based on the similarity of the nucleotide sequence that flanks either side of the REPIN.
See also: rarefan.evolbio.mpg.de

Process of REPIN Clustering

Using this tool

The tool can be run with the command:

reporth --repin all_repins.txt --genomes genomes/ --out output_dir --reptypes 1,2
Tag Function Default
repin path to the text file containing REPIN sequences or RAREFAN Dir None
genomes path to the directory containing all the genome sequences None
out path to where the output file should be stored ./cluster_output_[date]_[run-id]/
reptypes Mention the specific repin types to accept from rarefan output None
win begin flanking region after. This means that if the REPIN starts at 'x' and ends at 'y', the flanking region will begin at 'x-250' and from 'y+250' 250
fsize length of the flanking region to consider 1000
pident percentage sequence similarity that needs to be met 90(%)
coverage minimum length of sequence that has to align/match 90(%)

**Note**: 1. Each tag in the command begins with two '-' dash characters followed by a space and then the argument (see example above) 2. For --reptypes, the numbers should be written separated by a comma without a space between the values

Clustering Parameters

Example Dataset

We have created an example dataset for you to understand how to use the software and for a demonstration.
Download the sample input dataset from the link below.
Install reporth and run using the command as mentioned above.
The output will be stored in the cluster_output_[date]_[run-id] directory in the format as mentioned below.
Download Test Dataset

Input Format

RAREFAN Output

When a RAREFAN output directory is provided as input REPORTH will go through the RAREFAN output folder and find all genomes directories ([genome]_[x]/) where x is any digit signifying the type of REP. Using the ‘--reptype' tag, the range of x can be specified. Within these folders the locations listed in the files [genome]_[x].ss are parsed.

reporth --repin rarefan_output_dir --genomes genomes --reptypes 0,1,2

List of REPINs as input

The input files that are required are by software:

  1. List of REPIN Sequences with position
  2. List of all genomes whose REPINs are provided.
#### Note
  1. If there are REPINs whose genome sequence files are not provided, those REPINs will be dropped from the analysis
  2. The file containing REPIN sequences should be formatted such that each line contains (only) the following information:
    genome_name repin_start repin_end repin_type repin_sequence
    Ex: `TAMOak81 1008421 1008530 type0
    Pb-St2 1008000 1008123 type0`
  3. It is preferrable to provide the genome sequences in fasta format.
> reporth --repin listofrepins.txt --genomes genomes --reptypes 0,1,2

Output Format

The primary output file clusters_[date].txt is very similar to the input file with the addition of a number at the beginning of the link representing the cluster number.

num genome_name repin_start repin_end repin_type
0 chlTAMOak81 1008421 1008530 type0

Implying that this particular REPIN belongs to cluster number 0 and so on.

Output File Description of contents
clusters_[date].txt Listing all repetitive elements with unique cluster ID
meta_cluster_[date].txt Lists the sequence similarity of the flanking sequences of a REPIN with the flanking sequences of each other REPIN in a cluster (in the order they are present in the cluster file)
lhs_hits.p/rhs_hits.p Pickle(python package) file storing the BLAST results of all flanking sequences
store_nearby_repins.p Pickle(python package) file storing the flanking sequences and their corresponding BLAST hits and the presence of REPINs near these flanking sequences
flanking_pairwise_dists.p Stores the pairwise distances between all flanking sequences from the BLAST hits
path_making_[date].txt File listing whether a REPIN was merged into a cluster because of left flanking sequence/right flanking sequence or both

Python packages used

Biopython
Cock, P. J., Antao, T., Chang, J. T., Chapman, B. A., Cox, C. J., Dalke, A., … others. (2009). Biopython: freely available Python tools for computational molecular biology and bioinformatics. Bioinformatics, 25(11), 1422–1423.
Pickle
Van Rossum, G. (2020). The Python Library Reference, release 3.8.2. Python Software Foundation.
Networkx
Hagberg, A., Swart, P., & S Chult, D. (2008). Exploring network structure, dynamics, and function using NetworkX.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reporth-2.1.1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reporth-2.1.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file reporth-2.1.1.tar.gz.

File metadata

  • Download URL: reporth-2.1.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for reporth-2.1.1.tar.gz
Algorithm Hash digest
SHA256 3711d34e21cb786df270221a33f01fe94612d5f1f3302c4122773bb10dd03206
MD5 a841fa52390992da99f2a4efdcf62db4
BLAKE2b-256 99930fd850265f18d05768d42779085b85855a4383b25dce870c70e500c7c0cb

See more details on using hashes here.

File details

Details for the file reporth-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: reporth-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for reporth-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbf0115a19295fd1f4e86528fb5e4c2efbbf546c482bcb95b3a37b6919e485ac
MD5 71f8f772c08332a24575504f7d334d49
BLAKE2b-256 71c8bc17e064420a40b578406286fab2f23353b0f5365a96342be0fc172188fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page