Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hitbc/rMETL
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: V1.0.3
Choose a base ref
...
head repository: hitbc/rMETL
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 15 commits
  • 13 files changed
  • 1 contributor

Commits on Jul 16, 2019

  1. Update rMETL_extraction.py

    Fix a bug raising "AttributeError" on stage Detection.
    tjiangHIT authored Jul 16, 2019
    Copy the full SHA
    6f58b83 View commit details
  2. Update rMETL_extraction.py

    Fix a bug raising "AttributeError".
    tjiangHIT authored Jul 16, 2019
    Copy the full SHA
    a0f0cb7 View commit details

Commits on Sep 18, 2019

  1. Update README.md

    Update citation.
    tjiangHIT authored Sep 18, 2019
    Copy the full SHA
    cf7a822 View commit details
  2. Merge pull request #9 from tjiangHIT/master

    Update RADEME.md
    tjiangHIT authored Sep 18, 2019
    Copy the full SHA
    1a97206 View commit details

Commits on Sep 24, 2019

  1. Update rMETL_version.py

    tjiangHIT authored Sep 24, 2019
    Copy the full SHA
    80fd136 View commit details
  2. Update setup.py

    tjiangHIT authored Sep 24, 2019
    Copy the full SHA
    1738e7a View commit details
  3. Update setup.py

    tjiangHIT authored Sep 24, 2019
    Copy the full SHA
    8c5073f View commit details
  4. Update setup.py

    tjiangHIT authored Sep 24, 2019
    Copy the full SHA
    38a4f9f View commit details
  5. test setup.py

    tjiangHIT committed Sep 24, 2019
    Copy the full SHA
    487bcd6 View commit details
  6. upgrade installation

    tjiangHIT committed Sep 24, 2019
    Copy the full SHA
    8c92ce5 View commit details

Commits on Sep 25, 2019

  1. Update README.md

    tjiangHIT authored Sep 25, 2019
    Copy the full SHA
    a1b8d2e View commit details
  2. Merge pull request #10 from tjiangHIT/master

    Update installation
    tjiangHIT authored Sep 25, 2019
    Copy the full SHA
    23a239f View commit details

Commits on Sep 27, 2019

  1. correct descriptions

    tjiangHIT committed Sep 27, 2019
    Copy the full SHA
    0ab164c View commit details

Commits on Oct 4, 2019

  1. Update README.md

    tjiangHIT authored Oct 4, 2019
    Copy the full SHA
    538c0e4 View commit details
  2. Merge pull request #11 from tjiangHIT/master

    Update
    tjiangHIT authored Oct 4, 2019
    Copy the full SHA
    1b6b841 View commit details
4 changes: 0 additions & 4 deletions INSTALL.sh

This file was deleted.

33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# rMETL:
rMETL - realignment-based Mobile Element insertion detection Tool for Long read

---
### Getting Start
__ __ ______ _________ _
_ __ | \ / | | ____| |___ ___| | |
| ^__| | \ / | | |___ | | | |
| | | |\ \ / /| | | ___| | | | |
| | | | \ \/ / | | | |____ | | | |____
|_| |_| \__/ |_| |______| |_| |______|

$ git clone https://github.com/tjiangHIT/rMETL.git (git clone https://github.com/hitbc/rMETL.git)
$ cd rMETL/
$ bash INSTALL.sh
$ ./rMETL.py
rMETL - realignment-based Mobile Element insertion detection Tool for Long read

