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

Release version 2.3.0 #295

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
819cbb1
Update ensembl_release_versions.py
y9c Jul 30, 2022
1463444
fix naming
y9c Aug 18, 2022
6829d89
quick update
y9c Aug 18, 2022
2ee9eb2
quick update
y9c Aug 18, 2022
43f5e1c
quick update
y9c Aug 18, 2022
597057c
Merge branch 'openvax:master' into master
y9c Aug 18, 2022
be260ff
quick update
y9c Aug 18, 2022
acd2509
Merge branch 'openvax:master' into master
y9c Nov 17, 2023
0690b64
Merge branch 'openvax:master' into master
y9c Dec 28, 2023
86968b5
add species
y9c Dec 28, 2023
29c4cce
format and relase
y9c Dec 29, 2023
7c581a8
format and release
y9c Dec 29, 2023
3819ea2
add comand to list all available
y9c Dec 29, 2023
ed1de05
add comand to list all available
y9c Dec 29, 2023
1426100
add comand to list all available
y9c Dec 29, 2023
e03a213
fix bug
y9c Jan 2, 2024
c6915d1
support plants
y9c Jan 10, 2024
9b426eb
bump version 2.3.0
y9c Jan 10, 2024
bb6adf8
bump version 2.3.0
y9c Jan 10, 2024
aceabe0
fix bug in fasta name
y9c Jan 10, 2024
e77c9b1
support arabidopsis
y9c Jan 10, 2024
247f9cf
update check
y9c Jan 10, 2024
82b52bc
format code
y9c Jan 10, 2024
6b6d8db
update config
y9c Jan 10, 2024
3f78d05
quick update
y9c Jan 10, 2024
6d840b4
ensemblrelease suport
y9c Jan 10, 2024
9a0cf7f
ensemblrelease suport
y9c Jan 10, 2024
f5c537d
ensemblrelease suport
y9c Jan 10, 2024
9d1ce7c
ensemblrelease suport, fix bu
y9c Jan 10, 2024
a7e8b5b
ensemblrelease suport, fix bug
y9c Jan 10, 2024
9ead657
update more species
y9c Jan 10, 2024
41612a0
format code
y9c Jan 10, 2024
e586f28
fix gene name error
y9c Jan 10, 2024
b2d2f62
fix gene name error for soybean and some other species
y9c Jan 10, 2024
65b5d6d
fix gene name error for maize
y9c Jan 10, 2024
eec7115
suport mRNA type
y9c Jan 10, 2024
303ada4
suport mRNA type
y9c Jan 10, 2024
44acb09
quick update
y9c Jan 11, 2024
b492835
fix conflict
y9c Jan 11, 2024
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
Prev Previous commit
Next Next commit
format code
  • Loading branch information
y9c committed Jan 10, 2024
commit 41612a03a8a6f21f8ac6e239dde76bddf8ed42fb
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "pyensembl.tex", "pyensembl Documentation", "Hammer Lab", "manual"),
(
master_doc,
"pyensembl.tex",
"pyensembl Documentation",
"Hammer Lab",
"manual",
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
14 changes: 10 additions & 4 deletions pyensembl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
from .genome import Genome
from .locus import Locus
from .reference_name import ( # ensembl_grch36,; ensembl_grch37,; ensembl_grch38,
find_species_by_reference, genome_for_reference_name,
normalize_reference_name, which_reference)
find_species_by_reference,
genome_for_reference_name,
normalize_reference_name,
which_reference,
)
from .search import find_nearest_locus
from .sequence_data import SequenceData
from .species import (check_species_object, find_species_by_name,
normalize_species_name)
from .species import (
check_species_object,
find_species_by_name,
normalize_species_name,
)
from .transcript import Transcript
from .version import __version__

Expand Down
19 changes: 13 additions & 6 deletions pyensembl/download_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ def _fields(self):
)

def __eq__(self, other):
return other.__class__ is DownloadCache and self._fields() == other._fields()
return (
other.__class__ is DownloadCache
and self._fields() == other._fields()
)

def __hash__(self):
return hash(self._fields())
Expand Down Expand Up @@ -213,10 +216,14 @@ def cached_path(self, path_or_url):
# if we expect the download function to decompress this file then
# we should use its name without the compression extension
if self.decompress_on_download:
local_filename = self._remove_compression_suffix_if_present(local_filename)
local_filename = self._remove_compression_suffix_if_present(
local_filename
)

if len(local_filename) == 0:
raise ValueError("Can't determine local filename for %s" % (path_or_url,))
raise ValueError(
"Can't determine local filename for %s" % (path_or_url,)
)

return join(self.cache_directory_path, local_filename)

Expand Down Expand Up @@ -319,9 +326,9 @@ def delete_cached_files(self, prefixes=[], suffixes=[]):
"""
if isdir(self.cache_directory_path):
for filename in listdir():
delete = any([filename.endswith(ext) for ext in suffixes]) or any(
[filename.startswith(pre) for pre in prefixes]
)
delete = any(
[filename.endswith(ext) for ext in suffixes]
) or any([filename.startswith(pre) for pre in prefixes])
if delete:
path = join(self.cache_directory_path, filename)
logger.info("Deleting %s", path)
Expand Down
14 changes: 11 additions & 3 deletions pyensembl/ensembl_release_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .config import (MAX_ENSEMBL_RELEASE, MAX_ENSEMBLGENOME_RELEASE,
MIN_ENSEMBL_RELEASE, MIN_ENSEMBLGENOME_RELEASE)
from .config import (
MAX_ENSEMBL_RELEASE,
MAX_ENSEMBLGENOME_RELEASE,
MIN_ENSEMBL_RELEASE,
MIN_ENSEMBLGENOME_RELEASE,
)


def check_release_number(release, database=None):
"""
Check to make sure a release is in the valid range of Ensembl releases.
"""
if release is None:
return MAX_ENSEMBL_RELEASE if database is None else MAX_ENSEMBLGENOME_RELEASE
return (
MAX_ENSEMBL_RELEASE
if database is None
else MAX_ENSEMBLGENOME_RELEASE
)
try:
release = int(release)
except ValueError:
Expand Down
4 changes: 3 additions & 1 deletion pyensembl/exon.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@


class Exon(Locus):
def __init__(self, exon_id, contig, start, end, strand, gene_name, gene_id):
def __init__(
self, exon_id, contig, start, end, strand, gene_name, gene_id
):
Locus.__init__(self, contig, start, end, strand)
self.exon_id = exon_id
self.gene_name = gene_name
Expand Down
3 changes: 2 additions & 1 deletion pyensembl/fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def _parse_header_id(line):
"""
if type(line) is not bytes:
raise TypeError(
"Expected header line to be of type %s but got %s" % (bytes, type(line))
"Expected header line to be of type %s but got %s"
% (bytes, type(line))
)

if len(line) <= 1:
Expand Down
7 changes: 5 additions & 2 deletions pyensembl/gene.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@


class Gene(LocusWithGenome):
def __init__(self, gene_id, gene_name, contig, start, end, strand, biotype, genome):
def __init__(
self, gene_id, gene_name, contig, start, end, strand, biotype, genome
):
LocusWithGenome.__init__(
self,
contig=contig,
Expand Down Expand Up @@ -98,7 +100,8 @@ def transcripts(self):
# its particular information, might be more efficient if we
# just get all the columns here, but how do we keep that modular?
return [
self.genome.transcript_by_id(result[0]) for result in transcript_id_results
self.genome.transcript_by_id(result[0])
for result in transcript_id_results
]

@memoized_property
Expand Down
Loading