Skip to content

Commit

Permalink
Update software name
Browse files Browse the repository at this point in the history
  • Loading branch information
JY-Zhou committed Apr 30, 2020
1 parent f806ac5 commit a602afe
Show file tree
Hide file tree
Showing 213 changed files with 227 additions and 218 deletions.
76 changes: 38 additions & 38 deletions Case_study_RMRP.ipynb

Large diffs are not rendered by default.

141 changes: 75 additions & 66 deletions Case_study_U2_snRNA.ipynb

Large diffs are not rendered by default.

150 changes: 75 additions & 75 deletions Experiments.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion PARSE/Baseline_Methods.py → IRIS/Baseline_Methods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PARSE.Info_RNA import *
from IRIS.Info_RNA import *

import sys

Expand Down
4 changes: 2 additions & 2 deletions PARSE/PARSE_Core.py → IRIS/IRIS_Core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

import RNA

from PARSE.Utils import *
from PARSE.Info_RNA import *
from IRIS.Utils import *
from IRIS.Info_RNA import *


class Scoring:
Expand Down
2 changes: 1 addition & 1 deletion PARSE/Info_Coevolution.py → IRIS/Info_Coevolution.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from PARSE.Utils import *
from IRIS.Utils import *


class Info_Coevolution:
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions PARSE/Info_RNA.py → IRIS/Info_RNA.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PARSE.Utils import *
from PARSE.Info_PARIS import *
from PARSE.Info_icSHAPE import *
from PARSE.Info_Coevolution import *
from IRIS.Utils import *
from IRIS.Info_PARIS import *
from IRIS.Info_icSHAPE import *
from IRIS.Info_Coevolution import *

import RNA

Expand Down
2 changes: 1 addition & 1 deletion PARSE/Info_icSHAPE.py → IRIS/Info_icSHAPE.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from scipy.stats import beta
import matplotlib.pyplot as plt

from PARSE.Utils import *
from IRIS.Utils import *

import RNA

Expand Down
File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions PARSE_CLI.py → IRIS_CLI.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import argparse
from PARSE.Info_RNA import *
from PARSE.PARSE_Core import *
from IRIS.Info_RNA import *
from IRIS.IRIS_Core import *
from Bio import SeqIO


VERSION = 'v1.0'
def run_PARSE(args):
def run_IRIS(args):
# Load reference sequence and PARIS reads as an Info_RNA object
print('--- Loading inputs ...')
print(' --- RNA sequence : %s' % args.input_fasta)
Expand All @@ -15,22 +15,22 @@ def run_PARSE(args):
concerning_rna = Info_RNA(ref_rna.id, ref_rna.seq)
concerning_rna.PARIS = Info_PARIS(args.input_bam)

# Perform scoring of PARSE
PARSE_scoring = Scoring(concerning_rna)
PARSE_scoring.compute_PARIS_support()
# Perform scoring of IRIS
IRIS_scoring = Scoring(concerning_rna)
IRIS_scoring.compute_PARIS_support()

PARSE_generating = Generating(concerning_rna, PARSE_scoring.PARIS_support)
PARSE_generating.generate(args.C, args.F, args.krange)
IRIS_generating = Generating(concerning_rna, IRIS_scoring.PARIS_support)
IRIS_generating.generate(args.C, args.F, args.krange)

PARSE_picking = Picking(concerning_rna, PARSE_scoring.PARIS_support, PARSE_generating.candidate_structures)
PARSE_picking.pick(args.K)
IRIS_picking = Picking(concerning_rna, IRIS_scoring.PARIS_support, IRIS_generating.candidate_structures)
IRIS_picking.pick(args.K)

print('--- The predicted ensemble is saved in %s' % args.output)
PARSE_picking.ensemble.save(args.output)
IRIS_picking.ensemble.save(args.output)
print('')


parser = argparse.ArgumentParser(prog = 'python PARSE_CLI.py', description='PARSE %s: A method for predicting PARIS-based RNA secondary structure ensembles' % VERSION)
parser = argparse.ArgumentParser(prog = 'python IRIS_CLI.py', description='IRIS %s: A method for predicting ensembles of in vivo RNA secondary structures using PARIS data' % VERSION)
parser.add_argument('-i', metavar = 'FASTA file', action = 'store', \
type=str, nargs = '?', required = True,\
help='the input RNA sequence in FASTA format', dest = 'input_fasta')
Expand Down Expand Up @@ -60,4 +60,4 @@ def run_PARSE(args):
help='the range of length k of stems (default: 4 5 6 7)', dest = 'krange')

args = parser.parse_args()
run_PARSE(args)
run_IRIS(args)
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
# PARSE
#### A Method for Predicting PARIS-based RNA Secondary Structure Ensembles
# IRIS
#### A method for predicting ensembles of **I**n *vivo* **R**NA secondary structures using PAR**IS** data ([GitHub Link](https://github.com/JY-Zhou/IRIS))

