Skip to content

Commit 9221a19

Browse files
authored
Merge pull request #81 from griffithlab/gene_id
add gene id as column output by junctions annotate
2 parents 53d991b + 5becbbd commit 9221a19

9 files changed

+97
-78
lines changed

src/gtf/gtf_parser.cc

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2222
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2323
DEALINGS IN THE SOFTWARE. */
2424

25+
#include <sstream>
2526
#include <cassert>
2627
#include <cstdlib>
27-
#include <fstream>
28-
#include <iostream>
2928
#include <set>
3029
#include <stdexcept>
31-
#include <vector>
3230
#include <algorithm>
3331
#include "common.h"
34-
#include "bedFile.h"
3532
#include "gtf_parser.h"
3633
#include "lineFileUtilities.h"
3734

@@ -112,14 +109,15 @@ void GtfParser::add_exon_to_transcript_map(Gtf gtf1) {
112109
Tokenize(gtf1.attributes, attributes, ';');
113110
string transcript_id = parse_attribute(attributes, "transcript_id");
114111
string gene_name = parse_attribute(attributes, "gene_name");
112+
string gene_id = parse_attribute(attributes, "gene_id");
115113
//create a BED6 object
116114
//NOTE: the 'name' column is simply going to be 'exon'
117115
BED exon = BED(gtf1.seqname, gtf1.start,
118116
gtf1.end, gtf1.feature,
119117
gtf1.score, gtf1.strand);
120118
if(transcript_id != string("NA")) {
121119
transcript_map_[transcript_id].exons.push_back(exon);
122-
set_transcript_gene(transcript_id, gene_name);
120+
set_transcript_gene(transcript_id, gene_name, gene_id);
123121
}
124122
}
125123

@@ -244,12 +242,14 @@ void GtfParser::set_gtffile(string filename) {
244242
gtffile_ = filename;
245243
}
246244

