Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into master
  • Loading branch information
johanneskoester authored Nov 12, 2024
commit 5072011abca9e7b7ca224e62ae4cb774be6b8594
1 change: 1 addition & 0 deletions src/bam/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub mod buffer;
pub mod ext;
pub mod header;
pub mod md_align;
pub mod index;
pub mod pileup;
pub mod record;

Expand Down
12 changes: 6 additions & 6 deletions src/bam/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ use std::u32;
use byteorder::{LittleEndian, ReadBytesExt};

use bam::md_align::{CigarMDIter, CigarMDPos, MDAlignError};
use bam::{AuxWriteError, HeaderView, ReadError};
use bam::{AuxWriteError, HeaderView, ReadError, Error};
use htslib;
use utils;
use crate::errors::Result;
#[cfg(feature = "serde_feature")]
use serde::{self, Deserialize, Serialize};

use bio_types::alignment::{Alignment, AlignmentMode, AlignmentOperation};
use bio_types::genome;
Expand Down Expand Up @@ -1869,11 +1872,8 @@ impl CigarString {
}
}

/// Create a CigarString from given bytes.
pub fn from_bytes(text: &[u8]) -> Result<Self, CigarError> {
Self::from_str(str::from_utf8(text)
.map_err(|_| CigarError::UnexpectedOperation("unable to parse as UTF8".to_owned()))?)
}
impl TryFrom<&[u8]> for CigarString {
type Error = Error;

/// Create a CigarString from given &[u8].
/// # Example
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.