Skip to content

Commit d382a92

Browse files
authored
Merge pull request #38 from yhoogstrate/compat2
Pypi compatibility updates
2 parents 5af7958 + b8b5a4e commit d382a92

16 files changed

+61
-257
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ nosetests.xml
4242
#/test_*
4343
#/tests/bak/
4444
output_fuma.txt
45+
/htmlcov/*
46+
.venv
47+
/*.txt

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ python:
77
# - "3.4"
88
# - "nightly"
99
# command to install dependencies
10-
install: "pip install ."
11-
# command to run tests
12-
script: "python setup.py test"
10+
install:
11+
- "virtualenv -p python2 .venv ; source .venv/bin/activate ; apt-get install python-numpy ; pip install HTSeq ; python setup.py install"
12+
13+
script:
14+
- "source .venv/bin/activate ; nosetests -v tests/*.py"
1315

1416
notifications:
1517
email: false

Changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2016-07-11 Youri Hoogstrate
2+
3+
* Version 3.0.5: Changes in deployment & two fixes in export function
4+
5+
2016-07-11 Youri Hoogstrate
6+
7+
* Version 3.0.4: Changes in deployment
8+
19
2016-07-08 Youri Hoogstrate
210

311
* Version 3.0.3: API Changes, only useful for tools depending on FuMa as lib

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include fuma
2+
include bin
3+
include test
4+
reverse-exclude Distutils*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Bioinformatics first published online December 10, 2015
3939
- [References](#references)
4040

4141
## Introduction ##
42-
This is the Manual as part of the Supplementary Material that belongs to the manuscript: *FuMa: reporting overlap in RNA-seq detected fusion genes* (under submission). FuMa (Fusion Matcher) matches predicted fusion events (both genomic and transcriptomic) according to chromosomal location and corresponding annotated genes. It is the organisation of the transcriptome (provided by the user) that forms the basis for FuMa to consider fusion genes to be identical or not. The provided gene annotation can be adjusted to define the biological question. For example, if it is desired to only consider fusion events that occur within exons, FuMa can be provided a list of such regions instead of entire genes. Currently FuMa supports input files from:
42+
This is the Manual as part of the Supplementary Material that belongs to the manuscript: *FuMa: reporting overlap in RNA-seq detected fusion genes*. FuMa (Fusion Matcher) matches predicted fusion events (both genomic and transcriptomic) according to chromosomal location and corresponding annotated genes. It is the organisation of the transcriptome (provided by the user) that forms the basis for FuMa to consider fusion genes to be identical or not. The provided gene annotation can be adjusted to define the biological question. For example, if it is desired to only consider fusion events that occur within exons, FuMa can be provided a list of such regions instead of entire genes. Currently FuMa supports input files from:
4343

4444
+ Chimera (Beccuti et al., 2014)
4545
+ ChimeraScan (Iyer et al., 2011)

coverage.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
py.test --cov-report html --cov=fuma tests

deploy.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
#pandoc --reference-links --no-wrap -t rst "README.md" > "README.rst"
4+
#python2 setup.py --long-description | rst2html.py > build/README.html
5+
python2 setup.py sdist upload

fuma/ComparisonTriangle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def log_progress(self,n_total, passed, previous_percentage):
154154
return n_total, passed, previous_percentage
155155

156156
def export_list_fg(self,fusion,fh):
157-
if(self.args.acceptor_donor_order_specific_matching and fusion.acceptor_donor_direction() == AD_DIRECTION_REVERSE):
157+
if(self.args.acceptor_donor_order_specific_matching and fusion.acceptor_donor_direction == AD_DIRECTION_REVERSE):
158158
## A-B should be reported as B-A; chr1:123\tchr1:456 as chr1:456-chr1:123
159159
fh.write(":".join(sorted(list(set([str(gene) for gene in fusion.get_annotated_genes_right2()])))) + "\t")
160160
fh.write(":".join(sorted(list(set([str(gene) for gene in fusion.get_annotated_genes_left2()])))))
@@ -170,7 +170,7 @@ def export_list_fg(self,fusion,fh):
170170

171171
for location in fusion.locations():
172172
if location['dataset'] == dataset.name:
173-
strdata.append(str(loc['id'])+"=chr"+loc['right'][0]+':'+str(loc['right'][1])+'-chr'+loc['left'][0]+':'+str(loc['left'][1]))
173+
strdata.append(str(location['id'])+"=chr"+location['right'][0]+':'+str(location['right'][1])+'-chr'+location['left'][0]+':'+str(location['left'][1]))
174174

175175
fh.write(",".join(sorted(strdata)))
176176
else:

fuma/GeneAnnotation.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<http://epydoc.sourceforge.net/manual-fields.html#fields-synonyms>
2222
"""
2323

24+
#import gffutils
2425
import HTSeq
2526
import logging
2627

@@ -33,6 +34,9 @@ class GeneAnnotation:
3334
def __init__(self,name):
3435
self.n = 0
3536
self.name = name
37+
38+
# list(db.region(region=('2L', 9277, 10000), completely_within=True))
39+
#self.gas2 = gffutils.create_db(gtf, dbfn=db_file)
3640
self.gas = HTSeq.GenomicArrayOfSets("auto", stranded=False)
3741

3842
def add_annotation(self,gene,chromosome,start,stop):
@@ -63,5 +67,5 @@ def __iter__(self):
6367
for gene in list(reduce(lambda s1, s2: s1 | s2, [x[1] for x in self.gas[HTSeq.GenomicInterval(chromosome_name,0,chromosome_obj['.'].iv.end)].steps()])):
6468
yield gene
6569

66-
def show_me(self):
67-
print self.__str__()
70+
#def show_me(self):
71+
# print self.__str__()

fuma/OverlapComplex.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ def add_experiment(self,experiment):
4444
self.dataset_names.append(experiment.name)
4545
self.matches_total[str(len(self.datasets))] = len(experiment)
4646

47-
def create_matrix(self,n):
48-
matrix = []
49-
for dataset in self.datasets:
50-
matrix.append([])
51-
52-
n = len(self.datasets)-1
53-
while(n >= 1):
54-
for i in range(n):
55-
matrix[n].append(i)
56-
n -= 1
57-
58-
return matrix
47+
#def create_matrix(self,n):
48+
# matrix = []
49+
# for dataset in self.datasets:
50+
# matrix.append([])
51+
#
52+
# n = len(self.datasets)-1
53+
# while(n >= 1):
54+
# for i in range(n):
55+
# matrix[n].append(i)
56+
# n -= 1
57+
#
58+
# return matrix
5959

6060
def create_keys(self,combination):
6161
keys = [combination[:-1],combination[-1:],combination]

0 commit comments

Comments
 (0)