Skip to content

Commit

Permalink
fix: remove ref length validation (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Mar 23, 2023
1 parent 888c523 commit 763b7a3
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/parser/impl_validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,13 @@ impl Validateable for CdsLocEdit {
};

match self.edit.inner() {
NaEdit::RefAlt { reference, .. }
| NaEdit::DelRef { reference }
| NaEdit::Dup { reference }
| NaEdit::InvRef { reference } => {
if !reference.is_empty() && range.len() != reference.len() {
Err(anyhow::anyhow!(
"Length implied by coordinates must equal reference sequence length ({})",
&self
))
} else {
Ok(())
}
NaEdit::RefAlt { .. }
| NaEdit::DelRef { .. }
| NaEdit::Dup { .. }
| NaEdit::InvRef { .. } => {
// We cannot make assumptions about reference length as we can have positon
// offsets.
Ok(())
}
NaEdit::Ins { .. } => {
if range.len() != 2 {
Expand Down

0 comments on commit 763b7a3

Please sign in to comment.