Skip to content

Commit b1c121c

Browse files
committed
Don't remove file extension when seq files passed
1 parent e46cda2 commit b1c121c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ pub type InputFastx = (String, String, Option<String>);
1010
pub fn read_input_fastas(seq_files: &[String]) -> Vec<InputFastx> {
1111
let mut input_files = Vec::new();
1212
// matches the file name (no extension) in a full path
13-
let re_path = Regex::new(r"^.+/(.+)\.(?i:fa|fasta|fastq|fastq\.gz)$").unwrap();
13+
let re_path = Regex::new(r"^.+/(.+\.?i:fa|fasta|fastq|fastq\.gz)$").unwrap();
1414
// matches the file name (no extension) with no path
15-
let re_name = Regex::new(r"^(.+)\.(?i:fa|fasta|fastq|fastq\.gz)$").unwrap();
15+
let re_name = Regex::new(r"^(.+\.?i:fa|fasta|fastq|fastq\.gz)$").unwrap();
1616
for file in seq_files {
1717
let caps = re_path.captures(file).or(re_name.captures(file));
1818
let name = match caps {

0 commit comments

Comments
 (0)