RNA secondary structure plays a pivotal role in posttranscriptional regulation and the functions of non-coding RNAs, yet *in vivo* RNA secondary structures remain enigmatic. PARIS (Psoralen Analysis of RNA Interactions and Structures) is a recently developed high-throughput sequencing-based approach that enables direct capture of RNA duplex structures *in vivo*. However, the existence of incompatible, fuzzy pairing information obstructs the integration of PARIS data with existing tools to construct RNA secondary structure models in base-resolution. Here, we introduce PARSE, a method for predicting RNA secondary structure ensembles based on PARIS data. PARSE generates a large set of candidate RNA secondary structure models under the guidance of redistributed PARIS reads and then uses a Bayesian model to identify the optimal ensemble, according to both thermodynamic principles and PARIS data. We verified the predicted ensemble with the evidence from evolutionary conservation and the consistency with other experimental RNA structural data.
RNA secondary structures play a pivotal role in posttranscriptional regulation and the functions of non-coding RNAs, yet *in vivo* RNA secondary structures remain enigmatic. PARIS (Psoralen Analysis of RNA Interactions and Structures) is a recently developed high-throughput sequencing-based approach that enables direct capture of RNA duplex structures *in vivo*. However, the existence of incompatible, fuzzy pairing information obstructs the integration of PARIS data with the existing tools in the construction of RNA secondary structure models at the single base resolution. Here, we introduce IRIS, a method for predicting RNA secondary structure ensembles based on PARIS data. IRIS generates a large set of candidate RNA secondary structure models under the guidance of redistributed PARIS reads and then uses a Bayesian model to identify the optimal ensemble, according to both thermodynamic principles and PARIS data. We verified the predicted ensembles based on the evidence from evolutionary conservation and consistency with other experimental RNA structural data.

## Usage

#### Import the PARIS API into Python scripts
#### Import the IRIS API into Python scripts

We strongly recommend that users use the PARSE API by writing some simple Python scripts. Here, we prepare three Jupyter notebooks that utilize the PARSE API as examples. If [JupyterLab](https://jupyter.org/) is installed on the system (generally, JupyterLab will be automatically installed when setting up a Python environment using [Anaconda](https://www.anaconda.com/products/individual)), users can make full use of the following notebooks interactively and can freely and flexibly change the codes.
We strongly recommend that users use the IRIS API by writing some simple Python scripts. Here, we prepare three Jupyter notebooks that utilize the IRIS API as examples. If [JupyterLab](https://jupyter.org/) is installed on the system (generally, JupyterLab will be automatically installed when setting up a Python environment using [Anaconda](https://www.anaconda.com/products/individual)), users can make full use of the following notebooks interactively and can freely and flexibly change the codes.

- [Experiments.ipynb](Experiments.ipynb)

This notebook uses the PARSE API to evaluate the performance of PARSE. It includes the main results and figures in the PARSE article, and it is easy to reproduce these results using JupyterLab.
This notebook uses the IRIS API to evaluate the performance of IRIS. It includes the main results and figures in the IRIS article, and it is easy to reproduce these results using JupyterLab.

- [Case_study_U2_snRNA.ipynb](Case_study_U2_snRNA.ipynb)

This notebook takes the U2 snRNA as an example to perform PARSE, which is the main case discussed in the article for explain how PARSE works. This notebook also helps to reproduce the results and figures in the article concerning the U2 snRNA.
This notebook takes the U2 snRNA as an example to perform IRIS, which is the main case discussed in the article for explain how IRIS works. This notebook also helps to reproduce the results and figures in the article concerning the U2 snRNA.

- [Case_study_RMRP.ipynb](Case_study_RMRP.ipynb)

As a supplementary case, the execution of PARSE on the RMRP is included in this notebook. Here, we make the description and code as concise as possible to set up this notebook as an example of how to use the PARSE API in Python scripts.
As a supplementary case, the execution of IRIS on the RMRP is included in this notebook. Here, we make the description and code as concise as possible to set up this notebook as an example of how to use the IRIS API in Python scripts.

#### Run IRIS in the command-line interface ([IRIS_CLI.py](IRIS_CLI.py))

#### Run PARSE in the command-line interface (PARSE CLI)
We also wrap IRIS as a traditional command-line tool. The usage is shown below.

We also wrap PARSE as a traditional command-line tool. The usage is shown below.

`python PARSE_CLI.py [-h] -i [FASTA file] -r [BAM file] -o [output file] -K [int] [-C [int]] [-F [float]] [--krange [...]]`
`python IRIS_CLI.py [-h] -i [FASTA file] -r [BAM file] -o [output file] -K [int] [-C [int]] [-F [float]] [--krange [...]]`

Optional arguments
- `-h, --help`    show help messages and exit
Expand All @@ -36,19 +35,20 @@ Optional arguments
- `-K [int]`    the expected number of representative structures in the ensemble
- `-C [int]`    the number of candidate structures generated   (*default*: 100)
- `-F [float]`    the fraction threshold for filtering stems   (*default*: 0.75)
- `--krange [ ...]`    the range of length k of stems   (*default*: 4 5 6 7)
- `--krange [ ...]`    the range of length *k* of stems   (*default*: 4 5 6 7)

An example of executing PARSE CLI using default parameters.
An example of executing IRIS CLI using default parameters.

`python PARSE_CLI.py -i sample/sample.fa -r sample/sample.bam -o sample/sample.out -K 2`
`python IRIS_CLI.py -i sample/sample.fa -r sample/sample.bam -o sample/sample.out -K 2`

The parameters can be specified by the following command.

`python PARSE_CLI.py -i sample/sample.fa -r sample/sample.bam -o sample/sample.out -K 2 -C 100 -F 0.75 --krange 4 5 6 7`
`python IRIS_CLI.py -i sample/sample.fa -r sample/sample.bam -o sample/sample.out -K 2 -C 100 -F 0.75 --krange 4 5 6 7`


## Requirements

PARSE is implemented in Python 3. We suggest users to install the Python 3.x environment using [Anaconda](https://www.anaconda.com/products/individual). Then, the following required Python libraries can be easily installed using `conda`.
IRIS is implemented in Python 3. We suggest users to install the Python 3.x environment using [Anaconda](https://www.anaconda.com/products/individual). Then, the following required Python libraries can be easily installed using `conda`.

| Library | Version | Installation |
|---|---|---|
Expand Down

0 comments on commit a602afe

Please sign in to comment.