Skip to content

Commit

Permalink
add exon/intron index information
Browse files Browse the repository at this point in the history
  • Loading branch information
kepbod committed Jan 22, 2016
1 parent 11d4cff commit 31857ea
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 19 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,9 @@
## 1.1.6 (2016-1-22)

Improvements:

* add exon/intron index information

## 1.1.5 (2016-1-20)

Improvements:
Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -4,9 +4,9 @@

CIRCexplorer is a combined strategy to identify junction reads from back spliced exons and intron lariats.

Version: 1.1.5
Version: 1.1.6

Last Modified: 2016-1-20
Last Modified: 2016-1-22

Authors: Xiao-Ou Zhang (zhangxiaoou@picb.ac.cn), Li Yang (liyang@picb.ac.cn)

Expand Down Expand Up @@ -82,7 +82,7 @@ To detect fusion junctions with STAR, `--chimSegmentMin` should be set to a posi
##Usage

```bash
CIRCexplorer.py 1.1.5 -- circular RNA analysis toolkits.
CIRCexplorer.py 1.1.6 -- circular RNA analysis toolkits.

Usage: CIRCexplorer.py [options]

Expand Down Expand Up @@ -174,6 +174,7 @@ See details in [the example file](https://github.com/YangLab/CIRCexplorer/blob/m
| circType | 'Yes' for ciRNA, and 'No' for circRNA (before 1.1.0); 'circRNA' or 'ciRNA' (after 1.1.1)|
| geneName | Name of gene |
| isoformName | Name of isoform |
| exonIndex/intronIndex | Index (start from 1) of exon (for circRNA) or intron (for ciRNA) in given isoform (newly added in 1.1.6) |
| flankIntron | Left intron/Right intron |

***Note: The first 12 columns are in [BED12 format](http://genome.ucsc.edu/FAQ/FAQformat.html#format1).***
Expand Down
24 changes: 19 additions & 5 deletions circ/CIRCexplorer.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

"""
CIRCexplorer.py 1.1.5 -- circular RNA analysis toolkit.
CIRCexplorer.py 1.1.6 -- circular RNA analysis toolkit.
Usage: CIRCexplorer.py [options]
Expand All @@ -22,7 +22,7 @@
"""

__author__ = 'Xiao-Ou Zhang (zhangxiaoou@picb.ac.cn)'
__version__ = '1.1.5'
__version__ = '1.1.6'

from docopt import docopt
import sys
Expand Down Expand Up @@ -134,8 +134,16 @@ def fix_fusion(ref_f, genome_fa, input_f, output_f, no_fix):
name = 'circular_RNA/' + reads
gene, iso, chrom, strand, index = fus.split()
starts, ends = ref['\t'.join([gene, iso, chrom, strand])]
exon_num = len(starts)
intron_num = exon_num - 1
if ',' in index: # back spliced exons
s, e = [int(x) for x in index.split(',')]
if strand == '+':
index_info = ','.join(str(x + 1)
for x in xrange(s, e + 1))
else:
index_info = ','.join(str(exon_num - x)
for x in xrange(s, e + 1))
start = str(starts[s])
end = str(ends[e])
length = str(e - s + 1)
Expand All @@ -152,15 +160,21 @@ def fix_fusion(ref_f, genome_fa, input_f, output_f, no_fix):
intron = '|'.join([left_intron, right_intron])
bed = '\t'.join([chrom, start, end, name, fixed, strand, start,
start, '0,0,0', length, sizes, offsets,
reads, 'circRNA', gene, iso, intron])
reads, 'circRNA', gene, iso, index_info,
intron])
else: # ciRNAs
index, start, end = index.split('|')
size = str(int(end) - int(start))
index = int(index)
if strand == '+':
index_info = str(index + 1)
else:
index_info = str(intron_num - index)
size = str(int(end) - int(start))
intron = '%s:%d-%d' % (chrom, ends[index], starts[index + 1])
bed = '\t'.join([chrom, start, end, name, fixed, strand, start,
start, '0,0,0', '1', size, '0',
reads, 'ciRNA', gene, iso, intron])
reads, 'ciRNA', gene, iso, index_info,
intron])
outf.write(bed + '\n')
print('Fixed %d fusion junctions!' % total)

Expand Down
20 changes: 10 additions & 10 deletions example/output_example.txt
@@ -1,10 +1,10 @@
chr3 183493702 183508768 circular_RNA/1 1 + 183493702 183493702 0,0,0 4 209,159,177,184 0,1627,10210,14882 1 No YEATS2 NM_018023 chr3:183491582-183493702|chr3:183508768-183515710
chr2 48060102 48061850 circular_RNA/2 0 - 48060102 48060102 0,0,0 2 107,133 0,1615 2 No FBXO11 NM_025133 chr2:48060019-48060102|chr2:48061850-48061926
chr1 78204949 78207433 circular_RNA/1 1 - 78204949 78204949 0,0,0 4 153,63,54,132 0,1612,2111,2352 1 No USP33 NM_015017 chr1:78201843-78204949|chr1:78207433-78211105
chr11 118997644 118997835 circular_RNA/5 1 + 118997644 118997644 0,0,0 1 191 0 5 No HINFP uc010rzb.2 chr11:118992349-118997644|chr11:118997835-119001434
chr3 69112132 69117159 circular_RNA/2 1 - 69112132 69112132 0,0,0 4 156,65,44,81 0,457,1086,4946 2 No UBA3 NM_003968 chr3:69111330-69112132|chr3:69117159-69120685
chr9 132841908 132854660 circular_RNA/2 1 + 132841908 132841908 0,0,0 5 140,38,57,108,134 0,3935,6790,11246,12618 2 No GPR107 uc004bzb.2 chr9:132839653-132841908|chr9:132854660-132861735
chr9 134381500 134381840 circular_RNA/1 1 + 134381500 134381500 0,0,0 2 107,51 0,289 1 No POMT1 uc011mci.1 chr9:134379727-134381500|chr9:134381840-134382754
chr9 99277930 99327765 circular_RNA/3 0 - 99277930 99277930 0,0,0 12 144,98,160,139,231,88,63,67,77,93,76,91 0,6857,7612,7938,18278,18806,23429,26177,36147,47044,49128,49744 3 No CDC14B uc004awl.3 chr9:99272071-99277930|chr9:99327765-99381500
chr10 1149541 1151207 circular_RNA/3 0 + 1149541 1149541 0,0,0 2 235,142 0,1524 3 No WDR37 uc031ptc.1 chr10:1142186-1149541|chr10:1151207-1170157
chr9 99324974 99327765 circular_RNA/1 0 - 99324974 99324974 0,0,0 3 93,76,91 0,2084,2700 1 No CDC14B NM_001077181 chr9:99314154-99324974|chr9:99327765-99329049
chrY 150833 159885 circular_RNA/2 1 + 150833 150833 0,0,0 5 148,137,129,156,184 0,4566,6481,7332,8868 2 circRNA PLCXD1 NR_028057 3,4,5,6,7 chrY:148351-150833|chrY:159885-165763
chrY 256250 258428 circular_RNA/1 0 - 256250 256250 0,0,0 5 157,87,75,103,104 0,658,1185,1718,2074 1 circRNA PPP2R3B NM_013239 7,6,5,4,3 chrY:252666-256250|chrY:258428-272139
chrY 272139 273067 circular_RNA/2 0 - 272139 272139 0,0,0 2 186,78 0,850 2 circRNA PPP2R3B uc011nah.2 3,2 chrY:258428-272139|chrY:273067-297102
chrY 1455672 1456171 circular_RNA/1 1 - 1455672 1455672 0,0,0 1 499 0 1 ciRNA SLC25A6 NM_001636 3 chrY:1455652-1456171
chrY 1490550 1497014 circular_RNA/1 1 - 1490550 1490550 0,0,0 3 185,163,388 0,3867,6076 1 circRNA ASMTL NM_001173474 8,7,6 chrY:1488007-1490550|chrY:1497014-1501161
chrY 2111063 2111271 circular_RNA/4 0 - 2111063 2111063 0,0,0 1 208 0 4 circRNA DHRSX NM_145177 6 chrY:2089270-2111063|chrY:2111271-2134780
chrY 2134780 2159644 circular_RNA/2 0 - 2134780 2134780 0,0,0 2 208,102 0,24762 2 circRNA DHRSX NM_145177 5,4 chrY:2111271-2134780|chrY:2159644-2276785
chrX 299512 302131 circular_RNA/1 0 - 299512 299512 0,0,0 3 119,176,90 0,1987,2529 1 circRNA PPP2R3B NM_013239 11,10,9 chrX:299445-299512|chrX:302131-302617
chrX 322139 323067 circular_RNA/1 0 - 322139 322139 0,0,0 2 186,78 0,850 1 circRNA PPP2R3B ENST00000445792 3,2 chrX:308428-322139|chrX:323067-347102
chrX 1505672 1506171 circular_RNA/1 1 - 1505672 1505672 0,0,0 1 499 0 1 ciRNA SLC25A6 NM_001636 3 chrX:1505652-1506171
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -4,7 +4,7 @@
from setuptools import setup, find_packages

setup(name='CIRCexplorer',
version='1.1.5',
version='1.1.6',
description='Circular RNA analysis toolkits',
author='Xiao-Ou Zhang',
author_email='zhangxiaoou@picb.ac.cn',
Expand Down

0 comments on commit 31857ea

Please sign in to comment.