247-
//Get the gene ID using the trancript ID
248-
string GtfParser::get_gene_from_transcript(string transcript_id) {
245+
//Get the gene name and gene ID using the trancript ID
246+
vector<string> GtfParser::get_gene_from_transcript(string transcript_id) {
249247
if(transcript_to_gene_.count(transcript_id)) {
250248
return transcript_to_gene_[transcript_id];
251249
} else {
252-
return "NA";
250+
string arr[] = {"NA, NA"};
251+
vector<string> NA (arr, arr + sizeof(arr)/sizeof(string));
252+
return NA;
253253
}
254254
}
255255

@@ -262,11 +262,14 @@ void GtfParser::load() {
262262
//print_transcripts();
263263
}
264264

265-
//Set the gene ID for a trancript ID
266-
inline void GtfParser::set_transcript_gene(string transcript_id, string gene_id) {
265+
//Set the gene name and gene ID for a trancript ID
266+
inline void GtfParser::set_transcript_gene(string transcript_id, string gene_name, string gene_id) {
267267
//check if key already exists
268-
if(transcript_to_gene_.count(transcript_id) == 0)
269-
transcript_to_gene_[transcript_id] = gene_id;
268+
if(transcript_to_gene_.count(transcript_id) == 0){
269+
string arr[] = {gene_name, gene_id};
270+
vector<string> gene (arr, arr + sizeof(arr)/sizeof(string));
271+
transcript_to_gene_[transcript_id] = gene;
272+
}
270273
}
271274

272275
//Assignment operator

src/gtf/gtf_parser.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ DEALINGS IN THE SOFTWARE. */
2424
#ifndef GTF_PARSER_H_
2525
#define GTF_PARSER_H_
2626

27+
#include <string>
2728
#include <fstream>
2829
#include <iostream>
2930
#include <map>
@@ -112,8 +113,8 @@ class GtfParser {
112113
ifstream gtf_fh_;
113114
//Are exons within transcripts sorted
114115
bool transcripts_sorted_;
115-
//Jump from transcript-id to gene-id
116-
map<string, string> transcript_to_gene_;
116+
//Jump from transcript-id to {gene name, gene id}
117+
map<string, vector<string> > transcript_to_gene_;
117118
//Store transcripts as a vector of exon BEDs
118119
//keyed by transcript_id
119120
map<string, Transcript> transcript_map_;
@@ -177,9 +178,9 @@ class GtfParser {
177178
//The return value is a vector of BEDs
178179
const vector<BED> & get_exons_from_transcript(string transcript_id);
179180
//Get the gene ID using the trancript ID
180-
string get_gene_from_transcript(string transcript_id);
181+
vector<string> get_gene_from_transcript(string transcript_id);
181182
//Set the gene ID for a trancript ID
182-
void set_transcript_gene(string transcript_id, string gene_id);
183+
void set_transcript_gene(string transcript_id, string gene_name, string gene_id);
183184
//Load all the necessary objects into memory
184185
void load();
185186
//Assignment operator

src/junctions/junctions_annotator.h

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ DEALINGS IN THE SOFTWARE. */
2525
#ifndef JUNCTIONS_ANNOTATOR_H_
2626
#define JUNCTIONS_ANNOTATOR_H_
2727

28+
#include <string>
29+
#include <sstream>
2830
#include <iostream>
2931
#include <iterator>
3032
#include "bedFile.h"
@@ -41,7 +43,7 @@ struct AnnotatedJunction : BED {
4143
set<string> transcripts_overlap;
4244
//set of genes that
4345
//the junction overlaps
44-
set<string> genes_overlap;
46+
set< vector<string> > genes_overlap;
4547
//set of exons that the junction
4648
//overlaps
4749
set<string> exons_skipped;
@@ -72,7 +74,7 @@ struct AnnotatedJunction : BED {
7274
"\t" << "exons_skipped" << "\t" << "donors_skipped" <<
7375
"\t" << "anchor" <<
7476
"\t" << "known_donor" << "\t" << "known_acceptor" << "\t" << "known_junction" <<
75-
"\t" << "genes" << "\t" << "transcripts";
77+
"\t" << "gene_names" << "\t" << "gene_ids" << "\t" << "transcripts";
7678
if(variant_info_exists) {
7779
out << "\t" << "variant_info";
7880
}
@@ -90,13 +92,21 @@ struct AnnotatedJunction : BED {
9092
//See if any genes overlap the junction
9193
if(genes_overlap.size()) {
9294
out << "\t";
93-
for(set<string>::iterator it = genes_overlap.begin(); it != genes_overlap.end(); ++it) {
95+
for(set< vector<string> >::iterator it = genes_overlap.begin(); it != genes_overlap.end(); ++it) {
9496
if(it != genes_overlap.begin())
9597
out << ",";
96-
out << *it;
98+
//print gene name
99+
out << (*it)[0];
100+
}
101+
out << "\t";
102+
for(set< vector<string> >::iterator it = genes_overlap.begin(); it != genes_overlap.end(); ++it) {
103+
if(it != genes_overlap.begin())
104+
out << ",";
105+
//print gene name
106+
out << (*it)[1];
97107
}
98108
} else {
99-
out << "\t" << "NA";
109+
out << "\t" << "NA" << "\t" << "NA";
100110
}
101111
//See if any transcripts overlap the junction
102112
if(transcripts_overlap.size()) {

src/variants/variants_annotator.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -483,25 +483,25 @@ AnnotatedVariant VariantsAnnotator::annotate_record_with_transcripts() {
483483
//Use a AnnotatedVariant object to hold the result
484484
get_variant_overlaps_spliceregion(exons, variant);
485485
if(variant.annotation != "non_splice_region") {
486-
string gene_id = gtf_.get_gene_from_transcript(transcripts[i]);
486+
string gene_name = gtf_.get_gene_from_transcript(transcripts[i])[0];
487487
//Use sign to encode intronic/exonic
488488
string annotation = variant.annotation;
489489
string dist_str = variant.score;
490490
//Add gene only once for multiple transcripts of the same gene.
491491
if(overlapping_transcripts != "NA") {
492492
//Check if this gene is new
493-
if(unique_genes.find(gene_id) == unique_genes.end()) {
494-
overlapping_genes += "," + gene_id;
495-
unique_genes.insert(gene_id);
493+
if(unique_genes.find(gene_name) == unique_genes.end()) {
494+
overlapping_genes += "," + gene_name;
495+
unique_genes.insert(gene_name);
496496
}
497497
overlapping_distances += "," + dist_str;
498498
overlapping_transcripts += "," + transcripts[i];
499499
annotations += "," + annotation;
500500
} else {
501-
overlapping_genes = gene_id;
501+
overlapping_genes = gene_name;
502502
overlapping_distances = dist_str;
503503
overlapping_transcripts = transcripts[i];
504-
unique_genes.insert(gene_id);
504+
unique_genes.insert(gene_name);
505505
annotations = annotation;
506506
}
507507
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction genes transcripts variant_info
2-
22 93668 97252 JUNC00000001 5 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENST00000263253 22:94626-94627
1+
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction gene_names gene_ids transcripts variant_info
2+
22 93668 97252 JUNC00000001 5 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENSG00000100393 ENST00000263253 22:94626-94627
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction genes transcripts variant_info
2-
22 93668 97252 JUNC00000001 5 - CT-AC 0 0 0 N 0 0 0 NA NA 22:94626-94627
1+
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction gene_names gene_ids transcripts variant_info
2+
22 93668 97252 JUNC00000001 5 - CT-AC 0 0 0 N 0 0 0 NA NA NA 22:94626-94627
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction genes transcripts
2-
22 93668 97252 JUNC00000001 5 + GT-AG 2 1 2 NDA 1 1 0 EP300 ENST00000263253
1+
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction gene_names gene_ids transcripts
2+
22 93668 97252 JUNC00000001 5 + GT-AG 2 1 2 NDA 1 1 0 EP300 ENSG00000100393 ENST00000263253
Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction genes transcripts
2-
22 14103 38192 JUNC00300575 38 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
3-
22 38307 38693 JUNC00300576 2 + GT-AG 0 0 0 N 0 0 0 NA NA
4-
22 38826 46869 JUNC00300577 152 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
5-
22 47045 48492 JUNC00300578 236 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
6-
22 48753 50895 JUNC00300579 299 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
7-
22 51008 52393 JUNC00300580 280 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
8-
22 51008 56818 JUNC00300581 1 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENST00000263253
9-
22 52638 56818 JUNC00300582 302 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
10-
22 52642 56818 JUNC00300583 2 + GT-AG 0 0 0 A 0 1 0 EP300 ENST00000263253
11-
22 56911 58658 JUNC00300584 340 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
12-
22 58795 61145 JUNC00300585 608 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
13-
22 61262 62053 JUNC00300586 854 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
14-
22 61262 62075 JUNC00300587 6 + GT-AG 1 0 0 D 1 0 0 EP300 ENST00000263253
15-
22 61262 67744 JUNC00300588 1 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENST00000263253
16-
22 62227 67744 JUNC00300589 1016 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
17-
22 62227 68842 JUNC00300590 28 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENST00000263253
18-
22 67821 68842 JUNC00300591 1096 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
19-
22 68951 70043 JUNC00300592 971 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
20-
22 70180 70766 JUNC00300593 223 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
21-
22 71203 72838 JUNC00300594 286 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
22-
22 73017 73211 JUNC00300595 298 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
23-
22 73355 76000 JUNC00300596 217 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
24-
22 76118 78174 JUNC00300597 448 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
25-
22 78413 79417 JUNC00300598 498 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
26-
22 79505 81647 JUNC00300599 408 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
27-
22 79505 83728 JUNC00300600 1 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENST00000263253
28-
22 81727 83728 JUNC00300601 348 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
29-
22 83784 85058 JUNC00300602 334 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
30-
22 85135 87604 JUNC00300603 429 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
31-
22 87671 89454 JUNC00300604 574 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
32-
22 89604 89726 JUNC00300605 572 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
33-
22 89872 90508 JUNC00300606 772 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
34-
22 90621 91411 JUNC00300607 655 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
35-
22 90621 91093 JUNC00300608 3 + GT-AG 0 0 0 D 1 0 0 EP300 ENST00000263253
36-
22 91576 93504 JUNC00300609 387 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
37-
22 93668 94628 JUNC00300610 216 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
38-
22 94789 97252 JUNC00300611 571 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
39-
22 97533 97778 JUNC00300612 548 + GT-AG 0 0 0 DA 1 1 1 EP300 ENST00000263253
40-
22 90586 104069 JUNC00300613 10 - GG-AG 0 0 1 A 0 1 0 RP1-85F18.6 ENST00000415054
41-
22 90586 104068 JUNC00300614 100 - GT-AG 0 0 0 DA 1 1 1 RP1-85F18.6 ENST00000415054
42-
22 90585 104068 JUNC00300614 10 - GT-GG 1 0 0 D 1 0 0 RP1-85F18.6 ENST00000415054
1+
chrom start end name score strand splice_site acceptors_skipped exons_skipped donors_skipped anchor known_donor known_acceptor known_junction gene_names gene_ids transcripts
2+
22 14103 38192 JUNC00300575 38 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
3+
22 38307 38693 JUNC00300576 2 + GT-AG 0 0 0 N 0 0 0 NA NA NA
4+
22 38826 46869 JUNC00300577 152 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
5+
22 47045 48492 JUNC00300578 236 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
6+
22 48753 50895 JUNC00300579 299 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
7+
22 51008 52393 JUNC00300580 280 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
8+
22 51008 56818 JUNC00300581 1 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENSG00000100393 ENST00000263253
9+
22 52638 56818 JUNC00300582 302 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
10+
22 52642 56818 JUNC00300583 2 + GT-AG 0 0 0 A 0 1 0 EP300 ENSG00000100393 ENST00000263253
11+
22 56911 58658 JUNC00300584 340 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
12+
22 58795 61145 JUNC00300585 608 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
13+
22 61262 62053 JUNC00300586 854 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
14+
22 61262 62075 JUNC00300587 6 + GT-AG 1 0 0 D 1 0 0 EP300 ENSG00000100393 ENST00000263253
15+
22 61262 67744 JUNC00300588 1 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENSG00000100393 ENST00000263253
16+
22 62227 67744 JUNC00300589 1016 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
17+
22 62227 68842 JUNC00300590 28 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENSG00000100393 ENST00000263253
18+
22 67821 68842 JUNC00300591 1096 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
19+
22 68951 70043 JUNC00300592 971 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
20+
22 70180 70766 JUNC00300593 223 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
21+
22 71203 72838 JUNC00300594 286 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
22+
22 73017 73211 JUNC00300595 298 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
23+
22 73355 76000 JUNC00300596 217 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
24+
22 76118 78174 JUNC00300597 448 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
25+
22 78413 79417 JUNC00300598 498 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
26+
22 79505 81647 JUNC00300599 408 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
27+
22 79505 83728 JUNC00300600 1 + GT-AG 1 1 1 NDA 1 1 0 EP300 ENSG00000100393 ENST00000263253
28+
22 81727 83728 JUNC00300601 348 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
29+
22 83784 85058 JUNC00300602 334 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
30+
22 85135 87604 JUNC00300603 429 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
31+
22 87671 89454 JUNC00300604 574 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
32+
22 89604 89726 JUNC00300605 572 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
33+
22 89872 90508 JUNC00300606 772 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
34+
22 90621 91411 JUNC00300607 655 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
35+
22 90621 91093 JUNC00300608 3 + GT-AG 0 0 0 D 1 0 0 EP300 ENSG00000100393 ENST00000263253
36+
22 91576 93504 JUNC00300609 387 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
37+
22 93668 94628 JUNC00300610 216 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
38+
22 94789 97252 JUNC00300611 571 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
39+
22 97533 97778 JUNC00300612 548 + GT-AG 0 0 0 DA 1 1 1 EP300 ENSG00000100393 ENST00000263253
40+
22 90586 104069 JUNC00300613 10 - GG-AG 0 0 1 A 0 1 0 RP1-85F18.6 ENSG00000232754 ENST00000415054
41+
22 90586 104068 JUNC00300614 100 - GT-AG 0 0 0 DA 1 1 1 RP1-85F18.6 ENSG00000232754 ENST00000415054
42+
22 90585 104068 JUNC00300614 10 - GT-GG 1 0 0 D 1 0 0 RP1-85F18.6 ENSG00000232754 ENST00000415054

tests/lib/gtf/test_gtf_parser.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2222
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2323
DEALINGS IN THE SOFTWARE. */
2424

25+
#include <string>
2526
#include <gtest/gtest.h>
2627
#include <sstream>
2728
#include <stdexcept>
@@ -102,9 +103,13 @@ TEST_F(GtfParserTest, AddExonToTranscriptTest) {
102103
test_gtf1.is_exon = true;
103104
gp1.add_exon_to_transcript_map(test_gtf1);
104105
EXPECT_EQ("EP300",
105-
gp1.get_gene_from_transcript("ENST00000263253"));
106-
EXPECT_EQ("NA",
107-
gp1.get_gene_from_transcript("ENSTfake"));
106+
gp1.get_gene_from_transcript("ENST00000263253")[0]);
107+
EXPECT_EQ("ENSG00000100393",
108+
gp1.get_gene_from_transcript("ENST00000263253")[1]);
109+
EXPECT_EQ("NA, NA",
110+
gp1.get_gene_from_transcript("ENSTfake")[0]);
111+
EXPECT_EQ("NA, NA",
112+
gp1.get_gene_from_transcript("ENSTfake")[0]);
108113
gp1.annotate_transcript_with_bins();
109114
EXPECT_EQ(37359u,
110115
gp1.bin_from_transcript("ENST00000263253"));

0 commit comments

Comments
 (0)