Skip to content

Commit 103f4ca

Browse files
authored
Add rat, dog, cat, chicken species & increase MAX_ENSEMBL_RELEASE to 87 (#183)
* added chicken, dog, cat to species * bump max ensembl release to 87 * added rat to species * install ensembl 87 instead of 85 * increase version for new species & bump to max ensembl version * more assertions in custom dir test * fixed download cache test
1 parent 59855a9 commit 103f4ca

File tree

5 files changed

+50
-9
lines changed

5 files changed

+50
-9
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,12 @@ script:
4747
- pyensembl install --release 54 --species human
4848
- pyensembl install --release 75 --species human
4949
- pyensembl install --release 77 --species human
50-
# latest human release
5150
- pyensembl install --release 83 --species human
52-
- pyensembl install --release 85 --species human
51+
- pyensembl install --release 87 --species human
5352
# older mouse release (last one for NCBIM37)
5453
# - pyensembl install --release 67 --species mouse
5554
# latest mouse release
56-
- pyensembl install --release 85 --species mouse
55+
- pyensembl install --release 87 --species mouse
5756
# run tests
5857
- nosetests test --verbose --with-coverage --cover-package=pyensembl
5958
after_success:

pyensembl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
)
3636
from .transcript import Transcript
3737

38-
__version__ = '1.0.3'
38+
__version__ = '1.1.0'
3939

4040
def cached_release(release, species="human"):
4141
"""

pyensembl/ensembl_release_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from __future__ import print_function, division, absolute_import
1616

1717
MIN_ENSEMBL_RELEASE = 54
18-
MAX_ENSEMBL_RELEASE = 85
18+
MAX_ENSEMBL_RELEASE = 87
1919

2020
def check_release_number(release):
2121
"""

pyensembl/species.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,29 @@ def check_species_object(species_name_or_object):
183183
"GRCm38": (68, MAX_ENSEMBL_RELEASE),
184184

185185
})
186+
187+
dog = Species.register(
188+
latin_name="canis_familiaris",
189+
synonyms=["dog"],
190+
reference_assemblies={"CanFam3.1": (75, MAX_ENSEMBL_RELEASE)})
191+
192+
cat = Species.register(
193+
latin_name="felis_catus",
194+
synonyms=["cat"],
195+
reference_assemblies={"Felis_catus_6.2": (75, MAX_ENSEMBL_RELEASE)})
196+
197+
chicken = Species.register(
198+
latin_name="gallus_gallus",
199+
synonyms=["chicken"],
200+
reference_assemblies={
201+
"Galgal4": (75, 85),
202+
"Gallus_gallus-5.0": (86, MAX_ENSEMBL_RELEASE)})
203+
204+
# Does the black rat (Rattus Rattus) get used for research too?
205+
brown_rat = Species.register(
206+
latin_name="rattus_norvegicus",
207+
synonyms=["brown rat", "lab rat", "rat"],
208+
reference_assemblies={
209+
"Rnor_5.0": (75, 79),
210+
"Rnor_6.0": (80, MAX_ENSEMBL_RELEASE),
211+
})

test/test_download_cache.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,34 @@ def test_download_cache_missing_remote_file():
3333

3434
def test_download_cache_custom_location():
3535
test_file = "refseq.ucsc.small.gtf"
36-
tmp_dir = os.path.join(tempfile.gettempdir(), "pyensembl")
36+
tmp_dir = tempfile.gettempdir()
37+
38+
print("DIR: %s" % tmp_dir)
39+
assert tmp_dir is not None
40+
3741
os.environ['PYENSEMBL_CACHE_DIR'] = tmp_dir
42+
3843
# We need another instance of DownloadCache
3944
# that copies files over to cache folder
4045
download_cache = DownloadCache(
41-
reference_name="test",
42-
annotation_name="test",
46+
reference_name="test_reference",
47+
annotation_name="test_annotation",
4348
copy_local_files_to_cache=True)
49+
4450
# clean up
4551
download_cache.delete_cache_directory()
4652
download_cache.download_or_copy_if_necessary(
4753
download_if_missing=True,
4854
path_or_url=data_path(test_file))
49-
ok_(os.path.exists(os.path.join(tmp_dir, test_file)))
55+
56+
full_path = os.path.join(
57+
tmp_dir,
58+
"pyensembl",
59+
"test_reference",
60+
"test_annotation",
61+
test_file)
62+
print("FULL PATH: %s" % full_path)
63+
assert len(full_path) > 0
64+
65+
ok_(os.path.exists(full_path))
5066
del os.environ['PYENSEMBL_CACHE_DIR']

0 commit comments

Comments
 (0)