Skip to content

Commit

Permalink
Refactor error handling in ReadsReader and remove default values for …
Browse files Browse the repository at this point in the history
…bam and gtf files
  • Loading branch information
CedricHermansBIT committed Feb 28, 2024
1 parent 7c06732 commit d990790
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ impl ReadsReader {
let reader = BamReader::from_path(path, n);
match reader {
Ok(reader) => ReadsReader::BamReader(reader),
Err(e) => panic!("{}", e),
Err(e) => panic!("{}, File: {}", e, path),
}
} else if path.ends_with(".sam") {
let reader = SamReader::from_path(path);
match reader {
Ok(reader) => ReadsReader::SamReader(reader),
Err(e) => panic!("{}", e),
Err(e) => panic!("{}, File: {}", e, path),
}
} else {
panic!("File type not supported");
Expand Down Expand Up @@ -296,11 +296,11 @@ struct Args {
i: Vec<String>,

// Name and type of the bam file
#[structopt(name = "bam", default_value = "test.bam")]
#[structopt(name = "bam")]
bam: String,

// Name and type of the gtf file
#[structopt(name = "gtf", default_value = "test.gtf")]
#[structopt(name = "gtf")]
gtf: String,

// Secondary alignment mode
Expand Down

0 comments on commit d990790

Please sign in to comment.