This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
feat: allow parsing single ended RA files #413
Annotations
3 errors and 1 warning
this `if` statement can be collapsed:
src/read_pair_iter.rs#L440
error: this `if` statement can be collapsed
--> src/read_pair_iter.rs:440:21
|
440 | / if idx == 0 && self.r1_interleaved && !iter_ended[idx] {
441 | | if !is_single_ended {
442 | | iter.advance()
443 | | .fastq_err(paths[idx].as_ref().unwrap(), (rec_num[idx] + 1) * 4)?;
... |
477 | | }
478 | | }
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
note: the lint level is defined here
--> src/lib.rs:12:9
|
12 | #![deny(warnings, unused)]
| ^^^^^^^^
= note: `#[deny(clippy::collapsible_if)]` implied by `#[deny(warnings)]`
help: collapse nested if block
|
440 ~ if idx == 0 && self.r1_interleaved && !iter_ended[idx] && !is_single_ended {
441 + iter.advance()
442 + .fastq_err(paths[idx].as_ref().unwrap(), (rec_num[idx] + 1) * 4)?;
443 + let record = iter.get();
444 +
445 + // Check for non-ACGTN characters
446 + if let Some(ref rec) = record {
447 + if !fastq::Record::validate_dnan(rec) {
448 + let msg = "FASTQ contains sequence base with character other than [ACGTN].".to_string();
449 + let e = FastqError::format(
450 + msg,
451 + paths[idx].as_ref().unwrap(),
452 + rec_num[idx] * 4,
453 + );
454 + return Err(e);
455 + }
456 +
457 + if sample {
458 + let which = WhichRead::read_types()[idx + 1];
459 + let read_length = read_lengths[which as usize];
460 + let tr = TrimRecord::new(rec, read_length);
461 + rp.push_read(&tr, which)
462 + }
463 + } else {
464 + // We should only hit this if the FASTQ has an odd
465 + // number of records. Throw an error
466 + let msg = "Input FASTQ file was input as interleaved R1 and R2, but contains an odd number of records".to_string();
467 + let e = FastqError::format(
468 + msg,
469 + paths[idx].as_ref().unwrap(),
470 + rec_num[idx] * 4,
471 + );
472 + return Err(e);
473 + }
474 +
475 + rec_num[idx] += 1;
476 + }
|
|
no field `r2` on type `&read_pair_iter::ReadPairIter`:
src/read_pair_iter.rs#L328
error[E0609]: no field `r2` on type `&read_pair_iter::ReadPairIter`
--> src/read_pair_iter.rs:328:21
|
328 | Ok(self.r2.is_none())
| ^^ unknown field
|
= note: available fields are: `r1_interleaved`, `buffer`, `rand`, `uniform`, `subsample_rate` ... and 2 others
|
test
Clippy had exited with the 101 exit code
|
test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: 10XGenomics/clippy-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|