diff --git a/Cargo.lock b/Cargo.lock index 83e8eba..4f17ea7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -192,7 +192,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chopper" -version = "0.4.0" +version = "0.5.0" dependencies = [ "approx", "bio", diff --git a/Cargo.toml b/Cargo.toml index cd6983b..1815152 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chopper" -version = "0.4.0" +version = "0.5.0" authors = ["wdecoster "] edition = "2018" diff --git a/src/main.rs b/src/main.rs index 0fd0336..d8cb1b5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,7 +79,8 @@ where let read_len = record.seq().len(); // If a read is shorter than what is to be cropped the read is dropped entirely (filtered out) if args.headcrop + args.tailcrop < read_len { - let average_quality = ave_qual(record.qual()); + let average_quality = + ave_qual(&record.qual().iter().map(|i| i - 33).collect::>()); if average_quality >= args.minqual && average_quality <= args.maxqual && read_len >= args.minlength