Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible chroms between fasta and annotation #47

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Outrigger is a program which uses junction reads from RNA seq data, and a graph database to create a *de novo* alternative splicing annotation with a graph database, and quantify percent spliced-in (Psi) of the events.

* Free software: BSD license
* Free and open source software: BSD license

## Features

Expand All @@ -25,7 +25,6 @@ You'll want to add the [`bioconda`](https://bioconda.github.io/) channel to make
```
conda config --add channels r
conda config --add channels bioconda

```

Create an environment called `outrigger-env`. Python 2.7, Python 3.4, and Python 3.5 are supported.
Expand Down
25 changes: 25 additions & 0 deletions docs/releases/v0.2.9.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
v0.2.9 (...)
------------



New features
~~~~~~~~~~~~

Plotting functions
~~~~~~~~~~~~~~~~~~

API changes
~~~~~~~~~~~


Bug fixes
~~~~~~~~~

- Fixed an issue in ``outrigger validate`` when fasta file and genome
annotation didn't have overlapping chromosomes and ``outrigger validate``
would simply fail rather than gracefully skipping those events.

Miscellaneous
~~~~~~~~~~~~~

2 changes: 1 addition & 1 deletion outrigger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ = '0.2.8dev'
__version__ = '0.2.9dev'

__all__ = ['psi', 'region', 'util', 'io', 'validate', 'index',
'common']
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
simulated 1000
in_chromsizes 100
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
isoform1=junction:simulated:150-500:+|isoform2=junction:simulated:150-300:+@exon:simulated:300-400:+@junction:simulated:400-500:+
isoform1=junction:simulated:100-600:-|isoform2=junction:simulated:300-600:-@exon:simulated:300-400:-@junction:simulated:100-400:-
isoform1=junction:simulated:100-600:-|isoform2=junction:simulated:300-600:-@exon:simulated:300-400:-@junction:simulated:100-400:-
isoform1=junction:nonexistent:100-600:-|isoform2=junction:nonexistent:300-600:-@exon:nonexistent:300-400:-@junction:nonexistent:100-400:-
isoform1=junction:in_chromsizes:100-600:-|isoform2=junction:in_chromsizes:300-600:-@exon:in_chromsizes:300-400:-@junction:in_chromsizes:100-400:-
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
simulated 100 150 isoform1=junction:simulated:150-500:+|isoform2=junction:simulated:150-300:+@exon:simulated:300-400:+@junction:simulated:400-500:+ . +
simulated 500 600 isoform1=junction:simulated:100-600:-|isoform2=junction:simulated:300-600:-@exon:simulated:300-400:-@junction:simulated:100-400:- . -
nonexistent 500 600 isoform1=junction:nonexistent:100-600:-|isoform2=junction:nonexistent:300-600:-@exon:nonexistent:300-400:-@junction:nonexistent:100-400:- . -
in_chromsizes 500 600 isoform1=junction:in_chromsizes:100-600:-|isoform2=junction:in_chromsizes:300-600:-@exon:in_chromsizes:300-400:-@junction:in_chromsizes:100-400:- . -
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
simulated 300 400 isoform1=junction:simulated:150-500:+|isoform2=junction:simulated:150-300:+@exon:simulated:300-400:+@junction:simulated:400-500:+ . +
simulated 300 400 isoform1=junction:simulated:100-600:-|isoform2=junction:simulated:300-600:-@exon:simulated:300-400:-@junction:simulated:100-400:- . -
nonexistent 300 400 isoform1=junction:nonexistent:100-600:-|isoform2=junction:nonexistent:300-600:-@exon:nonexistent:300-400:-@junction:nonexistent:100-400:- . -
in_chromsizes 300 400 isoform1=junction:in_chromsizes:100-600:-|isoform2=junction:in_chromsizes:300-600:-@exon:in_chromsizes:300-400:-@junction:in_chromsizes:100-400:- . -
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
simulated 500 600 isoform1=junction:simulated:150-500:+|isoform2=junction:simulated:150-300:+@exon:simulated:300-400:+@junction:simulated:400-500:+ . +
simulated 100 150 isoform1=junction:simulated:100-600:-|isoform2=junction:simulated:300-600:-@exon:simulated:300-400:-@junction:simulated:100-400:- . -
nonexistent 100 150 isoform1=junction:nonexistent:100-600:-|isoform2=junction:nonexistent:300-600:-@exon:nonexistent:300-400:-@junction:nonexistent:100-400:- . -
in_chromsizes 100 150 isoform1=junction:in_chromsizes:100-600:-|isoform2=junction:in_chromsizes:300-600:-@exon:in_chromsizes:300-400:-@junction:in_chromsizes:100-400:- . -
17 changes: 8 additions & 9 deletions outrigger/validate/check_splice_sites.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

from collections import OrderedDict

from Bio import SeqIO
import pandas as pd
import pybedtools


NT = 2

MAMMALIAN_SPLICE_SITES = 'GT/AG,AT/AC'
Expand Down Expand Up @@ -55,11 +55,10 @@ def read_splice_sites(bed, genome, fasta, direction='upstream'):
right = NT

flanked = bed.flank(l=left, r=right, s=True, genome=genome)
seqs = flanked.sequence(fi=fasta, s=True)

with open(seqs.seqfn) as f:
records = SeqIO.parse(f, 'fasta')
records = pd.Series([str(r.seq) for r in records],
index=[b.name for b in bed])
# import pdb; pdb.set_trace()
return records
seqs = flanked.sequence(fi=fasta, s=True, name=True, tab=True)

splice_sites = pd.read_table(seqs.seqfn, index_col=0, header=None,
squeeze=True)
splice_sites.index = [x.split('::')[0] for x in splice_sites.index]
splice_sites.name = None
return splice_sites
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

setup(
name='outrigger',
version='0.2.8dev',
version='0.2.9dev',
description="Outrigger is a tool to de novo annotate splice sites "
"and exons",
long_description=readme + '\n\n' + history,
Expand Down