Skip to content

Commit

Permalink
2024/10/28-09:49:18 (Linux VDI0092.zit.bam.de x86_64)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbenner committed Oct 28, 2024
1 parent df50a24 commit 90f7b74
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/granges_gtf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use std::error::Error;
use flate2::read::GzDecoder;
use regex::Regex;

use crate::error::ArgumentError;
use crate::granges::GRanges;
use crate::meta::MetaData;
use crate::range::Range;
Expand Down Expand Up @@ -208,6 +209,15 @@ impl GRanges {
defaults
};

let n = opt_names.len();

if opt_types.len() != n {
return Err(Box::new(ArgumentError("Invalid length of `opt_types` argument".to_string())));
}
if defaults.len() != n {
return Err(Box::new(ArgumentError("Invalid length of `defaults` argument".to_string())));
}

let mut granges = GRanges::default();

let mut type_map = HashMap::new();
Expand Down

0 comments on commit 90f7b74

Please sign in to comment.