Skip to content
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

Open
wants to merge 30 commits into
base: dev
Choose a base branch
from

Conversation

nleroy917
Copy link
Member

No description provided.

Comment on lines +17 to +19
.arg(arg!(--mode <mode>))
.arg(arg!(--output <output>))
.arg(arg!(--whitelist <whitelist>))
Copy link
Member

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?

Comment on lines +44 to +48
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);
Copy link
Member

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?

Comment on lines +94 to +128
#[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);
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants