gencodegenes 1.0.9__tar.gz → 1.0.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gencodegenes-1.0.9/src/gencodegenes.egg-info → gencodegenes-1.0.10}/PKG-INFO +1 -1
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/setup.py +1 -2
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencode.cpp +5 -5
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes/gencode.cpp +266 -275
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes/transcript.cpp +167 -177
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes/transcript.pxd +1 -1
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes/tx.cpp +24 -13
- {gencodegenes-1.0.9/src → gencodegenes-1.0.10/src/gencodegenes}/tx.h +8 -6
- {gencodegenes-1.0.9 → gencodegenes-1.0.10/src/gencodegenes.egg-info}/PKG-INFO +1 -1
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes.egg-info/requires.txt +0 -1
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gtf.cpp +17 -17
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gtf.h +1 -1
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/tx.cpp +24 -13
- {gencodegenes-1.0.9/src/gencodegenes → gencodegenes-1.0.10/src}/tx.h +8 -6
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/LICENSE.txt +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/MANIFEST.in +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/README.md +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/pyproject.toml +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/setup.cfg +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencode.h +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes/__init__.py +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes/gencode.pyx +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes/transcript.pyx +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes.egg-info/SOURCES.txt +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes.egg-info/dependency_links.txt +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gencodegenes.egg-info/top_level.txt +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gzstream/gzstream.C +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/src/gzstream/gzstream.h +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/tests/__init__.py +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/tests/data/example.grch38.fa +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/tests/data/example.grch38.gtf +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/tests/test_gencode.py +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/tests/test_sequence_methods.py +0 -0
- {gencodegenes-1.0.9 → gencodegenes-1.0.10}/tests/test_transcript.py +0 -0
|
@@ -112,14 +112,13 @@ setup(name="gencodegenes",
|
|
|
112
112
|
description='Package to load genes from GENCODE GTF files',
|
|
113
113
|
long_description=io.open('README.md', encoding='utf-8').read(),
|
|
114
114
|
long_description_content_type='text/markdown',
|
|
115
|
-
version="1.0.
|
|
115
|
+
version="1.0.10",
|
|
116
116
|
author="Jeremy McRae",
|
|
117
117
|
author_email="jeremy.mcrae@gmail.com",
|
|
118
118
|
license="MIT",
|
|
119
119
|
url='https://github.com/jeremymcrae/gencodegenes',
|
|
120
120
|
packages=["gencodegenes"],
|
|
121
121
|
install_requires=[
|
|
122
|
-
'cython >= 0.27.0',
|
|
123
122
|
'pyfaidx >= 0.5.8',
|
|
124
123
|
],
|
|
125
124
|
package_dir={'': 'src'},
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
namespace gencode {
|
|
17
17
|
|
|
18
18
|
// check which exon is first, by start position
|
|
19
|
-
bool compareExons(std::vector<int> e1, std::vector<int> e2) {
|
|
19
|
+
static bool compareExons(std::vector<int> e1, std::vector<int> e2) {
|
|
20
20
|
return (e1[0] < e2[0]);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
void sort_exons(std::vector<std::vector<int> > & exons) {
|
|
23
|
+
static void sort_exons(std::vector<std::vector<int> > & exons) {
|
|
24
24
|
std::sort(exons.begin(), exons.end(), compareExons);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// find the index of the exon containing a given chromosome position
|
|
28
|
-
std::uint32_t get_exon_num(std::vector<std::vector<int> > exons, int pos) {
|
|
28
|
+
static std::uint32_t get_exon_num(std::vector<std::vector<int> > exons, int pos) {
|
|
29
29
|
for (std::uint32_t i=0; i<exons.size(); i++) {
|
|
30
30
|
if ((pos >= exons[i][0]) && (pos <= exons[i][1])) {
|
|
31
31
|
return i;
|
|
@@ -41,7 +41,7 @@ std::uint32_t get_exon_num(std::vector<std::vector<int> > exons, int pos) {
|
|
|
41
41
|
// just set the first CDS coord and last CDS coord to their values though,
|
|
42
42
|
// as at least one stop codon spans an intron boundary, which messes up the
|
|
43
43
|
// CDS if included as is.
|
|
44
|
-
void include_end_codons(std::map<std::string, int> cds_range, TxInfo & info) {
|
|
44
|
+
static void include_end_codons(std::map<std::string, int> cds_range, TxInfo & info) {
|
|
45
45
|
if (info.cds.size() == 0) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
@@ -76,7 +76,7 @@ void include_end_codons(std::map<std::string, int> cds_range, TxInfo & info) {
|
|
|
76
76
|
//
|
|
77
77
|
// When we load lines from gencode GTF files, each line represents a single exon
|
|
78
78
|
// or CDS, and we need to combine these based on transcript ID
|
|
79
|
-
void load_transcripts(std::vector<NamedTx> & transcripts, GTF >f_file, bool coding=true) {
|
|
79
|
+
static void load_transcripts(std::vector<NamedTx> & transcripts, GTF >f_file, bool coding=true) {
|
|
80
80
|
std::set<std::string> permit = {"exon", "CDS", "UTR", "transcript",
|
|
81
81
|
"stop_codon", "start_codon"};
|
|
82
82
|
std::map<std::string, int> cds_range = {{"max", 0}, {"min", 999999999}};
|