-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add fragment file region scoring matrix creation #38
base: dev
Are you sure you want to change the base?
Conversation
.arg(arg!(--mode <mode>)) | ||
.arg(arg!(--output <output>)) | ||
.arg(arg!(--whitelist <whitelist>)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add more info here? Like is it required/help/etc?
let mode = match matches.get_one::<String>("mode") { | ||
Some(mode) => ScoringMode::from_str(mode), | ||
None => Ok(DEFAULT_SCORING_MODE), | ||
}; | ||
let mode = mode.unwrap_or(DEFAULT_SCORING_MODE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines seem redundant. Do you actually need line 48?
#[rstest] | ||
fn test_igd_create() { | ||
let tempdir = tempfile::tempdir().unwrap(); | ||
let path = PathBuf::from(&tempdir.path()); | ||
|
||
let db_path_unwrapped = path.into_os_string().into_string().unwrap(); | ||
let db_output_path = db_path_unwrapped; | ||
|
||
let path_to_crate = env!("CARGO_MANIFEST_DIR"); | ||
let testfilelists = format!("{}{}", path_to_crate, "/tests/data/igd_file_list/"); | ||
|
||
let demo_name = String::from("demo"); | ||
|
||
create_igd_f(&db_output_path, &testfilelists, &demo_name); | ||
} | ||
|
||
#[rstest] | ||
fn test_igd_parse_bed_file() { | ||
// Given some random line from a bed file... | ||
let bed_file_string = | ||
String::from("chr1 32481 32787 SRX4150706.05_peak_1 92 . 7.69231 13.22648 9.25988 155"); | ||
|
||
//Placeholder start and end values | ||
let mut start = 0; | ||
let mut end = 0; | ||
let mut va = 0; | ||
|
||
let result = parse_bed(&bed_file_string, &mut start, &mut end, &mut va).unwrap(); // this will return | ||
|
||
let unwrapped_result = result.as_str(); | ||
|
||
assert_eq!(unwrapped_result, "chr1"); | ||
|
||
// Ensure start and end is modified via parse_bed | ||
assert_eq!(start, 32481); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these igd tests showing up here as new?
No description provided.