[![PyPI version](https://badge.fury.io/py/rMETL.svg)](https://badge.fury.io/py/rMETL)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/rmetl/badges/version.svg)](https://anaconda.org/bioconda/rmetl)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/rmetl/badges/license.svg)](https://anaconda.org/bioconda/rmetl)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/rmetl/badges/platforms.svg)](https://anaconda.org/bioconda/rmetl)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/rmetl/badges/latest_release_date.svg)](https://anaconda.org/bioconda/rmetl)

---
### Introduction
@@ -45,10 +42,18 @@ Its peak memory footprint is about 7.05 Gigabytes (default setting), on a server
---
### Installation

#install via pip
$ pip install rMETL

#install via conda
$ conda install -c bioconda rmetl

#install from github
$ git clone https://github.com/tjiangHIT/rMETL.git (git clone https://github.com/hitbc/rMETL.git)
$ cd rMETL/
$ pip install .

Current version of rMETL has been tested on 64bit Linux operating system.
The source code is written in python, and can be directly download from: https://github.com/hitbc/rMETL
A mirror is also in: https://github.com/tjiangHIT/rMETL
The INSTALL.sh is attached. Use the bash command for generating the executable file.

---
### Synopsis
@@ -102,7 +107,7 @@ Strongly recommend making output directory manually at first.:blush:
---
### Citation
If you use rMETL, please cite:
> Tao Jiang *et al*; rMETL: sensitive mobile element insertion detection with long read realignment, *Bioinformatics*, , btz106, https://doi.org/10.1093/bioinformatics/btz106
> Tao Jiang *et al*; rMETL: sensitive mobile element insertion detection with long read realignment, *Bioinformatics*, Volume 35, Issue 18, 15 September 2019, Pages 3484–3486, https://doi.org/10.1093/bioinformatics/btz106
---
### Contact
28 changes: 15 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -2,27 +2,29 @@

from setuptools import setup, find_packages

LONG_DESCRIPTION = '''Mobile element insertion (MEI) is a major category of structure variations (SVs).
The rapid development of long read sequencing provides the opportunity to sensitively discover MEIs.
However, the signals of MEIs implied by noisy long reads are highly complex, due to the repetitiveness
of mobile elements as well as the serious sequencing errors. Herein, we propose Realignment-based
Mobile Element insertion detection Tool for Long read (rMETL). rMETL takes advantage of
its novel chimeric read re-alignment approach to well handle complex MEI signals.
Benchmarking results on simulated and real datasets demonstrated that rMETL has the ability
to more sensitivity discover MEIs as well as prevent false positives.
LONG_DESCRIPTION = '''Mobile element insertion (MEI) is a major category of structure variations (SVs). \
The rapid development of long read sequencing provides the opportunity to sensitively discover MEIs. \
However, the signals of MEIs implied by noisy long reads are highly complex, due to the repetitiveness \
of mobile elements as well as the serious sequencing errors. Herein, we propose Realignment-based \
Mobile Element insertion detection Tool for Long read (rMETL). rMETL takes advantage of \
its novel chimeric read re-alignment approach to well handle complex MEI signals. \
Benchmarking results on simulated and real datasets demonstrated that rMETL has the ability \
to more sensitivity discover MEIs as well as prevent false positives. \
It is suited to produce high quality MEI callsets in many genomics studies.'''

setup(
name = "rMETL",
version = "1.0.2",
version = "1.0.4",
description = "realignment-based Mobile Element insertion detection Tool for Long read",
author = "Jiang Tao",
author_email = "tjiang@hit.edu.cn",
url = "https://github.com/tjiangHIT/rMETL",
license = "MIT Licence",
packages = find_packages('src'),
package_dir = {'': 'src'},
license = "MIT",
packages = find_packages("src"),
package_dir = {"": "src"},
data_files = [("", ["LICENSE"])],
scripts=['src/rMETL/rMETL'],
long_description = LONG_DESCRIPTION,
zip_safe = False,
install_requires = ['pysam', 'Biopython', 'Cigar']
)
)
File renamed without changes.
16 changes: 7 additions & 9 deletions src/rMETL.py → src/rMETL/rMETL
Original file line number Diff line number Diff line change
@@ -2,19 +2,17 @@

'''
* All rights Reserved, Designed By HIT-Bioinformatics
* @Title: process.py
* @Package: argparse
* @Description: Control the rMETL pipeline
* @author: Jiang Tao (tjiang@hit.edu.cn)
* @date: Apr 24 2018
* @version V1.0.2
* @version V1.0.4
'''

import argparse
import rMETL_extraction
import rMETL_realign
import rMETL_MEIcalling
from rMETL_version import __version__, __author__, __contact__
import rMETL.rMETL_extraction as rMETL_extraction
import rMETL.rMETL_realign as rMETL_realign
import rMETL.rMETL_MEIcalling as rMETL_MEIcalling
from rMETL.rMETL_version import __version__, __author__, __contact__

STAGES = {'detection': rMETL_extraction.run, \
'realignment': rMETL_realign.run, \
@@ -44,7 +42,7 @@
'''%(__version__, __author__, __contact__)

def parseArgs():
parser = argparse.ArgumentParser(prog='rMETL.py', description=USAGE, \
parser = argparse.ArgumentParser(prog='rMETL', description=USAGE, \
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('stage', metavar='STAGE', choices=STAGES.keys(), \
type=str, help='Stage to execute')
@@ -54,4 +52,4 @@ def parseArgs():
STAGES[args.stage](args.options)

if __name__ == '__main__':
parseArgs()
parseArgs()
14 changes: 6 additions & 8 deletions src/rMETL_MEIcalling.py → src/rMETL/rMETL_MEIcalling.py
Original file line number Diff line number Diff line change
@@ -2,12 +2,10 @@

'''
* All rights Reserved, Designed By HIT-Bioinformatics
* @Title: call_TE.py
* @Package: argparse, sys, logging, pysam, Bio
* @Description: Establish the ME callset
* @author: Jiang Tao (tjiang@hit.edu.cn)
* @date: Apr 24 2018
* @version V1.0.2
* @version V1.0.4
'''

import argparse
@@ -17,10 +15,10 @@
import cigar

from collections import Counter
from rMETL_version import __version__, __author__, __contact__
from rMETL_genotype import simple_call_genotype
from rMETL_cmdRunner import setupLogging
from rMETL_utils import load_ref
from rMETL.rMETL_version import __version__, __author__, __contact__
from rMETL.rMETL_genotype import simple_call_genotype
from rMETL.rMETL_cmdRunner import setupLogging
from rMETL.rMETL_utils import load_ref

USAGE="""\
_ ___ _ _____ _______ _
@@ -312,7 +310,7 @@ def call_vcf(args):
#
# ************************MAIN_FUNCTION*******************************
def parseArgs(argv):
parser = argparse.ArgumentParser(prog="rMETL.py calling", description=USAGE, \
parser = argparse.ArgumentParser(prog="rMETL calling", description=USAGE, \
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("input", metavar="SAM", type=str, help="Input cluster.sam on STAGE realignment.")
parser.add_argument("Reference", metavar="REFERENCE", type=str, \
File renamed without changes.
File renamed without changes.
19 changes: 9 additions & 10 deletions src/rMETL_extraction.py → src/rMETL/rMETL_extraction.py
Original file line number Diff line number Diff line change
@@ -2,12 +2,10 @@

'''
* All rights Reserved, Designed By HIT-Bioinformatics
* @Title: extract_simple.py
* @Package: argparse, pysam, sys, Bio, os, logging
* @Description: Parse the ME signatures from alignments
* @author: Jiang Tao (tjiang@hit.edu.cn)
* @date: Apr 24 2018
* @version V1.0.2
* @version V1.0.4
'''

import pysam
@@ -20,11 +18,11 @@
import gc

from multiprocessing import Pool
from rMETL_version import __version__, __author__, __contact__
from rMETL_concensus import construct_concensus_info
from rMETL_genotype import add_genotype
from rMETL_utils import load_ref, check_bai, call_ngmlr, call_samtools
from rMETL_cmdRunner import setupLogging, exe
from rMETL.rMETL_version import __version__, __author__, __contact__
from rMETL.rMETL_concensus import construct_concensus_info
from rMETL.rMETL_genotype import add_genotype
from rMETL.rMETL_utils import load_ref, check_bai, call_ngmlr, call_samtools
from rMETL.rMETL_cmdRunner import setupLogging, exe

USAGE="""\
_ ___ _ _____ _______ _
@@ -497,7 +495,8 @@ def load_sam_multi_processes(args):
analysis_pools.join()
samfile.close()

output_p = args.output if args.output.endswith('/') else "%s/"%(args.output)
output_p = args.output_dir if args.output_dir.endswith('/') else \
"%s/"%(args.output_dir)
if not os.path.exists(output_p):
os.mkdir(output_p)
merge_cmd = ("cat %ssignatures/* > %spotential_ME.fa"%(temporary_dir, output_p))
@@ -525,7 +524,7 @@ def load_sam_multi_processes(args):
#
# ************************MAIN_FUNCTION*******************************
def parseArgs(argv):
parser = argparse.ArgumentParser(prog="rMETL.py detection", \
parser = argparse.ArgumentParser(prog="rMETL detection", \
description=USAGE, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("input", metavar="[SAM,BAM,FASTA,FASTQ]", type=str, \
help="Input reads with/without alignment.")
File renamed without changes.
10 changes: 4 additions & 6 deletions src/rMETL_realign.py → src/rMETL/rMETL_realign.py
Original file line number Diff line number Diff line change
@@ -2,21 +2,19 @@

'''
* All rights Reserved, Designed By HIT-Bioinformatics
* @Title: Map.py
* @Package: argparse, sys, logging
* @Description: Classify the ME types
* @author: Jiang Tao (tjiang@hit.edu.cn)
* @date: Apr 24 2018
* @version V1.0.2
* @version V1.0.4
'''

import argparse
import logging
import sys
import time

from rMETL_version import __version__, __author__, __contact__
from rMETL_cmdRunner import setupLogging, exe
from rMETL.rMETL_version import __version__, __author__, __contact__
from rMETL.rMETL_cmdRunner import setupLogging, exe

USAGE="""\
_ ___ _ _____ _______ _
@@ -67,7 +65,7 @@ def call_ngmlr(inFile, ref, presets, nproc, outFile, SUBREAD_LENGTH, SUBREAD_COR
#
# ************************MAIN_FUNCTION*******************************
def parseArgs(argv):
parser = argparse.ArgumentParser(prog="rMETL.py realignment", description=USAGE, \
parser = argparse.ArgumentParser(prog="rMETL realignment", description=USAGE, \
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("input", metavar="FASTA", type=str, help="Input potential_ME.fa on STAGE detection.")
parser.add_argument("ME_Ref", type=str, help="The transposable element concensus in fasta format.")
2 changes: 1 addition & 1 deletion src/rMETL_utils.py → src/rMETL/rMETL_utils.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import logging
import os
from Bio import SeqIO
from rMETL_cmdRunner import exe
from rMETL.rMETL_cmdRunner import exe

def load_ref(ref_g):
logging.info("Loading reference genome...")
2 changes: 1 addition & 1 deletion src/rMETL_version.py → src/rMETL/rMETL_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# * @author: Jiang Tao (tjiang@hit.edu.cn)

__version__ = '1.0.3'
__version__ = '1.0.4'
__author__ = 'Jiang Tao'
__contact__ = 'tjiang@hit.edu.cn'