pub fn from_acgt_bytes_hashn(bytes: &[u8], read_name: &[u8]) -> DnaString {
        let mut hasher = DefaultHasher::new();
        read_name.hash(&mut hasher);

        let mut dna_string = DnaString::with_capacity(bytes.len());

        for (pos, c) in bytes.iter().enumerate() {
            let v = match c {
                b'A' | b'a' => 0u8,
                b'C' | b'c' => 1u8,
                b'G' | b'g' => 2u8,
                b'T' | b't' => 3u8,
                _ => {
                    let mut hasher_clone = hasher.clone();
                    pos.hash(&mut hasher_clone);
                    (hasher_clone.finish() % 4) as u8
                }
            };

            dna_string.push(v);
        }

        dna_string
    }
/// Create a DnaString from an ACGT-encoded byte slice,
/// Non ACGT positions will be converted to repeatable random base determined
/// by a hash of the read name and the position within the string.
Create a DnaString from an ACGT-encoded byte slice,
Non ACGT positions will be converted to repeatable random base determined
by a hash of the read name and the position within the string.
Create a DnaString from an ACGT - encoded byte slice Non ACGT positions will be converted to repeatable random base determined by a hash of the read name and the position within the string .
pub fn from_acgt_bytes_hashn(bytes: &[u8], read_name: &[u8]) -> DnaString {
        let mut hasher = DefaultHasher::new();
        read_name.hash(&mut hasher);
        let mut dna_string = DnaString::with_capacity(bytes.len());
        for (pos, c) in bytes.iter().enumerate() {
            let v = match c {
                b'A' | b'a' => 0u8,
                b'C' | b'c' => 1u8,
                b'G' | b'g' => 2u8,
                b'T' | b't' => 3u8,
                _ => {
                    let mut hasher_clone = hasher.clone();
                    pos.hash(&mut hasher_clone);
                    (hasher_clone.finish() % 4) as u8
                }
            };
            dna_string.push(v);
        }
        dna_string
    }
pub fn from_acgt_bytes_hashn ( bytes : & [ u8 ] , read_name : & [ u8 ] ) -> DnaString { let mut hasher = DefaultHasher :: new ( ) ; read_name . hash ( & mut hasher ) ; let mut dna_string = DnaString :: with_capacity ( bytes . len ( ) ) ; for ( pos , c ) in bytes . iter ( ) . enumerate ( ) { let v = match c { b'A' | b'a' => 0u8 , b'C' | b'c' => 1u8 , b'G' | b'g' => 2u8 , b'T' | b't' => 3u8 , _ => { let mut hasher_clone = hasher . clone ( ) ; pos . hash ( & mut hasher_clone ) ; ( hasher_clone . finish ( ) % 4 ) as u8 } } ; dna_string . push ( v ) ; } dna_string }
Create a DnaString from an ACGT-encoded byte slice,
Non ACGT positions will be converted to repeatable random base determined
by a hash of the read name and the position within the string.
Create a DnaString from an ACGT - encoded byte slice Non ACGT positions will be converted to repeatable random base determined by a hash of the read name and the position within the string .
bytes
&[u8]
read_name
&[u8]
bytes
&[u8]
read_name
&[u8]